| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -85,6 +85,7 @@ public class IdcServiceImpl implements IdcService {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    @Resource
 | 
					 | 
					 | 
					 | 
					    @Resource
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    private ScheduledDao scheduledDao;
 | 
					 | 
					 | 
					 | 
					    private ScheduledDao scheduledDao;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    private String imagePath = "register/file/image2/";
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    /*获取拉取任务列表*/
 | 
					 | 
					 | 
					 | 
					    /*获取拉取任务列表*/
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    @Override
 | 
					 | 
					 | 
					 | 
					    @Override
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public BaseResponse taskList(HttpServletRequest request, Map<String, Object> params) {
 | 
					 | 
					 | 
					 | 
					    public BaseResponse taskList(HttpServletRequest request, Map<String, Object> params) {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -410,7 +411,8 @@ public class IdcServiceImpl implements IdcService {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            IDCUtils.createDirectory(filePath + filePathSlash + datePath + "/");
 | 
					 | 
					 | 
					 | 
					            IDCUtils.createDirectory(filePath + filePathSlash + datePath + "/");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (!FileUtils.makeDirectory(backFilePath + backFileSlash + datePath))
 | 
					 | 
					 | 
					 | 
					        if (!FileUtils.makeDirectory(backFilePath + backFileSlash + datePath))
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            IDCUtils.createDirectory(filePath + backFileSlash + datePath + "/");
 | 
					 | 
					 | 
					 | 
					            IDCUtils.createDirectory(filePath + backFileSlash + datePath + "/");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					        if(!FileUtils.makeDirectory(filePath + filePathSlash + imagePath))
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            IDCUtils.createDirectory(filePath + filePathSlash + imagePath);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        FileUtils.SaveFileAs(content, fileName);
 | 
					 | 
					 | 
					 | 
					        FileUtils.SaveFileAs(content, fileName);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        FileUtils.SaveFileAs(content, backFileName);
 | 
					 | 
					 | 
					 | 
					        FileUtils.SaveFileAs(content, backFileName);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        ArrayList<String> saveFiles = new ArrayList<>();
 | 
					 | 
					 | 
					 | 
					        ArrayList<String> saveFiles = new ArrayList<>();
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -420,11 +422,11 @@ public class IdcServiceImpl implements IdcService {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            int n = 0;
 | 
					 | 
					 | 
					 | 
					            int n = 0;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            try {
 | 
					 | 
					 | 
					 | 
					            try {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                for (MultipartFile file : files) {
 | 
					 | 
					 | 
					 | 
					                for (MultipartFile file : files) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    String imageName = filePath + filePathSlash + "register/file/image2/" + file.getOriginalFilename();
 | 
					 | 
					 | 
					 | 
					                    String imageName = filePath + filePathSlash + imagePath + file.getOriginalFilename();
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    saveFiles.add(imageName);
 | 
					 | 
					 | 
					 | 
					                    saveFiles.add(imageName);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    writeFile(file.getBytes(), filePath + filePathSlash + "register/file/image2/", file.getOriginalFilename());
 | 
					 | 
					 | 
					 | 
					                    writeFile(file.getBytes(), filePath + filePathSlash + imagePath, file.getOriginalFilename());
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    writeFile(file.getBytes(), backFilePath + backFileSlash + datePath + "register/file/image2/", file.getOriginalFilename());
 | 
					 | 
					 | 
					 | 
					                    writeFile(file.getBytes(), backFilePath + backFileSlash + datePath + imagePath, file.getOriginalFilename());
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    n++;
 | 
					 | 
					 | 
					 | 
					                    n++;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                }
 | 
					 | 
					 | 
					 | 
					                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } catch (IOException e) {
 | 
					 | 
					 | 
					 | 
					            } catch (IOException e) {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -486,14 +488,16 @@ public class IdcServiceImpl implements IdcService {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    public void downloadFile(String fileName, HttpServletResponse response) {
 | 
					 | 
					 | 
					 | 
					    public void downloadFile(String fileName, HttpServletResponse response) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        OutputStream os;
 | 
					 | 
					 | 
					 | 
					        OutputStream os;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        String filePathSlash = filePath.substring(filePath.length() - 1).equals("/") ? "" : fileName.substring(0, 1).equals("/") ? "" : "/";
 | 
					 | 
					 | 
					 | 
					        String filePathSlash = filePath.substring(filePath.length() - 1).equals("/") ? "" : fileName.substring(0, 1).equals("/") ? "" : "/";
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					        String sourceFileName = filePath +filePathSlash+imagePath +fileName;
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        try {
 | 
					 | 
					 | 
					 | 
					        try {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (FileUtils.isFileExist(filePath + filePathSlash + fileName)) {
 | 
					 | 
					 | 
					 | 
					            if (FileUtils.isFileExist(sourceFileName)) {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                byte[] bytes = FileUtils.readFileByBytes(filePath + filePathSlash + fileName);
 | 
					 | 
					 | 
					 | 
					                byte[] bytes = FileUtils.readFileByBytes(sourceFileName);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                os = response.getOutputStream();
 | 
					 | 
					 | 
					 | 
					                os = response.getOutputStream();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                os.write(bytes);
 | 
					 | 
					 | 
					 | 
					                os.write(bytes);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                os.flush();
 | 
					 | 
					 | 
					 | 
					                os.flush();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                os.close();
 | 
					 | 
					 | 
					 | 
					                os.close();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } else {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                logger.error("file not exists:"+sourceFileName);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            }
 | 
					 | 
					 | 
					 | 
					            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } catch (IOException e) {
 | 
					 | 
					 | 
					 | 
					        } catch (IOException e) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            // TODO Auto-generated catch block
 | 
					 | 
					 | 
					 | 
					            // TODO Auto-generated catch block
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -619,8 +623,8 @@ public class IdcServiceImpl implements IdcService {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                String fileNames = list.get(m).get(filePathColumn).toString();
 | 
					 | 
					 | 
					 | 
					                                String fileNames = list.get(m).get(filePathColumn).toString();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                String[] str = fileNames.split(",");
 | 
					 | 
					 | 
					 | 
					                                String[] str = fileNames.split(",");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                for (int r = 0; r < str.length; r++) {
 | 
					 | 
					 | 
					 | 
					                                for (int r = 0; r < str.length; r++) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    if (!StringUtils.isEmpty(str[r]) && FileUtils.isFileExist(filePath + filePathSlash + "register/file/image2/" + str[r]))
 | 
					 | 
					 | 
					 | 
					                                    if (!StringUtils.isEmpty(str[r]) && FileUtils.isFileExist(filePath + filePathSlash + imagePath + str[r]))
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                        files.add(filePath + filePathSlash + "register/file/image2/" + str[r]);
 | 
					 | 
					 | 
					 | 
					                                        files.add(filePath + filePathSlash + imagePath + str[r]);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                }
 | 
					 | 
					 | 
					 | 
					                                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            }
 | 
					 | 
					 | 
					 | 
					                            }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            recordSql += !StringUtils.isEmpty(recordSql) ? "," : "";
 | 
					 | 
					 | 
					 | 
					                            recordSql += !StringUtils.isEmpty(recordSql) ? "," : "";
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -642,8 +646,8 @@ public class IdcServiceImpl implements IdcService {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                if (childList.get(i).get(chidTnames[7]) != null) {
 | 
					 | 
					 | 
					 | 
					                                                if (childList.get(i).get(chidTnames[7]) != null) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                    String[] str = childList.get(i).get(chidTnames[7]).toString().split(",");
 | 
					 | 
					 | 
					 | 
					                                                    String[] str = childList.get(i).get(chidTnames[7]).toString().split(",");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                    for (int s = 0; s < str.length; s++) {
 | 
					 | 
					 | 
					 | 
					                                                    for (int s = 0; s < str.length; s++) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                        if (!StringUtils.isEmpty(str[s]) && FileUtils.isFileExist(filePath + filePathSlash + "register/file/image2/" + str[s]))
 | 
					 | 
					 | 
					 | 
					                                                        if (!StringUtils.isEmpty(str[s]) && FileUtils.isFileExist(filePath + filePathSlash + imagePath + str[s]))
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                            files.add(filePath + filePathSlash + "register/file/image2/" + str[s]);
 | 
					 | 
					 | 
					 | 
					                                                            files.add(filePath + filePathSlash + imagePath + str[s]);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                    }
 | 
					 | 
					 | 
					 | 
					                                                    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                                }
 | 
					 | 
					 | 
					 | 
					                                                }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                            }
 | 
					 | 
					 | 
					 | 
					                                            }
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -1009,6 +1013,9 @@ public class IdcServiceImpl implements IdcService {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    }
 | 
					 | 
					 | 
					 | 
					    }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    private boolean signleDownloadFile(String syncIp, String fileName) {
 | 
					 | 
					 | 
					 | 
					    private boolean signleDownloadFile(String syncIp, String fileName) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        String filePathSlash = filePath.substring(filePath.length() - 1).equals("/") ? "" : "/";
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        if(!FileUtils.makeDirectory(filePath + filePathSlash + imagePath))
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            IDCUtils.createDirectory(filePath + filePathSlash + imagePath);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        OkHttpClient client = new OkHttpClient().newBuilder()
 | 
					 | 
					 | 
					 | 
					        OkHttpClient client = new OkHttpClient().newBuilder()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                .build();
 | 
					 | 
					 | 
					 | 
					                .build();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        ;
 | 
					 | 
					 | 
					 | 
					        ;
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -1028,9 +1035,9 @@ public class IdcServiceImpl implements IdcService {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (result!=null&&result.isSuccessful()&&MediaType.parse("application/force-download").equals(result.body().contentType())) {
 | 
					 | 
					 | 
					 | 
					            if (result!=null&&result.isSuccessful()&&MediaType.parse("application/force-download").equals(result.body().contentType())) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                try (InputStream inputStream = result.body().byteStream()) {
 | 
					 | 
					 | 
					 | 
					                try (InputStream inputStream = result.body().byteStream()) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                   
 | 
					 | 
					 | 
					 | 
					                   
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        String filePathSlash = filePath.substring(filePath.length() - 1).equals("/") ? "" : "/";
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        
 | 
					 | 
					 | 
					 | 
					                        
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        FileOutputStream outputStream = new FileOutputStream(filePath + filePathSlash + fileName);
 | 
					 | 
					 | 
					 | 
					    
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                        FileOutputStream outputStream = new FileOutputStream(filePath + filePathSlash + imagePath+fileName);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    
 | 
					 | 
					 | 
					 | 
					    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        byte b[] = new byte[1024];
 | 
					 | 
					 | 
					 | 
					                        byte b[] = new byte[1024];
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    
 | 
					 | 
					 | 
					 | 
					    
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -1044,7 +1051,7 @@ public class IdcServiceImpl implements IdcService {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        outputStream.flush();
 | 
					 | 
					 | 
					 | 
					                        outputStream.flush();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        outputStream.close();
 | 
					 | 
					 | 
					 | 
					                        outputStream.close();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        if(!(total>0)) {
 | 
					 | 
					 | 
					 | 
					                        if(!(total>0)) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            new File(filePath + filePathSlash + fileName).delete();
 | 
					 | 
					 | 
					 | 
					                            new File(filePath + filePathSlash + imagePath+fileName).delete();
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            executeSql("delete from idc_file where filePath='"+fileName+"'");
 | 
					 | 
					 | 
					 | 
					                            executeSql("delete from idc_file where filePath='"+fileName+"'");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        }
 | 
					 | 
					 | 
					 | 
					                        }
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                
 | 
					 | 
					 | 
					 | 
					                
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |