|  |  | @ -426,4 +426,40 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl<IcTripReportR | 
			
		
	
		
			
				
					|  |  |  |             baseDao.insert(e); | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     public IcTripReportRecordDTO detail(PageTripReportFormDTO formDTO) { | 
			
		
	
		
			
				
					|  |  |  |         //1.获取工作人员缓存信息
 | 
			
		
	
		
			
				
					|  |  |  |         CustomerStaffInfoCacheResult staffInfo = queryCurrentStaff(formDTO.getCustomerId(), formDTO.getUserId()); | 
			
		
	
		
			
				
					|  |  |  |         formDTO.setAgencyId(staffInfo.getAgencyId()); | 
			
		
	
		
			
				
					|  |  |  |         //2.按条件查询业务数据
 | 
			
		
	
		
			
				
					|  |  |  |         List<IcTripReportRecordDTO> list = baseDao.pageList(formDTO); | 
			
		
	
		
			
				
					|  |  |  |         if (CollectionUtils.isEmpty(list)) { | 
			
		
	
		
			
				
					|  |  |  |             return null; | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         //3.查询最近一次通知时间、核算检测关注名单
 | 
			
		
	
		
			
				
					|  |  |  |         Map<String, Date> latestNotice = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  |         List<String> gzIdCardList = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  |         List<String> idCardList = list.stream().map(m -> m.getIdCard()).distinct().collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  |         //如果不分页可能会有很多个身份证号
 | 
			
		
	
		
			
				
					|  |  |  |         List<List<String>> partionList = ListUtils.partition(idCardList, NumConstant.ONE_HUNDRED); | 
			
		
	
		
			
				
					|  |  |  |         partionList.forEach(l -> { | 
			
		
	
		
			
				
					|  |  |  |             Map<String, Date> map = icNoticeService.getUserLatestNoticeTime(formDTO.getCustomerId(), l); | 
			
		
	
		
			
				
					|  |  |  |             List<String> gzIdCards = epidemicSpecialAttentionService.getHeSuanIdCardList(formDTO.getCustomerId(), l); | 
			
		
	
		
			
				
					|  |  |  |             latestNotice.putAll(map); | 
			
		
	
		
			
				
					|  |  |  |             gzIdCardList.addAll(gzIdCards); | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |         for (IcTripReportRecordDTO dto : list) { | 
			
		
	
		
			
				
					|  |  |  |             //默认未加入
 | 
			
		
	
		
			
				
					|  |  |  |             dto.setHeSuanCheck(false); | 
			
		
	
		
			
				
					|  |  |  |             dto.setHeSuanCheckDesc("未加入"); | 
			
		
	
		
			
				
					|  |  |  |             if (CollectionUtils.isNotEmpty(gzIdCardList) && gzIdCardList.contains(dto.getIdCard())) { | 
			
		
	
		
			
				
					|  |  |  |                 dto.setHeSuanCheck(true); | 
			
		
	
		
			
				
					|  |  |  |                 dto.setHeSuanCheckDesc("已加入"); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             if (MapUtils.isNotEmpty(latestNotice) && latestNotice.containsKey(dto.getIdCard())) { | 
			
		
	
		
			
				
					|  |  |  |                 dto.setLatestNoticeTime(latestNotice.get(dto.getIdCard())); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         return list.get(NumConstant.ZERO); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
	
		
			
				
					|  |  | 
 |