From 00552ddbe36a84db782a432bfd052bd333ae64be Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Thu, 21 Sep 2023 17:29:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95=E5=88=86?= =?UTF-8?q?=E9=A1=B5-=E5=85=B3=E8=81=94=E5=B9=B3=E5=8F=B0=E4=BB=B6?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ctCertificationInventoryEOServiceImpl.java | 41 ++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index 4a843a973..1cc9b7208 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -1924,11 +1924,49 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl pageList = this.page(page, queryWrapper); + //平台件数据处理 + platformDispose(projectCertificationInventoryEO, pageList.getRecords()); + + + this.disposeData(pageList.getRecords(),cut); List records = this.hearSort(projectCertificationInventoryEO, pageList.getRecords()); pageList.setRecords(records); return pageList; } + private void platformDispose(ProjectCertificationInventoryEO projectCertificationInventoryEO, List result) { + List lawsInventoryPlatformEOList = new ArrayList<>(); + List projectCertificationInventoryEOS = new ArrayList<>(); + + if(!result.isEmpty()){ + //认证清单ID + List certificationInventoryIdList = result.stream().map(ProjectCertificationInventoryEO::getId).collect(Collectors.toList()); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.in(LawsInventoryPlatformEO::getLawsInventoryId,certificationInventoryIdList); + lawsInventoryPlatformEOList = lawsInventoryPlatformEOService.list(wrapper); + if(!lawsInventoryPlatformEOList.isEmpty()){ + List collect = lawsInventoryPlatformEOList.stream().map(LawsInventoryPlatformEO::getPlatformLawsInventoryId).distinct().collect(Collectors.toList()); + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.in(ProjectCertificationInventoryEO::getId,collect); + projectCertificationInventoryEOS = this.list(lambdaQueryWrapper);//平台件清单 + } + } + for (ProjectCertificationInventoryEO certificationInventoryEO : result) { + if(!projectCertificationInventoryEOS.isEmpty()){ + List inventoryPlatformEOList = lawsInventoryPlatformEOList.stream() + .filter(e -> certificationInventoryEO.getId().equals(e.getLawsInventoryId())).collect(Collectors.toList()); + if(!inventoryPlatformEOList.isEmpty()){ + List idList = inventoryPlatformEOList.stream() + .map(LawsInventoryPlatformEO::getPlatformLawsInventoryId).collect(Collectors.toList()); + List certificationInventoryEOS = projectCertificationInventoryEOS.stream() + .filter(e -> idList.contains(e.getId())).collect(Collectors.toList()); + if(!certificationInventoryEOS.isEmpty()){ + setProjectCertificationInventoryEO(certificationInventoryEOS.get(0),certificationInventoryEO); + } + } + } + } + } /** * 表头排序 @@ -6966,7 +7004,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl