|
|
@@ -60,16 +60,15 @@ public class ReportService {
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
return PageRes.build(info, list);
|
|
|
}
|
|
|
- List<String> collect = list.stream().map(ReportStatementVO::getProjectId).collect(Collectors.toList());
|
|
|
- List<KwsProject> kwsProjects = projectMapper.selectList(new LambdaQueryWrapper<KwsProject>()
|
|
|
- .in(KwsProject::getId, collect)
|
|
|
- .eq(KwsProject::getDelFlag, 0));
|
|
|
+ List<String> collect = list.stream().map(ReportStatementVO::getProjectId).distinct().collect(Collectors.toList());
|
|
|
+ List<KwsProject> kwsProjects = projectMapper.selectListData(collect,null);
|
|
|
Map<Long, String> map = new HashMap<>();
|
|
|
if (!CollectionUtils.isEmpty(kwsProjects)) {
|
|
|
map = kwsProjects.stream().collect(Collectors.toMap(KwsProject::getId, KwsProject::getName));
|
|
|
}
|
|
|
for (ReportStatementVO reportStatementVO : list) {
|
|
|
reportStatementVO.setReportType(ReportTypeEnum.getDescription(reportStatementVO.getReportType()));
|
|
|
+ reportStatementVO.setProjectName(map.get(Long.parseLong(reportStatementVO.getProjectId())));
|
|
|
}
|
|
|
return PageRes.build(info, list);
|
|
|
}
|