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