|  |  | @ -133,23 +133,22 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode | 
			
		
	
		
			
				
					|  |  |  |                     if (k.equals(r.getBuildingUnitId()+"_"+r.getDoorName())){ | 
			
		
	
		
			
				
					|  |  |  |                         // 集合里重复的
 | 
			
		
	
		
			
				
					|  |  |  |                         if (r.getExistStatus()){ | 
			
		
	
		
			
				
					|  |  |  |                             nums.add(r.getNum()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |                         } | 
			
		
	
		
			
				
					|  |  |  |                         nums.add(r.getNum()); | 
			
		
	
		
			
				
					|  |  |  |                         r.setExistStatus(true); | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |         // 根据单元ID_doorName查询已存在的
 | 
			
		
	
		
			
				
					|  |  |  |         List<String> ids = needInsertList.stream().map(m -> m.getBuildingUnitId() + "_" + m.getDoorName()).distinct().collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  |         List<String> ids = needInsertList.stream().filter(n -> StringUtils.isNotBlank(n.getBuildingUnitId())).map(m -> m.getBuildingUnitId() + "_" + m.getDoorName()).distinct().collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  |         List<String> existHouses = icBuildingDao.selectExistHouse(ids); | 
			
		
	
		
			
				
					|  |  |  |         existHouses.forEach(e -> { | 
			
		
	
		
			
				
					|  |  |  |             for (ImportGeneralDTO n : needInsertList) { | 
			
		
	
		
			
				
					|  |  |  |                 if ((n.getBuildingUnitId()+"_"+n.getDoorName()).equals(e)){ | 
			
		
	
		
			
				
					|  |  |  |                     // 库里存在的
 | 
			
		
	
		
			
				
					|  |  |  |                     if (n.getExistStatus()){ | 
			
		
	
		
			
				
					|  |  |  |                         nums.add(n.getNum()); | 
			
		
	
		
			
				
					|  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |                     nums.add(n.getNum()); | 
			
		
	
		
			
				
					|  |  |  |                     n.setExistStatus(true); | 
			
		
	
		
			
				
					|  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
	
		
			
				
					|  |  | @ -213,7 +212,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode | 
			
		
	
		
			
				
					|  |  |  |             dto.setTotalFloorNum(buildingGeneralDTO.getTotalFloorNum()); | 
			
		
	
		
			
				
					|  |  |  |             dto.setTotalUnitNum(buildingGeneralDTO.getTotalUnitNum()); | 
			
		
	
		
			
				
					|  |  |  |             // 补充单元ID
 | 
			
		
	
		
			
				
					|  |  |  |             buildingUnitInfos = null == buildingUnitInfos ? getBuildingUnitInfos(dto.getBuildingId()) : buildingUnitInfos; | 
			
		
	
		
			
				
					|  |  |  |             buildingUnitInfos = null == buildingUnitInfos ? getBuildingUnitInfos(dto.getAgencyId()) : buildingUnitInfos; | 
			
		
	
		
			
				
					|  |  |  |             Object cacheBuildingUnit = icHouseRedis.getTemporaryCacheBuildingUnit(formDTO.getCustomerId(), formDTO.getUserId(), dto.getBuildingId() + "_" + dto.getBuildingUnit()); | 
			
		
	
		
			
				
					|  |  |  |             dto.setBuildingUnitId(null == cacheBuildingUnit ? "" : cacheBuildingUnit.toString()); | 
			
		
	
		
			
				
					|  |  |  |             if (StringUtils.isNotBlank(dto.getBuildingUnitId())){ | 
			
		
	
	
		
			
				
					|  |  | @ -349,7 +348,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode | 
			
		
	
		
			
				
					|  |  |  |             dto.setBuildingId(null == cacheBuilding ? "" : cacheBuilding.toString()); | 
			
		
	
		
			
				
					|  |  |  |             if (StringUtils.isNotBlank(dto.getBuildingId())){ | 
			
		
	
		
			
				
					|  |  |  |                 // 楼栋ID不为空赋值单元ID
 | 
			
		
	
		
			
				
					|  |  |  |                 buildingUnitInfos = null == buildingUnitInfos ? getBuildingUnitInfos(dto.getBuildingId()) : buildingUnitInfos; | 
			
		
	
		
			
				
					|  |  |  |                 buildingUnitInfos = null == buildingUnitInfos ? getBuildingUnitInfos(dto.getAgencyId()) : buildingUnitInfos; | 
			
		
	
		
			
				
					|  |  |  |                 Object cacheBuildingUnit = icHouseRedis.getTemporaryCacheBuildingUnit(formDTO.getCustomerId(), formDTO.getUserId(), dto.getBuildingId() + "_" + dto.getBuildingUnit()); | 
			
		
	
		
			
				
					|  |  |  |                 dto.setBuildingUnitId(null == cacheBuildingUnit ? "" : cacheBuildingUnit.toString()); | 
			
		
	
		
			
				
					|  |  |  |                 if (StringUtils.isNotBlank(dto.getBuildingUnitId())){ | 
			
		
	
	
		
			
				
					|  |  | @ -398,21 +397,21 @@ public class ImportHouseInfoListener extends AnalysisEventListener<HouseInfoMode | 
			
		
	
		
			
				
					|  |  |  |      * @author zxc | 
			
		
	
		
			
				
					|  |  |  |      * @date 2022/2/14 1:32 下午 | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     public Map<String,Object> getBuildingInfos(String neighborHoodId){ | 
			
		
	
		
			
				
					|  |  |  |         buildingInfoDTOs = icBuildingDao.selectAllBuildingByNeighborHoodId(neighborHoodId); | 
			
		
	
		
			
				
					|  |  |  |     public Map<String,Object> getBuildingInfos(String orgId){ | 
			
		
	
		
			
				
					|  |  |  |         buildingInfoDTOs = icBuildingDao.selectAllBuildingByNeighborHoodId(orgId); | 
			
		
	
		
			
				
					|  |  |  |         buildingInfos = buildingInfoDTOs.stream().collect(Collectors.toMap(n -> n.getNeighborHoodId() + "_" + n.getBuildingName(), n -> n.getBuildingId())); | 
			
		
	
		
			
				
					|  |  |  |         icHouseRedis.setTemporaryCacheBuilding(formDTO.getCustomerId(), buildingInfos, formDTO.getUserId()); | 
			
		
	
		
			
				
					|  |  |  |         return buildingInfos; | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |      * @Description  获取楼栋下的单元 | 
			
		
	
		
			
				
					|  |  |  |      * @param buildingId | 
			
		
	
		
			
				
					|  |  |  |      * @Description  获取组织下的单元 | 
			
		
	
		
			
				
					|  |  |  |      * @param orgId | 
			
		
	
		
			
				
					|  |  |  |      * @author zxc | 
			
		
	
		
			
				
					|  |  |  |      * @date 2022/2/14 2:04 下午 | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     public Map<String,Object> getBuildingUnitInfos(String buildingId){ | 
			
		
	
		
			
				
					|  |  |  |         buildingUnitInfoDTOs = icBuildingDao.selectAllBuildingUnitByBuildingId(buildingId); | 
			
		
	
		
			
				
					|  |  |  |     public Map<String,Object> getBuildingUnitInfos(String orgId){ | 
			
		
	
		
			
				
					|  |  |  |         buildingUnitInfoDTOs = icBuildingDao.selectAllBuildingUnitByBuildingId(orgId); | 
			
		
	
		
			
				
					|  |  |  |         if (!CollectionUtils.isEmpty(buildingUnitInfoDTOs)){ | 
			
		
	
		
			
				
					|  |  |  |             buildingUnitInfos = buildingUnitInfoDTOs.stream().collect(Collectors.toMap(n -> n.getBuildingId() + "_" + n.getBuildingUnit(), n -> n.getBuildingUnitId())); | 
			
		
	
		
			
				
					|  |  |  |             icHouseRedis.setTemporaryCacheBuildingUnit(formDTO.getCustomerId(), buildingUnitInfos, formDTO.getUserId()); | 
			
		
	
	
		
			
				
					|  |  | 
 |