From 251453b33fc41a1031aa118521845c982d0d8ba3 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Thu, 21 Sep 2023 18:22:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=83=AD=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E5=85=B3=E8=81=94=E5=B9=B3=E5=8F=B0=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ctCertificationInventoryEOServiceImpl.java | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) 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);