|  | @ -231,6 +231,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao | 
			
		
	
		
		
			
				
					|  |  |         result.forEach(r -> { |  |  |         result.forEach(r -> { | 
			
		
	
		
		
			
				
					|  |  |             for (InfoByNamesResultDTO g : gridInfos) { |  |  |             for (InfoByNamesResultDTO g : gridInfos) { | 
			
		
	
		
		
			
				
					|  |  |                 if (r.getGridName().equals(g.getGridName())){ |  |  |                 if (r.getGridName().equals(g.getGridName())){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     // 能查询出网格,变为true
 | 
			
		
	
		
		
			
				
					|  |  |                     r.setStatus(true); |  |  |                     r.setStatus(true); | 
			
		
	
		
		
			
				
					|  |  |                     break; |  |  |                     break; | 
			
		
	
		
		
			
				
					|  |  |                 } |  |  |                 } | 
			
		
	
	
		
		
			
				
					|  | @ -245,6 +246,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao | 
			
		
	
		
		
			
				
					|  |  |         result.forEach(r -> { |  |  |         result.forEach(r -> { | 
			
		
	
		
		
			
				
					|  |  |             for (String s : existNames) { |  |  |             for (String s : existNames) { | 
			
		
	
		
		
			
				
					|  |  |                 if (r.getNeighborHoodName().equals(s)){ |  |  |                 if (r.getNeighborHoodName().equals(s)){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     // 数据库已存在此小区名变为true
 | 
			
		
	
		
		
			
				
					|  |  |                     r.setExistNameStatus(true); |  |  |                     r.setExistNameStatus(true); | 
			
		
	
		
		
			
				
					|  |  |                     break; |  |  |                     break; | 
			
		
	
		
		
			
				
					|  |  |                 } |  |  |                 } | 
			
		
	
	
		
		
			
				
					|  | @ -267,6 +269,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao | 
			
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |             needInsert.forEach(n -> { |  |  |             needInsert.forEach(n -> { | 
			
		
	
		
		
			
				
					|  |  |                 if (agencyInfo.getOrganizationName().equals(n.getAgencyName())){ |  |  |                 if (agencyInfo.getOrganizationName().equals(n.getAgencyName())){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     // 所属组织名一样变为true
 | 
			
		
	
		
		
			
				
					|  |  |                     n.setAgencyNameStatus(true); |  |  |                     n.setAgencyNameStatus(true); | 
			
		
	
		
		
			
				
					|  |  |                 } |  |  |                 } | 
			
		
	
		
		
			
				
					|  |  |             }); |  |  |             }); | 
			
		
	
	
		
		
			
				
					|  | @ -277,6 +280,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao | 
			
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |             needInsert.forEach(n -> { |  |  |             needInsert.forEach(n -> { | 
			
		
	
		
		
			
				
					|  |  |                 if (gridInfo.getGridName().equals(n.getGridName())){ |  |  |                 if (gridInfo.getGridName().equals(n.getGridName())){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     //网格名一样变为true
 | 
			
		
	
		
		
			
				
					|  |  |                     n.setAgencyNameStatus(true); |  |  |                     n.setAgencyNameStatus(true); | 
			
		
	
		
		
			
				
					|  |  |                 } |  |  |                 } | 
			
		
	
		
		
			
				
					|  |  |             }); |  |  |             }); | 
			
		
	
	
		
		
			
				
					|  | @ -290,7 +294,24 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao | 
			
		
	
		
		
			
				
					|  |  |             String str = String.format("共%s条,成功导入%s条。",result.size(),0); |  |  |             String str = String.format("共%s条,成功导入%s条。",result.size(),0); | 
			
		
	
		
		
			
				
					|  |  |             return new Result().error(9999,str +"第"+nums.stream().map(String::valueOf).collect(Collectors.joining("、"))+"行未成功!"); |  |  |             return new Result().error(9999,str +"第"+nums.stream().map(String::valueOf).collect(Collectors.joining("、"))+"行未成功!"); | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |         List<IcNeighborHoodEntity> entities = ConvertUtils.sourceToTarget(finalNeedInsert, IcNeighborHoodEntity.class); |  |  |         Map<String, Long> collect = finalNeedInsert.stream().collect(Collectors.groupingBy(o -> o.getGridName() + "_" + o.getNeighborHoodName(), Collectors.counting())); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |         collect.forEach((k,v) -> { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             if (Integer.valueOf(v.toString()).compareTo(1) > 0){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 for (IcNeighborHoodExcel r : result) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     if (k.equals(r.getGridName()+"_"+r.getNeighborHoodName())){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                         r.setReStatus(true); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         }); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         List<IcNeighborHoodExcel> realFinalResult = new ArrayList<>(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         for (int i = NumConstant.ZERO; i < result.size(); i++) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             if (result.get(i).getStatus() == true && result.get(i).getExistNameStatus() == false && | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                     result.get(i).getAgencyNameStatus() == true && result.get(i).getReStatus() == false){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 realFinalResult.add(result.get(i)); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         List<IcNeighborHoodEntity> entities = ConvertUtils.sourceToTarget(realFinalResult, IcNeighborHoodEntity.class); | 
			
		
	
		
		
			
				
					|  |  |         entities.forEach(e -> { |  |  |         entities.forEach(e -> { | 
			
		
	
		
		
			
				
					|  |  |             for (InfoByNamesResultDTO g : gridInfos) { |  |  |             for (InfoByNamesResultDTO g : gridInfos) { | 
			
		
	
		
		
			
				
					|  |  |                 if (e.getGridName().equals(g.getGridName())){ |  |  |                 if (e.getGridName().equals(g.getGridName())){ | 
			
		
	
	
		
		
			
				
					|  | @ -306,7 +327,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         importInsert(entities); |  |  |         importInsert(entities); | 
			
		
	
		
		
			
				
					|  |  |         for (int i = NumConstant.ZERO; i < result.size(); i++) { |  |  |         for (int i = NumConstant.ZERO; i < result.size(); i++) { | 
			
		
	
		
		
			
				
					
					|  |  |             if (result.get(i).getStatus() == false || result.get(i).getExistNameStatus() == true || result.get(i).getAgencyNameStatus() == false){ |  |  |             if (result.get(i).getStatus() == false || result.get(i).getExistNameStatus() == true || result.get(i).getAgencyNameStatus() == false || result.get(i).getReStatus() == true){ | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |                 nums.add(i + NumConstant.ONE); |  |  |                 nums.add(i + NumConstant.ONE); | 
			
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
	
		
		
			
				
					|  | 
 |