|
|
@ -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 -> { |
|
|
|