自定义报表优化处理

This commit is contained in:
2023-10-24 10:06:19 +08:00
parent 6c6f648ca8
commit 964fb5675f

View File

@@ -82,8 +82,6 @@ public class CustomReportServiceImpl implements CustomReportService {
private final ExcelRptTempMapper excelRptTempMapper;
private final ExcelRptMapper excelRptMapper;
private final EleEpdMapper eleEpdMapper;
private final DeptTempMapper deptTempMapper;
@@ -932,6 +930,10 @@ public class CustomReportServiceImpl implements CustomReportService {
//处理指标是否合格
reportLimitList = reportLimitList.stream()
.collect(Collectors.collectingAndThen(Collectors.toCollection(
() -> new TreeSet<>(Comparator.comparing(ReportTemplateDTO::getItemName))), ArrayList::new));
Map<String, Float> limitMap = overLimitDeal(reportLimitList, reportSearchParam);
//存放限值指标的map
Map<String, ReportTemplateDTO> limitTargetMapX = reportLimitList.stream().collect(Collectors.toMap(ReportTemplateDTO::getItemName, Function.identity()));
@@ -941,6 +943,10 @@ public class CustomReportServiceImpl implements CustomReportService {
long deal = System.currentTimeMillis();
//开始组织sql
reportTemplateDTOList = reportTemplateDTOList.stream()
.collect(Collectors.collectingAndThen(Collectors.toCollection(
() -> new TreeSet<>(Comparator.comparing(ReportTemplateDTO::getItemName))), ArrayList::new));
Map<String, List<ReportTemplateDTO>> classMap = reportTemplateDTOList.stream().collect(Collectors.groupingBy(ReportTemplateDTO::getClassId));
Map<String, ReportTemplateDTO> assNoPassMap = new HashMap<>();
classMap.forEach((classKey, templateValue) -> {