diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index 3c860e4d37..5ee0d941bd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -127,17 +127,30 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { //获取项目信息 List projectList = projectService.getProjectInfo(customerId, dateString, projectId); factOriginProjectMainDailyService.deleteByDate(customerId, dateString,projectId); + List issueList = new ArrayList<>(); + List topicList = new ArrayList<>(); if (!CollectionUtils.isEmpty(projectList)) { Map projectEventMap = projectService.getEventList(customerId); //提取议题ID List issueIds = projectList.stream().filter(item -> ProjectConstant.ISSUE.equals(item.getOrigin())).map(ProjectDTO::getOriginId).collect(Collectors.toList()); - //获取议题信息 - List issueList = issueService.getIssueInfoByIds(issueIds); - //提取话题ID - List topicIds = issueList.stream().map(IssueDTO::getSourceId).collect(Collectors.toList()); - //获取话题信息 - List 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 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 partyMemberList = partyMemberService.getPartyMemberByCustomer(customerId); //生成DTO