| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -3351,4 +3351,65 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<IcResiNonDynamicResultDTO> list = baseDao.selectList(query).stream().map((e) -> ConvertUtils.sourceToTarget(e, IcResiNonDynamicResultDTO.class)).collect(Collectors.toList()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return new PageData<IcResiNonDynamicResultDTO>(list, new PageInfo<>(list).getTotal(), pageSize); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public PageData<SearchByNameResultDTO> icUserStatisList(UserChartFormDTO formDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //1.判断入参是否有值,没有值则赋值当前工作人员缓存中所属组织信息
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (StringUtils.isEmpty(formDTO.getOrgId())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //2.获取工作人员缓存信息
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (null == staffInfo) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            formDTO.setOrgId(staffInfo.getAgencyId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            formDTO.setOrgType("agency"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //获取无效组织网格Id列表
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if("agency".equals(formDTO.getOrgType())){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //查询组织数据时排除掉当前组织及下级无效组织列表
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            Result<DelAgencyGridIdResultDTO> result = govOrgOpenFeignClient.getDelAgencyGridIdList(formDTO.getOrgId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (!result.success()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                throw new EpmetException(String.format("获取当前组织及下级已删除组织、网格列表失败,组织Id->%s", formDTO.getUserId())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            formDTO.setAgencyIdList(result.getData().getAgencyIdList()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            formDTO.setGridIdList(result.getData().getGridIdList()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2.按条件查询业务数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<SearchByNameResultDTO> list = baseDao.icUserStatisList(formDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (CollectionUtils.isEmpty(list)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            return new PageData<SearchByNameResultDTO>(new ArrayList<>(), NumConstant.ZERO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //3.封装数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //查询小区,楼号,网格
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Result<List<AllGridsByUserIdResultDTO>> gridResult = govOrgOpenFeignClient.getGridListByGridIds(list.stream().map(SearchByNameResultDTO::getGridId).collect(Collectors.toList())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (!gridResult.success()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new RenException(gridResult.getCode(), gridResult.getMsg()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Map<String, String> gridMap = gridResult.getData().stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, AllGridsByUserIdResultDTO::getGridName)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Result<List<IcNeighborHoodDTO>> neighborHoodResult = govOrgOpenFeignClient.getListByIds(list.stream().map(SearchByNameResultDTO::getNeighborHoodId).collect(Collectors.toList())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (!neighborHoodResult.success()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new RenException(neighborHoodResult.getCode(), neighborHoodResult.getMsg()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Map<String, String> neighborHoodMap = neighborHoodResult.getData().stream().collect(Collectors.toMap(IcNeighborHoodDTO::getId, IcNeighborHoodDTO::getNeighborHoodName)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Result<List<BuildingResultDTO>> buildResult = govOrgOpenFeignClient.buildingListByIds(list.stream().map(SearchByNameResultDTO::getBuildId).collect(Collectors.toList())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (!buildResult.success()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new RenException(buildResult.getCode(), buildResult.getMsg()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Map<String, String> buildMap = buildResult.getData().stream().collect(Collectors.toMap(BuildingResultDTO::getBuildingId, BuildingResultDTO::getBuildingName)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AtomicInteger i = new AtomicInteger(NumConstant.ONE); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        list.forEach(item -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            item.setGridName(gridMap.get(item.getGridId())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            item.setNeighborHoodName(neighborHoodMap.get(item.getNeighborHoodId())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            item.setBuildNum(buildMap.get(item.getBuildId())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            item.setSort(i.getAndIncrement()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        PageInfo<SearchByNameResultDTO> pageInfo = new PageInfo<>(list); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return new PageData<>(list, pageInfo.getTotal()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
				 | 
				
					
  |