diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/IssueExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/IssueExtractServiceImpl.java index 8854de47ff..e9e35033e3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/IssueExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/IssueExtractServiceImpl.java @@ -60,8 +60,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { */ @Override public Boolean issueExtractMain(String customerId, String dateId) { - - // 议题信息查询 + // 1. 议题信息查询 List listResult = issueService.selectIssueInfo(customerId, dateId); List result = new ArrayList<>(); if (CollectionUtils.isEmpty(listResult)){ @@ -73,7 +72,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { result.add(issueMainDailyFormDTO); }); - // 创建议题人ID + // 2. 创建议题人ID List userIds = listResult.stream().map(issue -> issue.getUserId()).distinct().collect(Collectors.toList()); Map map = userService.selectUserIsParty(userIds); if (null != map){ @@ -85,8 +84,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { }); }); } - - // 创建话题用户身份信息查询 + // 3. 创建话题用户身份信息查询 List topicIds = listResult.stream().map(issue -> issue.getTopicId()).collect(Collectors.toList()); List topicInfoList = topicService.selectTopicInfo(topicIds); if (CollectionUtils.isEmpty(topicInfoList)){ @@ -101,7 +99,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { } }); }); - // 根据dateId赋值 + // 4. 根据dateId赋值 TimeListResultDTO timeList = DateUtils.getTimeList(dateId); result.forEach(r -> { r.setDateId(dateId); @@ -116,8 +114,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { } }); }); - - // 查询pid + // 5. 查询pid List agencyIds = result.stream().map(r -> r.getAgencyId()).distinct().collect(Collectors.toList()); List agencyInfoList = dimAgencyDao.selectAgencyInfo(agencyIds); if (CollectionUtils.isEmpty(agencyInfoList)){ @@ -148,10 +145,17 @@ public class IssueExtractServiceImpl implements IssueExtractService { issueMainDailyDao.insertIssueMainList(result); } + /** + * @Description 议题抽取(log) + * @param customerId + * @param dateId + * @author zxc + * @date 2020/9/16 9:41 上午 + */ @Override public Boolean issueExtractLog(String customerId, String dateId) { List result = new ArrayList<>(); - // 查询议题process + // 1. 查询议题process List listResult = issueService.selectIssueProcessInfo(customerId, dateId); if (CollectionUtils.isEmpty(listResult)){ throw new RenException(ExtractConstant.ISSUE_PROCESS); @@ -162,7 +166,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { result.add(issueLogDailyFormDTO); }); - // 查询议题满意度 + // 2. 查询议题满意度 List satisfactionInfoList = issueService.selectIssueSatisfactionInfo(customerId, dateId); if (!CollectionUtils.isEmpty(satisfactionInfoList)){ satisfactionInfoList.forEach(s -> { @@ -172,7 +176,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { }); } - // 查询议题支持反对 + // 3. 查询议题支持反对 List voteInfoList = issueService.selectIssueVoteInfo(customerId, dateId); if (!CollectionUtils.isEmpty(voteInfoList)){ voteInfoList.forEach(v -> { @@ -182,7 +186,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { }); } - // 动作操作人的身份标识是否是党员 + // 4. 动作操作人的身份标识是否是党员 List userIds = listResult.stream().map(issue -> issue.getUserId()).distinct().collect(Collectors.toList()); Map map = userService.selectUserIsParty(userIds); if (null != map){ @@ -195,7 +199,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { }); } - // 上级ID + // 5. 上级ID List agencyIds = listResult.stream().map(process -> process.getAgencyId()).distinct().collect(Collectors.toList()); List agencyInfoList = dimAgencyDao.selectAgencyInfo(agencyIds); if (CollectionUtils.isEmpty(agencyInfoList)){