| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -270,7 +270,9 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(buildingGeneralDTO.getGridId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (null == gridInfo){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException("查询网格失败..."); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                nums.add(num); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                disposeErrorMsg(info, ImportErrorMsgConstants.HOUSE_ERROR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 排除 1、小区名不一样&&楼栋名一样 2、网格名不一样&&小区名一样&&楼名一样 3、组织名不一样&&网格名一样&&小区名一样&&楼名一样
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if ((!buildingGeneralDTO.getNeighborHoodName().equals(dto.getNeighborHoodName()) && buildingGeneralDTO.getBuildingName().equals(dto.getBuildingName())) | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -286,7 +288,9 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setAgencyId(buildingGeneralDTO.getAgencyId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(dto.getAgencyId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (null == agencyInfo){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException("查询组织信息失败..."); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                nums.add(num); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                disposeErrorMsg(info, ImportErrorMsgConstants.HOUSE_ERROR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setPid(agencyInfo.getPid()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setPids(agencyInfo.getPids()); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -322,7 +326,9 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(neighborHoodGeneralDTO.getGridId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (null == gridInfo){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException("查询网格失败..."); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                nums.add(num); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                disposeErrorMsg(info, ImportErrorMsgConstants.HOUSE_ERROR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 1.排除网格名不一样但小区名一样 2.排除组织不一样,网格一样,小区一样
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if ((!gridInfo.getGridName().equals(dto.getGridName()) && neighborHoodGeneralDTO.getNeighborHoodName().equals(dto.getNeighborHoodName())) || | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -336,7 +342,9 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setAgencyId(neighborHoodGeneralDTO.getAgencyId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(dto.getAgencyId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (null == agencyInfo){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException("查询组织信息失败..."); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                nums.add(num); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                disposeErrorMsg(info, ImportErrorMsgConstants.HOUSE_ERROR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setPid(agencyInfo.getPid()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setPids(agencyInfo.getPids()); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -355,7 +363,9 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        gridName = null == gridName ? icBuildingDao.selectGridNameById(formDTO.getOrgId()) : gridName; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(formDTO.getOrgId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (null == gridInfo){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new EpmetException("查询网格失败..."); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            nums.add(num); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            disposeErrorMsg(info, ImportErrorMsgConstants.HOUSE_ERROR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //排除不是本网格的 gridName不一样排除,gridName一样但是agencyName不一样也得排除
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (dto.getGridName().compareTo(gridName) != 0 || (!dto.getAgencyName().equals(gridInfo.getAgencyName()) && dto.getGridName().equals(gridName))){ | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -367,7 +377,9 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setAgencyId(gridInfo.getPid()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(dto.getAgencyId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (null == agencyInfo){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException("查询组织信息失败..."); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                nums.add(num); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                disposeErrorMsg(info, ImportErrorMsgConstants.HOUSE_ERROR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setPid(agencyInfo.getPid()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setPids(agencyInfo.getPids()); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -408,7 +420,9 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setAgencyId(formDTO.getOrgId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(dto.getAgencyId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (null == agencyInfo){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException("查询组织信息失败..."); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                nums.add(num); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                disposeErrorMsg(info, ImportErrorMsgConstants.HOUSE_ERROR); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                return; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setPid(agencyInfo.getPid()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dto.setPids(agencyInfo.getPids()); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -541,6 +555,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    String s = neighborHoodService.orgGeneralImport(errorInfos, HouseErrorInfoModel.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    input.setResultDescFilePath(s); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } catch (IOException e) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    epmetCommonServiceOpenFeignClient.finishImportTask(input); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    e.printStackTrace(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |