diff --git a/inspect-main/inspect-main-task/src/main/java/com/inspect/insreport/controller/InspectionReportController.java b/inspect-main/inspect-main-task/src/main/java/com/inspect/insreport/controller/InspectionReportController.java index c17a5e9..c58d51d 100644 --- a/inspect-main/inspect-main-task/src/main/java/com/inspect/insreport/controller/InspectionReportController.java +++ b/inspect-main/inspect-main-task/src/main/java/com/inspect/insreport/controller/InspectionReportController.java @@ -96,26 +96,8 @@ public class InspectionReportController extends BaseController { @GetMapping({"/list"}) public TableDataInfo list(InspectionReport inspectionReport) { startPage(); - Map imgMap = getImgMap(); List inspectionReportList = inspectionReportService.selectByAllList(inspectionReport); logger.info("[REPORT] inspectionReportList size: {}", inspectionReportList.size()); - InspectionReportData reportParam = new InspectionReportData(); - Map map = new HashMap<>(); - String[] reportIds = inspectionReportList.stream().map((item) -> item.getLineId().toString()).toArray(String[]::new); - map.put("reportIds", reportIds); - reportParam.setParams(map); - List inspectionReportDataList = inspectionReportDataService.selectInspectionReportDataList(reportParam); - for(InspectionReport report : inspectionReportList) { - List infoList = inspectionReportDataList.stream().filter(item -> item.getReportId().equals(report.getLineId())).collect(Collectors.toList()); - if(infoList != null && !infoList.isEmpty()) { - report.setInfo(infoList); - } - for (InspectionReportData reportData : inspectionReportDataList) { - if (imgMap != null && imgMap.get((reportData.getLineId()).trim()) != null) { - reportData.setInspectionImg(imgMap.get((reportData.getLineId()).trim())); - } - } - } return getDataTable(inspectionReportList); }