|  |  |  | @ -186,6 +186,7 @@ public class PreDataInfoServiceImpl implements IPreDataInfoService { | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		//TODO 去掉 已经导入的系统。。(例如 excel反复导入)
 | 
			
		
	
		
			
				
					|  |  |  |  | 		//在 pre_data_info表中 新增 操作为(新增信息系统)的系统
 | 
			
		
	
		
			
				
					|  |  |  |  | 		all2Insert = removeRepeat(all2Insert); | 
			
		
	
		
			
				
					|  |  |  |  | 		if (all2Insert.size() > 0) { | 
			
		
	
		
			
				
					|  |  |  |  | 			preDataInfoDao.insertBatch(all2Insert); | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
	
		
			
				
					|  |  |  | @ -217,6 +218,7 @@ public class PreDataInfoServiceImpl implements IPreDataInfoService { | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		//TODO 去掉 已经导入的系统。。(例如 excel反复导入)
 | 
			
		
	
		
			
				
					|  |  |  |  | 		//在 pre_data_info表中 新增 操作为(新增行政区划)的系统
 | 
			
		
	
		
			
				
					|  |  |  |  | 		allAreaInsert = removeRepeat(allAreaInsert); | 
			
		
	
		
			
				
					|  |  |  |  | 		if (allAreaInsert.size() > 0) { | 
			
		
	
		
			
				
					|  |  |  |  | 			preDataInfoDao.insertBatch(allAreaInsert); | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
	
		
			
				
					|  |  |  | @ -444,4 +446,29 @@ public class PreDataInfoServiceImpl implements IPreDataInfoService { | 
			
		
	
		
			
				
					|  |  |  |  | 		return pathStandard; | 
			
		
	
		
			
				
					|  |  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  |  | 	 | 
			
		
	
		
			
				
					|  |  |  |  | 	/** 新增系统时,去掉系统已存在的  新增操作里的 | 
			
		
	
		
			
				
					|  |  |  |  | 	 * @param allAreaInsert | 
			
		
	
		
			
				
					|  |  |  |  | 	 * @throws Exception | 
			
		
	
		
			
				
					|  |  |  |  | 	 */ | 
			
		
	
		
			
				
					|  |  |  |  | 	private List<PreDataInfo> removeRepeat(List<PreDataInfo> allAreaInsert) throws Exception { | 
			
		
	
		
			
				
					|  |  |  |  | 		Map<String, PreDataInfo> excelAdd = new HashMap<String, PreDataInfo>(); | 
			
		
	
		
			
				
					|  |  |  |  | 		List<PreDataInfo> allResult = new ArrayList<PreDataInfo>(); | 
			
		
	
		
			
				
					|  |  |  |  | 		//系统已存在的 系统
 | 
			
		
	
		
			
				
					|  |  |  |  | 		List<PreDataInfo> sysInDataBase = preDataInfoDao.findAll(); | 
			
		
	
		
			
				
					|  |  |  |  | 		Map<String, String> sysInDataBaseMap = new HashMap<String, String>(); | 
			
		
	
		
			
				
					|  |  |  |  | 		for (PreDataInfo preDataInfo : sysInDataBase) { | 
			
		
	
		
			
				
					|  |  |  |  | 			sysInDataBaseMap.put(preDataInfo.getAreaCode()+"_"+preDataInfo.getSysName().trim(), null); | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		//本次新增的系统
 | 
			
		
	
		
			
				
					|  |  |  |  | 		for (PreDataInfo pre : allAreaInsert) { | 
			
		
	
		
			
				
					|  |  |  |  | 			excelAdd.put(pre.getAreaCode()+"_"+pre.getSysName().trim(), pre); | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		for (String key : excelAdd.keySet()) { | 
			
		
	
		
			
				
					|  |  |  |  | 			if (!sysInDataBaseMap.containsKey(key)) { | 
			
		
	
		
			
				
					|  |  |  |  | 				allResult.add(excelAdd.get(key)); | 
			
		
	
		
			
				
					|  |  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  |  | 		return allResult; | 
			
		
	
		
			
				
					|  |  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  |  | 	 | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |