|  |  | @ -54,56 +54,58 @@ public class FileServiceImpl implements FileService { | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Resource |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |     private IdcService idcService; |  |  |  |     private IdcService idcService; | 
			
		
	
		
		
			
				
					
					|  |  |  |     private String imagePath = "register/file/image2/"; |  |  |  |     private String imagePath = "register/file/image2/"; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     String pdfPath = "pdf/template/"; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Override |  |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse upload(List<String> list) { |  |  |  |     public BaseResponse upload(List<String> list) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         return fileToUpload(list); |  |  |  |         return fileToUpload(list); | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Override |  |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse download(List<String> list) { |  |  |  |     public BaseResponse download(List<String> list) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         return fileToDownload(list); |  |  |  |         return fileToDownload(list); | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Override |  |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse fileUpload(HttpServletRequest request,Map<String,Object> params) { |  |  |  |     public BaseResponse fileUpload(HttpServletRequest request, Map<String, Object> params) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         List<String> list = new ArrayList<>(); |  |  |  |         List<String> list = new ArrayList<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String[] strs = params.get("fileName").toString().split(","); |  |  |  |         String[] strs = params.get("fileName").toString().split(","); | 
			
		
	
		
		
			
				
					
					|  |  |  |         for(String str:strs) { |  |  |  |         for (String str : strs) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             list.add(str); |  |  |  |             list.add(str); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         return fileToUpload(list); |  |  |  |         return fileToUpload(list); | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     private BaseResponse fileToUpload(List<String> list) { |  |  |  |     private BaseResponse fileToUpload(List<String> list) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         String host=""; |  |  |  |         String host = ""; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         try { |  |  |  |         try { | 
			
		
	
		
		
			
				
					
					|  |  |  |             Map<String, Object> map = dbDao.get("select * from sync_data_set limit 1"); |  |  |  |             Map<String, Object> map = dbDao.get("select * from sync_data_set limit 1"); | 
			
		
	
		
		
			
				
					
					|  |  |  |             if(map!=null&&map.get("syncIp")!=null) |  |  |  |             if (map != null && map.get("syncIp") != null) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 host = map.get("syncIp").toString(); |  |  |  |                 host = map.get("syncIp").toString(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } catch (Exception ex) { |  |  |  |         } catch (Exception ex) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(StringUtils.isEmpty(host)) { |  |  |  |         if (StringUtils.isEmpty(host)) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             try { |  |  |  |             try { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 Map<String,Object> config =dbDao.get("select paramValue from system_param_config where paramKey='upper_server_ip'"); |  |  |  |                 Map<String, Object> config = dbDao.get("select paramValue from system_param_config where paramKey='upper_server_ip'"); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 if(config!=null&&config.get("paramValue")!=null) |  |  |  |                 if (config != null && config.get("paramValue") != null) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     host = config.get("paramValue").toString(); |  |  |  |                     host = config.get("paramValue").toString(); | 
			
		
	
		
		
			
				
					
					|  |  |  |             } catch (Exception ex) { |  |  |  |             } catch (Exception ex) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(StringUtils.isEmpty(host)) |  |  |  |         if (StringUtils.isEmpty(host)) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(9999,"上传地址未配置,请至同步设置中进行设置"); |  |  |  |             return ResultVOUtils.error(9999, "上传地址未配置,请至同步设置中进行设置"); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         if(list!=null) { |  |  |  |         if (list != null) { | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             String filePathSlash = filePath.substring(filePath.length() - 1).equals("/") ? "" : "/"; |  |  |  |             String filePathSlash = filePath.substring(filePath.length() - 1).equals("/") ? "" : "/"; | 
			
		
	
		
		
			
				
					
					|  |  |  |             ArrayList<String> files = new ArrayList<>(); |  |  |  |             ArrayList<String> files = new ArrayList<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |             boolean isExists = true; |  |  |  |             boolean isExists = true; | 
			
		
	
		
		
			
				
					
					|  |  |  |             List<String> noExitsList = new ArrayList<>(); |  |  |  |             List<String> noExitsList = new ArrayList<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |             for(String strs:list) { |  |  |  |             for (String strs : list) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 String[] str = strs.split(","); |  |  |  |                 String[] str = strs.split(","); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 for(String s:str) { |  |  |  |                 for (String s : str) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     if (!StringUtils.isEmpty(s) && FileUtils.isFileExist(filePath + filePathSlash + imagePath + s)) { |  |  |  |                     if (!StringUtils.isEmpty(s) && FileUtils.isFileExist(filePath + filePathSlash + imagePath + s)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                         files.add(filePath + filePathSlash + imagePath + s); |  |  |  |                         files.add(filePath + filePathSlash + imagePath + s); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } else { |  |  |  |                     } else { | 
			
		
	
	
		
		
			
				
					|  |  | @ -112,24 +114,23 @@ public class FileServiceImpl implements FileService { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |             if(!isExists) |  |  |  |             if (!isExists) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 return ResultVOUtils.error(9999,"以下文件不存在:\n"+JSON.toJSONString(noExitsList)); |  |  |  |                 return ResultVOUtils.error(9999, "以下文件不存在:\n" + JSON.toJSONString(noExitsList)); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             String result = relayFile(files,host); |  |  |  |             String result = relayFile(files, host); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             if (IDCUtils.isJson(result)) { |  |  |  |             if (IDCUtils.isJson(result)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 BaseResponse baseResponse = JSON.parseObject(result,BaseResponse.class); |  |  |  |                 BaseResponse baseResponse = JSON.parseObject(result, BaseResponse.class); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 return baseResponse; |  |  |  |                 return baseResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         return ResultVOUtils.error(9999,"失败"); |  |  |  |         return ResultVOUtils.error(9999, "失败"); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |      |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Override |  |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse fileDownload(HttpServletRequest request,Map<String,Object> params) { |  |  |  |     public BaseResponse fileDownload(HttpServletRequest request, Map<String, Object> params) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         List<String> list = new ArrayList<>(); |  |  |  |         List<String> list = new ArrayList<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String[] strs = params.get("fileName").toString().split(","); |  |  |  |         String[] strs = params.get("fileName").toString().split(","); | 
			
		
	
		
		
			
				
					
					|  |  |  |         for(String str:strs) { |  |  |  |         for (String str : strs) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             list.add(str); |  |  |  |             list.add(str); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         return fileToDownload(list); |  |  |  |         return fileToDownload(list); | 
			
		
	
	
		
		
			
				
					|  |  | @ -137,62 +138,68 @@ public class FileServiceImpl implements FileService { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     private BaseResponse fileToDownload(List<String> list) { |  |  |  |     private BaseResponse fileToDownload(List<String> list) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         Map<String,Object> params = new HashMap<String,Object>(); |  |  |  |         Map<String, Object> params = new HashMap<String, Object>(); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         String fileName = ""; |  |  |  |         String fileName = ""; | 
			
		
	
		
		
			
				
					
					|  |  |  |         for(String str:list) { |  |  |  |         for (String str : list) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             fileName +=fileName.length()>0 ? ","+str : str; |  |  |  |             fileName += fileName.length() > 0 ? "," + str : str; | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         params.put("fileName", fileName); |  |  |  |         params.put("fileName", fileName); | 
			
		
	
		
		
			
				
					
					|  |  |  |         Map<String, Object> map = dbDao.get("select * from sync_data_set limit 1"); |  |  |  |         Map<String, Object> map = dbDao.get("select * from sync_data_set limit 1"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(map!=null&&map.get("syncIp")!=null) { |  |  |  |         if (map != null && map.get("syncIp") != null) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             String result = IDCUtils.post(map.get("syncIp").toString()+"/spssync/file/downloadFile", params); |  |  |  |             String result = IDCUtils.post(map.get("syncIp").toString() + "/spssync/file/downloadFile", params); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             boolean success = false; |  |  |  |             boolean success = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |             if(IDCUtils.isJson(result)) { |  |  |  |             if (IDCUtils.isJson(result)) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 JSONObject object = JSON.parseObject(result); |  |  |  |                 JSONObject object = JSON.parseObject(result); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if(object.getInteger("code")==20000) { |  |  |  |                 if (object.getInteger("code") == 20000) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     String[] files = params.get("fileName").toString().split(","); |  |  |  |                     String[] files = params.get("fileName").toString().split(","); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     success = true; |  |  |  |                     success = true; | 
			
		
	
		
		
			
				
					
					|  |  |  |                     for(String str:files) { |  |  |  |                     for (String str : files) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         if(!idcService.signleDownloadFile(map.get("syncIp").toString(), str)) |  |  |  |                         if (!idcService.signleDownloadFile(map.get("syncIp").toString(), str)) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                             success = false; |  |  |  |                             success = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |             if(!success) |  |  |  |             if (!success) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 return ResultVOUtils.error(9999,"失败"); |  |  |  |                 return ResultVOUtils.error(9999, "失败"); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         } else { |  |  |  |         } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |             return ResultVOUtils.error(9999,"中继服务地址未配置,请至同步设置中进行配置"); |  |  |  |             return ResultVOUtils.error(9999, "中继服务地址未配置,请至同步设置中进行配置"); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         return ResultVOUtils.success(null); |  |  |  |         return ResultVOUtils.success(null); | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Override |  |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse receiveFile(HttpServletRequest request,String content,MultipartFile[] files) { |  |  |  |     public BaseResponse receiveFile(HttpServletRequest request, String content, MultipartFile[] files) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         boolean isRelay = false; |  |  |  |         boolean isRelay = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |         String filePathSlash = filePath.substring(filePath.length() - 1).equals("/") ? "" : "/"; |  |  |  |         String filePathSlash = filePath.substring(filePath.length() - 1).equals("/") ? "" : "/"; | 
			
		
	
		
		
			
				
					
					|  |  |  |         String host = ""; |  |  |  |         String host = ""; | 
			
		
	
		
		
			
				
					
					|  |  |  |         try { |  |  |  |         try { | 
			
		
	
		
		
			
				
					
					|  |  |  |             Map<String,Object> config =dbDao.get("select paramValue from system_param_config where paramKey='upper_server_ip'"); |  |  |  |             Map<String, Object> config = dbDao.get("select paramValue from system_param_config where paramKey='upper_server_ip'"); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             if(config!=null&&config.get("paramValue")!=null) { |  |  |  |             if (config != null && config.get("paramValue") != null) { | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 isRelay = true; |  |  |  |                 isRelay = true; | 
			
		
	
		
		
			
				
					
					|  |  |  |                 host = config.get("paramValue").toString(); |  |  |  |                 host = config.get("paramValue").toString(); | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         } catch (Exception ex) { |  |  |  |         } catch (Exception ex) { | 
			
		
	
		
		
			
				
					
					|  |  |  |              |  |  |  |             ex.printStackTrace(); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         ArrayList<String> saveFiles = new ArrayList<>(); |  |  |  |         ArrayList<String> saveFiles = new ArrayList<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         Date startTime = new Date(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (files != null) { |  |  |  |         if (files != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |             if(!FileUtils.makeDirectory(filePath + filePathSlash + imagePath)) |  |  |  |             if (!FileUtils.makeDirectory(filePath + filePathSlash + imagePath)) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 IDCUtils.createDirectory(filePath + filePathSlash + imagePath); |  |  |  |                 IDCUtils.createDirectory(filePath + filePathSlash + imagePath); | 
			
		
	
		
		
			
				
					
					|  |  |  |             try { |  |  |  |             try { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 for (MultipartFile file : files) { |  |  |  |                 for (MultipartFile file : files) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     String imageName = filePath + filePathSlash + imagePath + file.getOriginalFilename(); |  |  |  |                     String flodPath; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     if (file.getName().contains(".jrxml") || file.getName().contains(".jasper")) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         flodPath = pdfPath; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         flodPath = imagePath; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     String imageName = filePath + filePathSlash + flodPath + file.getOriginalFilename(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     saveFiles.add(imageName); |  |  |  |                     saveFiles.add(imageName); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     IDCUtils.writeFile(file.getBytes(), filePath + filePathSlash + imagePath, file.getOriginalFilename()); |  |  |  |                     IDCUtils.writeFile(file.getBytes(), filePath + filePathSlash + flodPath, file.getOriginalFilename()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |             } catch (IOException e) { |  |  |  |             } catch (IOException e) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 // TODO Auto-generated catch block
 |  |  |  |                 // TODO Auto-generated catch block
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -204,14 +211,14 @@ public class FileServiceImpl implements FileService { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(isRelay) { |  |  |  |         if (isRelay) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             String result = relayFile(saveFiles,host); |  |  |  |             String result = relayFile(saveFiles, host); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             logger.info(result); |  |  |  |             logger.info(result); | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (IDCUtils.isJson(result)&&!result.contains("<html")) { |  |  |  |             if (IDCUtils.isJson(result) && !result.contains("<html")) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 BaseResponse baseResponse = JSON.parseObject(result,BaseResponse.class); |  |  |  |                 BaseResponse baseResponse = JSON.parseObject(result, BaseResponse.class); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 return baseResponse; |  |  |  |                 return baseResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  |             } else { |  |  |  |             } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 return ResultVOUtils.error(9999,"上传失败"); |  |  |  |                 return ResultVOUtils.error(9999, "上传失败"); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         return ResultVOUtils.success(null); |  |  |  |         return ResultVOUtils.success(null); | 
			
		
	
	
		
		
			
				
					|  |  | @ -272,29 +279,29 @@ public class FileServiceImpl implements FileService { | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Override |  |  |  |     @Override | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse downloadFile(HttpServletRequest request,Map<String,Object> params) { |  |  |  |     public BaseResponse downloadFile(HttpServletRequest request, Map<String, Object> params) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         String host = ""; |  |  |  |         String host = ""; | 
			
		
	
		
		
			
				
					
					|  |  |  |         try { |  |  |  |         try { | 
			
		
	
		
		
			
				
					
					|  |  |  |             Map<String,Object> config =dbDao.get("select paramValue from system_param_config where paramKey='upper_server_ip'"); |  |  |  |             Map<String, Object> config = dbDao.get("select paramValue from system_param_config where paramKey='upper_server_ip'"); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             if(config!=null&&config.get("paramValue")!=null) |  |  |  |             if (config != null && config.get("paramValue") != null) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 host = config.get("paramValue").toString(); |  |  |  |                 host = config.get("paramValue").toString(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         } catch (Exception ex) { |  |  |  |         } catch (Exception ex) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(!StringUtils.isEmpty(host)) { |  |  |  |         if (!StringUtils.isEmpty(host)) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             String result = IDCUtils.post(host+"/spssync/file/downloadFile", params);  |  |  |  |             String result = IDCUtils.post(host + "/spssync/file/downloadFile", params); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             JSONObject object = JSON.parseObject(result); |  |  |  |             JSONObject object = JSON.parseObject(result); | 
			
		
	
		
		
			
				
					
					|  |  |  |             boolean success = false; |  |  |  |             boolean success = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |             if(object.getInteger("code")==20000) { |  |  |  |             if (object.getInteger("code") == 20000) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 String[] files = params.get("fileName").toString().split(","); |  |  |  |                 String[] files = params.get("fileName").toString().split(","); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 success = true; |  |  |  |                 success = true; | 
			
		
	
		
		
			
				
					
					|  |  |  |                 for(String str:files) { |  |  |  |                 for (String str : files) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     if(!idcService.signleDownloadFile(host, str)) |  |  |  |                     if (!idcService.signleDownloadFile(host, str)) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                         success = false; |  |  |  |                         success = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |             if(!success) |  |  |  |             if (!success) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 ResultVOUtils.error(9999,"失败");    |  |  |  |                 ResultVOUtils.error(9999, "失败"); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |         return ResultVOUtils.success(null); |  |  |  |         return ResultVOUtils.success(null); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |