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 1cc9b7208..27ab0fb30 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 @@ -7055,6 +7055,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl lawsInventoryPlatformEOS = new ArrayList<>(); + List result = new ArrayList<>(); + for (ProjectCertificationInventoryEO projectCertificationInventoryEO : certificationInventoryEOList) { //类别 String category = projectCertificationInventoryEO.getCategory(); @@ -7067,6 +7069,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl lawsInventoryPlatformEOList = new ArrayList<>(); + List projectCertificationInventoryEOList = new ArrayList<>(); + for (ProjectCertificationInventoryEO certificationInventoryEO : certificationInventoryEOS) { List libraryBaseList = projectLibraryBaseList.stream() .filter(e -> certificationInventoryEO.getProjectLibraryId().equals(e.getId())).collect(Collectors.toList()); @@ -7087,7 +7092,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl 1){ + //往认证清单表中添加projectCertificationInventoryEOList.size()-1条数据 + List list = new ArrayList<>(); + for (int i = 1; i < projectCertificationInventoryEOList.size(); i++) { + ProjectCertificationInventoryEO projectCertificationInventoryEOTemp = new ProjectCertificationInventoryEO(); + BeanUtils.copyProperties(projectCertificationInventoryEO,projectCertificationInventoryEOTemp); + projectCertificationInventoryEOTemp.setId(UUID.randomUUID().toString().replace("-", "")); + list.add(projectCertificationInventoryEOTemp); + + setDataTemp(lawsInventoryPlatformEOS, projectCertificationInventoryEOTemp, projectCertificationInventoryEOList.get(i)); + } + if(!list.isEmpty()){ + result.addAll(list); + } + } + } + } + if(!result.isEmpty()){ + this.saveBatch(result); } if(!lawsInventoryPlatformEOS.isEmpty()){ lawsInventoryPlatformEOService.saveBatch(lawsInventoryPlatformEOS);