|  |  |  | @ -203,7 +203,7 @@ public class IdcServiceImpl implements IdcService { | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |      | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     private void fetchFailFile(String host) { | 
			
		
	
		
			
				
					|  |  |  |  |         Map<String,Object> map = new HashMap<String,Object>(); | 
			
		
	
		
			
				
					|  |  |  |  |         map.put("sql", "select * from idc_file where createTime<date_sub(now(),interval 30 minute) order by createTime"); | 
			
		
	
	
		
			
				
					|  |  |  | @ -579,7 +579,7 @@ public class IdcServiceImpl implements IdcService { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         Map<String, Object> whereParams = new HashMap<String, Object>(); | 
			
		
	
		
			
				
					|  |  |  |  |         whereParams.put("sqlWhere", params.get("sqlWhere")); | 
			
		
	
		
			
				
					|  |  |  |  |          | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         String dataWhere  = params.get("dataWhere")!=null ? params.get("dataWhere").toString() : ""; | 
			
		
	
		
			
				
					|  |  |  |  |         Map<String, Object> map = new HashMap<String, Object>(); | 
			
		
	
		
			
				
					|  |  |  |  |         String where = DBAUtils.convertWhere(column, whereParams, dataWhere); | 
			
		
	
	
		
			
				
					|  |  |  | @ -811,7 +811,7 @@ public class IdcServiceImpl implements IdcService { | 
			
		
	
		
			
				
					|  |  |  |  |     private boolean analyToDB(String host, String tableName, String uniqueColumn, String | 
			
		
	
		
			
				
					|  |  |  |  |             filePathColumn, List<Map<String, Object>> list, boolean isUpload) { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |          | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         String tName = DBAUtils.tableRealName(tableName); | 
			
		
	
		
			
				
					|  |  |  |  |         String sql = "replace " + tName + "("; | 
			
		
	
		
			
				
					|  |  |  |  |         String del = "delete from " + tName + " where "; | 
			
		
	
	
		
			
				
					|  |  |  | @ -1034,27 +1034,27 @@ public class IdcServiceImpl implements IdcService { | 
			
		
	
		
			
				
					|  |  |  |  |             int total = 0; | 
			
		
	
		
			
				
					|  |  |  |  |             if (result!=null&&result.isSuccessful()&&MediaType.parse("application/force-download").equals(result.body().contentType())) { | 
			
		
	
		
			
				
					|  |  |  |  |                 try (InputStream inputStream = result.body().byteStream()) { | 
			
		
	
		
			
				
					|  |  |  |  |                     | 
			
		
	
		
			
				
					|  |  |  |  |                          | 
			
		
	
		
			
				
					|  |  |  |  |      | 
			
		
	
		
			
				
					|  |  |  |  |                         FileOutputStream outputStream = new FileOutputStream(filePath + filePathSlash + imagePath+fileName); | 
			
		
	
		
			
				
					|  |  |  |  |      | 
			
		
	
		
			
				
					|  |  |  |  |                         byte b[] = new byte[1024]; | 
			
		
	
		
			
				
					|  |  |  |  |      | 
			
		
	
		
			
				
					|  |  |  |  |                         int len = 0; | 
			
		
	
		
			
				
					|  |  |  |  |                         while ((len = inputStream.read(b)) != -1) { | 
			
		
	
		
			
				
					|  |  |  |  |                             total += len; | 
			
		
	
		
			
				
					|  |  |  |  |                             outputStream.write(b, 0, len); | 
			
		
	
		
			
				
					|  |  |  |  |      | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |      | 
			
		
	
		
			
				
					|  |  |  |  |                         outputStream.flush(); | 
			
		
	
		
			
				
					|  |  |  |  |                         outputStream.close(); | 
			
		
	
		
			
				
					|  |  |  |  |                         if(!(total>0)) { | 
			
		
	
		
			
				
					|  |  |  |  |                             new File(filePath + filePathSlash + imagePath+fileName).delete(); | 
			
		
	
		
			
				
					|  |  |  |  |                             executeSql("delete from idc_file where filePath='"+fileName+"'"); | 
			
		
	
		
			
				
					|  |  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |  |                  | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                     FileOutputStream outputStream = new FileOutputStream(filePath + filePathSlash + imagePath+fileName); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                     byte b[] = new byte[1024]; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                     int len = 0; | 
			
		
	
		
			
				
					|  |  |  |  |                     while ((len = inputStream.read(b)) != -1) { | 
			
		
	
		
			
				
					|  |  |  |  |                         total += len; | 
			
		
	
		
			
				
					|  |  |  |  |                         outputStream.write(b, 0, len); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                     outputStream.flush(); | 
			
		
	
		
			
				
					|  |  |  |  |                     outputStream.close(); | 
			
		
	
		
			
				
					|  |  |  |  |                     if(!(total>0)) { | 
			
		
	
		
			
				
					|  |  |  |  |                         new File(filePath + filePathSlash + imagePath+fileName).delete(); | 
			
		
	
		
			
				
					|  |  |  |  |                         executeSql("delete from idc_file where filePath='"+fileName+"'"); | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 } catch (Exception e) { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -1252,7 +1252,7 @@ public class IdcServiceImpl implements IdcService { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |      | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     private void executeSql(String sql) { | 
			
		
	
		
			
				
					|  |  |  |  |         try { | 
			
		
	
		
			
				
					|  |  |  |  |             jdbcTemplate.execute(sql); | 
			
		
	
	
		
			
				
					|  |  |  | @ -1262,5 +1262,5 @@ public class IdcServiceImpl implements IdcService { | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |      | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |