|  |  | @ -63,6 +63,7 @@ import com.epmet.dto.result.demand.IcResiDemandDictDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.demand.OptionDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.resi.IcResiNonDynamicResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.resi.ResiPortrayalDetailDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.resi.ResiPortrayalResult; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.resi.ResiPortrayalResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.enums.RenHuConditionEnum; | 
			
		
	
	
		
			
				
					|  |  | @ -3914,7 +3915,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
			
		
	
		
			
				
					|  |  |  |      * @return | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     public List<ResiPortrayalResultDTO> queryAgeDistribute(String customerId,String staffId,String orgId, String orgType) { | 
			
		
	
		
			
				
					|  |  |  |     public ResiPortrayalResult queryAgeDistribute(String customerId, String staffId, String orgId, String orgType) { | 
			
		
	
		
			
				
					|  |  |  |         ResiPortrayalResult result=new ResiPortrayalResult(); | 
			
		
	
		
			
				
					|  |  |  |         if (StringUtils.isBlank(orgId)) { | 
			
		
	
		
			
				
					|  |  |  |             orgId = CustomerStaffRedis.getStaffInfo(customerId, staffId).getAgencyId(); | 
			
		
	
		
			
				
					|  |  |  |             orgType = OrgTypeEnum.AGENCY.getCode(); | 
			
		
	
	
		
			
				
					|  |  | @ -3926,15 +3928,21 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
			
		
	
		
			
				
					|  |  |  |         List<ResiPortrayalResultDTO> resultList=getDefaultAgeDistribute(); | 
			
		
	
		
			
				
					|  |  |  |         List<ResiPortrayalResultDTO> list=baseDao.selectAgeAgeDistribute(customerId,orgId,orgType,orgIdPath); | 
			
		
	
		
			
				
					|  |  |  |         if(CollectionUtils.isEmpty(list)){ | 
			
		
	
		
			
				
					|  |  |  |             return resultList; | 
			
		
	
		
			
				
					|  |  |  |             result.setTotal(NumConstant.ZERO); | 
			
		
	
		
			
				
					|  |  |  |             result.setList(resultList); | 
			
		
	
		
			
				
					|  |  |  |             return result; | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         Map<String,Integer> resultMap = list.stream().collect(Collectors.toMap(ResiPortrayalResultDTO::getCode,ResiPortrayalResultDTO::getTotalResi)); | 
			
		
	
		
			
				
					|  |  |  |         resultList.forEach(result->{ | 
			
		
	
		
			
				
					|  |  |  |             if (MapUtils.isNotEmpty(resultMap) && resultMap.containsKey(result.getCode())) { | 
			
		
	
		
			
				
					|  |  |  |                 result.setTotalResi(resultMap.get(result.getCode())); | 
			
		
	
		
			
				
					|  |  |  |         int total=NumConstant.ZERO; | 
			
		
	
		
			
				
					|  |  |  |         for(ResiPortrayalResultDTO resultDto:resultList){ | 
			
		
	
		
			
				
					|  |  |  |             if (MapUtils.isNotEmpty(resultMap) && resultMap.containsKey(resultDto.getCode())) { | 
			
		
	
		
			
				
					|  |  |  |                 resultDto.setTotalResi(resultMap.get(resultDto.getCode())); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |         return resultList; | 
			
		
	
		
			
				
					|  |  |  |             total+=resultDto.getTotalResi(); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         result.setTotal(total); | 
			
		
	
		
			
				
					|  |  |  |         result.setList(resultList); | 
			
		
	
		
			
				
					|  |  |  |         return result; | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     private List<ResiPortrayalResultDTO> getDefaultAgeDistribute() { | 
			
		
	
	
		
			
				
					|  |  | @ -3978,7 +3986,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
			
		
	
		
			
				
					|  |  |  |      * @return | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     public List<ResiPortrayalResultDTO> queryEducationDistribute(String customerId, String staffId, String orgId, String orgType) { | 
			
		
	
		
			
				
					|  |  |  |     public ResiPortrayalResult queryEducationDistribute(String customerId, String staffId, String orgId, String orgType) { | 
			
		
	
		
			
				
					|  |  |  |         ResiPortrayalResult result=new ResiPortrayalResult(); | 
			
		
	
		
			
				
					|  |  |  |         if (StringUtils.isBlank(orgId)) { | 
			
		
	
		
			
				
					|  |  |  |             orgId = CustomerStaffRedis.getStaffInfo(customerId, staffId).getAgencyId(); | 
			
		
	
		
			
				
					|  |  |  |             orgType = OrgTypeEnum.AGENCY.getCode(); | 
			
		
	
	
		
			
				
					|  |  | @ -3998,17 +4007,21 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi | 
			
		
	
		
			
				
					|  |  |  |         List<ResiPortrayalResultDTO> totalList = baseDao.queryEducationDistribute(customerId, orgId, orgType,orgIdPath); | 
			
		
	
		
			
				
					|  |  |  |         Map<String,Integer> map = totalList.stream().collect(Collectors.toMap(ResiPortrayalResultDTO::getCode,ResiPortrayalResultDTO::getTotalResi)); | 
			
		
	
		
			
				
					|  |  |  |         List<ResiPortrayalResultDTO> resultDTOList = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  |         dictResult.getData().forEach(dict -> { | 
			
		
	
		
			
				
					|  |  |  |         int total=NumConstant.ZERO; | 
			
		
	
		
			
				
					|  |  |  |         for (DictListResultDTO dict : dictResult.getData()) { | 
			
		
	
		
			
				
					|  |  |  |             ResiPortrayalResultDTO resultDTO = new ResiPortrayalResultDTO(); | 
			
		
	
		
			
				
					|  |  |  |             resultDTO.setCode(dict.getValue()); | 
			
		
	
		
			
				
					|  |  |  |             resultDTO.setCodeName(dict.getLabel()); | 
			
		
	
		
			
				
					|  |  |  |             resultDTO.setTotalResi(NumConstant.ZERO); | 
			
		
	
		
			
				
					|  |  |  |             if(MapUtils.isNotEmpty(map)&&map.containsKey(dict.getValue())){ | 
			
		
	
		
			
				
					|  |  |  |             if (MapUtils.isNotEmpty(map) && map.containsKey(dict.getValue())) { | 
			
		
	
		
			
				
					|  |  |  |                 resultDTO.setTotalResi(map.get(dict.getValue())); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             resultDTOList.add(resultDTO); | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |         return resultDTOList; | 
			
		
	
		
			
				
					|  |  |  |             total += resultDTO.getTotalResi(); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         result.setTotal(total); | 
			
		
	
		
			
				
					|  |  |  |         result.setList(resultDTOList); | 
			
		
	
		
			
				
					|  |  |  |         return result; | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | 
 |