|  |  | @ -32,6 +32,7 @@ import com.epmet.dao.IcStatsResiWarnDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.IcResiCategoryWarnConfigDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.IcStatsResiWarnDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.PersonWarnLeftPieDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.CustomerCategoryShowAndWarnListResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.PersonWarnLeftPieResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.IcStatsResiWarnEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.OperCustomizeOpenFeignClient; | 
			
		
	
	
		
			
				
					|  |  | @ -126,7 +127,7 @@ public class IcStatsResiWarnServiceImpl extends BaseServiceImpl<IcStatsResiWarnD | 
			
		
	
		
			
				
					|  |  |  |             throw new EpmetException(String.format("未查询到此工作人员%s",tokenDto.getUserId())); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         // 查询设置预警的分类
 | 
			
		
	
		
			
				
					|  |  |  |         Result<List<IcResiCategoryWarnConfigDTO>> listResult = operCustomizeOpenFeignClient.resiCategoryWarnList(tokenDto.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  |         Result<List<CustomerCategoryShowAndWarnListResultDTO>> listResult = operCustomizeOpenFeignClient.getCustomerCategoryShowAndWarnList(tokenDto.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  |         if (!listResult.success()){ | 
			
		
	
		
			
				
					|  |  |  |             throw new EpmetException("查询设置预警的分类失败..."); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
	
		
			
				
					|  |  | @ -134,16 +135,16 @@ public class IcStatsResiWarnServiceImpl extends BaseServiceImpl<IcStatsResiWarnD | 
			
		
	
		
			
				
					|  |  |  |         if (CollectionUtils.isEmpty(listResult.getData())){ | 
			
		
	
		
			
				
					|  |  |  |             return result; | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         List<IcResiCategoryWarnConfigDTO> configList = listResult.getData(); | 
			
		
	
		
			
				
					|  |  |  |         List<CustomerCategoryShowAndWarnListResultDTO> configList = listResult.getData(); | 
			
		
	
		
			
				
					|  |  |  |         List<PersonWarnLeftPieResultDTO.PersonWarnLeftPie> list = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  |         configList.forEach(c -> { | 
			
		
	
		
			
				
					|  |  |  |             PersonWarnLeftPieResultDTO.PersonWarnLeftPie p = new PersonWarnLeftPieResultDTO.PersonWarnLeftPie(); | 
			
		
	
		
			
				
					|  |  |  |             p.setTypeName(c.getLabel()); | 
			
		
	
		
			
				
					|  |  |  |             p.setTypeCode(c.getColumnName()); | 
			
		
	
		
			
				
					|  |  |  |             p.setConfigId(c.getId()); | 
			
		
	
		
			
				
					|  |  |  |             p.setConfigId(c.getWarnConfigId()); | 
			
		
	
		
			
				
					|  |  |  |             list.add(p); | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |         List<PersonWarnLeftPieDTO> dtos = baseDao.selectCategoryCount(configList.stream().map(m -> m.getId()).collect(Collectors.toList()), staffInfo.getAgencyId()); | 
			
		
	
		
			
				
					|  |  |  |         List<PersonWarnLeftPieDTO> dtos = baseDao.selectCategoryCount(configList.stream().map(m -> m.getWarnConfigId()).collect(Collectors.toList()), staffInfo.getAgencyId()); | 
			
		
	
		
			
				
					|  |  |  |         if (CollectionUtils.isNotEmpty(dtos)){ | 
			
		
	
		
			
				
					|  |  |  |             list.forEach(l -> dtos.stream().filter(d -> d.getConfigId().equals(l.getConfigId())).forEach(d -> l.setTypeCount(d.getCount()))); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
	
		
			
				
					|  |  | 
 |