|
|
@ -127,17 +127,30 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { |
|
|
|
//获取项目信息
|
|
|
|
List<ProjectDTO> projectList = projectService.getProjectInfo(customerId, dateString, projectId); |
|
|
|
factOriginProjectMainDailyService.deleteByDate(customerId, dateString,projectId); |
|
|
|
List<IssueDTO> issueList = new ArrayList<>(); |
|
|
|
List<ResiTopicDTO> topicList = new ArrayList<>(); |
|
|
|
if (!CollectionUtils.isEmpty(projectList)) { |
|
|
|
Map<String, ResiEventDTO> projectEventMap = projectService.getEventList(customerId); |
|
|
|
//提取议题ID
|
|
|
|
List<String> issueIds = |
|
|
|
projectList.stream().filter(item -> ProjectConstant.ISSUE.equals(item.getOrigin())).map(ProjectDTO::getOriginId).collect(Collectors.toList()); |
|
|
|
//获取议题信息
|
|
|
|
List<IssueDTO> issueList = issueService.getIssueInfoByIds(issueIds); |
|
|
|
//提取话题ID
|
|
|
|
List<String> topicIds = issueList.stream().map(IssueDTO::getSourceId).collect(Collectors.toList()); |
|
|
|
//获取话题信息
|
|
|
|
List<ResiTopicDTO> topicList = topicService.getTopicByIds(topicIds); |
|
|
|
if(CollectionUtils.isNotEmpty(issueIds)) { |
|
|
|
//批次数量
|
|
|
|
int batchCount = 200; |
|
|
|
//获取议题信息
|
|
|
|
|
|
|
|
for (int i = 0; i < issueIds.size(); i += batchCount) { |
|
|
|
int lastIndex = Math.min(i + batchCount, issueIds.size()); |
|
|
|
issueList.addAll(issueService.getIssueInfoByIds(issueIds.subList(i, lastIndex))); |
|
|
|
} |
|
|
|
//提取话题ID
|
|
|
|
List<String> topicIds = issueList.stream().map(IssueDTO::getSourceId).collect(Collectors.toList()); |
|
|
|
//获取话题信息
|
|
|
|
for (int i = 0; i < topicIds.size(); i += batchCount) { |
|
|
|
int lastIndex = Math.min(i + batchCount, topicIds.size()); |
|
|
|
topicList.addAll(topicService.getTopicByIds(topicIds.subList(i, lastIndex))); |
|
|
|
} |
|
|
|
} |
|
|
|
//获取网格认证党员
|
|
|
|
List<PartyMemberDTO> partyMemberList = partyMemberService.getPartyMemberByCustomer(customerId); |
|
|
|
//生成DTO
|
|
|
|