|  |  | @ -13,6 +13,7 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.redis.common.bean.GridInfoCache; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.security.dto.TokenDto; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.security.user.LoginUserUtil; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.ConvertUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.DateUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.Result; | 
			
		
	
	
		
			
				
					|  |  | @ -23,7 +24,6 @@ import com.epmet.dataaggre.dto.datastats.result.FactAgencyProjectResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dataaggre.dto.govissue.IssueProjectCategoryDictDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dataaggre.dto.govissue.result.IssueInfoDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dataaggre.dto.govorg.result.GridsInfoListResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dataaggre.dto.govproject.ProjectDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dataaggre.dto.govproject.ProjectRelatedPersonnelDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dataaggre.dto.govproject.ResiEventDTO; | 
			
		
	
	
		
			
				
					|  |  | @ -80,6 +80,8 @@ public class GovProjectServiceImpl implements GovProjectService { | 
			
		
	
		
			
				
					|  |  |  | 	private EvaluationIndexService evaluationIndexService; | 
			
		
	
		
			
				
					|  |  |  | 	@Autowired | 
			
		
	
		
			
				
					|  |  |  | 	private EpmetUserService epmetUserService; | 
			
		
	
		
			
				
					|  |  |  | 	@Autowired | 
			
		
	
		
			
				
					|  |  |  | 	private LoginUserUtil loginUserUtil; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |      * @Description  查询项目信息 | 
			
		
	
	
		
			
				
					|  |  | @ -415,13 +417,13 @@ public class GovProjectServiceImpl implements GovProjectService { | 
			
		
	
		
			
				
					|  |  |  | 		formDTO.setToDateId(DateUtils.dateOrmonthId(formDTO.getDateId(), "date", 1)); | 
			
		
	
		
			
				
					|  |  |  | 		//1.查询客户下分类信息
 | 
			
		
	
		
			
				
					|  |  |  | 		List<IssueProjectCategoryDictDTO> categoryList = govIssueService.categoryList(formDTO.getCustomerId(), null, null); | 
			
		
	
		
			
				
					|  |  |  | 		List<String> categoreCodeList = categoryList.stream().filter(ca -> ca.getParentCategoryCode().equals(formDTO.getCategoryCode())).map(m -> m.getCategoryCode()).collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  | 		List<String> categoreCodeList = categoryList.stream().filter(ca -> ca.getParentCategoryCode().equals(formDTO.getCategoryCode())).map(IssueProjectCategoryDictDTO::getCategoryCode).collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  | 		formDTO.setCategoreCodeList(categoreCodeList); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		//2.查询组织及下级截止某一天的某个一级分类下的项目列表
 | 
			
		
	
		
			
				
					|  |  |  | 		PageInfo<CategoryProjectResultDTO.Project> result = | 
			
		
	
		
			
				
					|  |  |  | 				PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage()).doSelectPageInfo(() -> projectDao.categoryProjectList(formDTO)); | 
			
		
	
		
			
				
					|  |  |  | 		if (org.springframework.util.CollectionUtils.isEmpty(result.getList())) { | 
			
		
	
		
			
				
					|  |  |  | 		if (CollectionUtils.isEmpty(result.getList())) { | 
			
		
	
		
			
				
					|  |  |  | 			return resultDTO; | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		resultDTO.setTotal((int) result.getTotal()); | 
			
		
	
	
		
			
				
					|  |  | @ -431,7 +433,7 @@ public class GovProjectServiceImpl implements GovProjectService { | 
			
		
	
		
			
				
					|  |  |  | 		List<CategoryProjectResultDTO.Project> list = projectDao.getCategoryList(projectIds); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		//4.查询来源事件的项目上报的组织信息
 | 
			
		
	
		
			
				
					|  |  |  | 		List<String> eventIds = result.getList().stream().filter(re -> "resi_event".equals(re.getOrigin())).map(m -> m.getOriginId()).collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  | 		List<String> eventIds = result.getList().stream().filter(re -> "resi_event".equals(re.getOrigin())).map(CategoryProjectResultDTO.Project::getOriginId).collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  | 		List<ResiEventReportOrgDTO> eventOrgList = projectDao.getEventOrgList(eventIds); | 
			
		
	
		
			
				
					|  |  |  | 		Map<String, ResiEventReportOrgDTO> eventMap = eventOrgList.stream().collect(Collectors.toMap(ResiEventReportOrgDTO::getResiEventId, Function.identity())); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -439,11 +441,19 @@ public class GovProjectServiceImpl implements GovProjectService { | 
			
		
	
		
			
				
					|  |  |  | 		List<ResiEventDTO> eventUser = projectDao.getEventList(projectIds); | 
			
		
	
		
			
				
					|  |  |  | 		List<ProjectRelatedPersonnelDTO> topicUser = projectDao.getTopicUser(projectIds); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		//市北客户查询 下议题区分下来源 设置topicId
 | 
			
		
	
		
			
				
					|  |  |  | 		Map<String, String> issueTopicSourceMap = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  | 		if (CustomerIdConstant.SHI_BEI_CUSTOMER_ID.equals(loginUserUtil.getLoginUserCustomerId())){ | 
			
		
	
		
			
				
					|  |  |  | 			issueTopicSourceMap = govIssueService.selectIssueTopicIdType(result.getList().stream() | 
			
		
	
		
			
				
					|  |  |  | 					.filter(re -> "issue".equals(re.getOrigin())) | 
			
		
	
		
			
				
					|  |  |  | 					.map(CategoryProjectResultDTO.Project::getOriginId) | 
			
		
	
		
			
				
					|  |  |  | 					.collect(Collectors.toList())).stream().collect(Collectors.toMap(IssueInfoDTO::getIssueId,IssueInfoDTO::getTopicId)); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		//5.封装数据
 | 
			
		
	
		
			
				
					|  |  |  | 		//组织或网格id->组织或网格名称
 | 
			
		
	
		
			
				
					|  |  |  | 		Map<String, String> map = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  | 		result.getList().forEach(re -> { | 
			
		
	
		
			
				
					|  |  |  | 			//所属组织
 | 
			
		
	
		
			
				
					|  |  |  | 		for (CategoryProjectResultDTO.Project re : result.getList()) {//所属组织
 | 
			
		
	
		
			
				
					|  |  |  | 			if ("issue".equals(re.getOrigin())) { | 
			
		
	
		
			
				
					|  |  |  | 				if (map.containsKey(re.getGridId())) { | 
			
		
	
		
			
				
					|  |  |  | 					re.setOrgName(map.get(re.getGridId())); | 
			
		
	
	
		
			
				
					|  |  | @ -454,6 +464,9 @@ public class GovProjectServiceImpl implements GovProjectService { | 
			
		
	
		
			
				
					|  |  |  | 						map.put(re.getGridId(), gridInfo.getGridName()); | 
			
		
	
		
			
				
					|  |  |  | 					} | 
			
		
	
		
			
				
					|  |  |  | 				} | 
			
		
	
		
			
				
					|  |  |  | 				//市北议题来源的设置话题Id
 | 
			
		
	
		
			
				
					|  |  |  | 				re.setTopicId(issueTopicSourceMap.get(re.getOriginId())); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 			} else if ("agency".equals(re.getOrigin())) { | 
			
		
	
		
			
				
					|  |  |  | 				if (map.containsKey(re.getAgencyId())) { | 
			
		
	
		
			
				
					|  |  |  | 					re.setOrgName(map.get(re.getAgencyId())); | 
			
		
	
	
		
			
				
					|  |  | @ -518,7 +531,7 @@ public class GovProjectServiceImpl implements GovProjectService { | 
			
		
	
		
			
				
					|  |  |  | 					re.setUserId(to.getUserId()); | 
			
		
	
		
			
				
					|  |  |  | 				} | 
			
		
	
		
			
				
					|  |  |  | 			}); | 
			
		
	
		
			
				
					|  |  |  | 		}); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		resultDTO.setList(result.getList()); | 
			
		
	
		
			
				
					|  |  |  | 		return resultDTO; | 
			
		
	
	
		
			
				
					|  |  | 
 |