diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionStatisticsServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionStatisticsServiceImpl.java index ed20dfd167..5ced71018a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionStatisticsServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionStatisticsServiceImpl.java @@ -159,15 +159,18 @@ public class ProjectSatisfactionStatisticsServiceImpl extends BaseServiceImpl massesDiscontent(MassesDiscontentFormDTO formDTO) { + // 根据时间范围查询已结案的项目,来源是issue的 List projectIds = projectDao.selectProjectIdByTime(formDTO.getAgencyId(), getDateId("yesterday"), getDateId(formDTO.getTimeSection())); if (CollectionUtils.isEmpty(projectIds)){ return new ArrayList<>(); } + // 查询少于75分的项目 PageInfo pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectProjectByScore(projectIds.stream().map(m -> m.getProjectId()).collect(Collectors.toList()), NumConstant.SEVENTY_FIVE, formDTO.getSortType())); List projects = pageInfo.getList(); if (CollectionUtils.isEmpty(projects)){ return new ArrayList<>(); } + // 项目分类标签 List projectCategoryDisPoseResultDTOS = projectCategoryDao.selectCategoryByIds(projects.stream().map(m -> m.getProjectId()).collect(Collectors.toList())); List projectCategoryData = new ArrayList<>(); if (!CollectionUtils.isEmpty(projectCategoryDisPoseResultDTOS)){ @@ -177,11 +180,13 @@ public class ProjectSatisfactionStatisticsServiceImpl extends BaseServiceImpl> topicInfos = resiGroupOpenFeignClient.getTopicInfos(projects.stream().map(m -> m.getIssueId()).collect(Collectors.toList())); if (!topicInfos.success()){ throw new RenException("查询话题信息失败".concat(topicInfos.getMsg())); } List finalProjectCategoryData = projectCategoryData; + // 数据组装 projects.forEach(p -> { if (!CollectionUtils.isEmpty(finalProjectCategoryData)){ finalProjectCategoryData.forEach(cate -> { diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index 4a8c18c125..13309309c8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -281,6 +281,8 @@ AND DATE_FORMAT(CREATED_TIME,'%Y%m%d') >= #{startDate} AND DATE_FORMAT(CREATED_TIME,'%Y%m%d') #{endDate} AND ORG_ID_PATH LIKE CONCAT('%',#{agencyId},'%') + AND ORIGIN = 'issue' + AND `STATUS` = 'closed' \ No newline at end of file