Browse Source

群众不满微调

dev_shibei_match
zxc 4 years ago
parent
commit
0a266bec42
  1. 5
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionStatisticsServiceImpl.java
  2. 2
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml

5
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<Pr
*/
@Override
public List<MassesDiscontentResultDTO> massesDiscontent(MassesDiscontentFormDTO formDTO) {
// 根据时间范围查询已结案的项目,来源是issue的
List<MassesDiscontentResultDTO> projectIds = projectDao.selectProjectIdByTime(formDTO.getAgencyId(), getDateId("yesterday"), getDateId(formDTO.getTimeSection()));
if (CollectionUtils.isEmpty(projectIds)){
return new ArrayList<>();
}
// 查询少于75分的项目
PageInfo<MassesDiscontentResultDTO> 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<MassesDiscontentResultDTO> projects = pageInfo.getList();
if (CollectionUtils.isEmpty(projects)){
return new ArrayList<>();
}
// 项目分类标签
List<ProjectCategoryDisPoseResultDTO> projectCategoryDisPoseResultDTOS = projectCategoryDao.selectCategoryByIds(projects.stream().map(m -> m.getProjectId()).collect(Collectors.toList()));
List<ProjectCategoryDisPoseResultDTO> projectCategoryData = new ArrayList<>();
if (!CollectionUtils.isEmpty(projectCategoryDisPoseResultDTOS)){
@ -177,11 +180,13 @@ public class ProjectSatisfactionStatisticsServiceImpl extends BaseServiceImpl<Pr
}
projectCategoryData = projectCategory.getData();
}
// 话题信息
Result<List<TopicInfoResultDTO>> topicInfos = resiGroupOpenFeignClient.getTopicInfos(projects.stream().map(m -> m.getIssueId()).collect(Collectors.toList()));
if (!topicInfos.success()){
throw new RenException("查询话题信息失败".concat(topicInfos.getMsg()));
}
List<ProjectCategoryDisPoseResultDTO> finalProjectCategoryData = projectCategoryData;
// 数据组装
projects.forEach(p -> {
if (!CollectionUtils.isEmpty(finalProjectCategoryData)){
finalProjectCategoryData.forEach(cate -> {

2
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') <![CDATA[ <= ]]> #{endDate}
AND ORG_ID_PATH LIKE CONCAT('%',#{agencyId},'%')
AND ORIGIN = 'issue'
AND `STATUS` = 'closed'
</select>
</mapper>
Loading…
Cancel
Save