From cf50f8752e9dd8ce571a9cc1f85664a6f491d1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Tue, 28 May 2024 11:11:42 +0800 Subject: [PATCH] =?UTF-8?q?feat(pbom):=20=E5=AF=BC=E5=85=A5=E5=88=B0sap?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=98=AF=E7=9B=B4=E5=8F=91?= =?UTF-8?q?=E5=8C=85=EF=BC=8C=E4=B8=94=E6=B2=A1=E6=9C=89=E4=B8=8B=E7=BA=A7?= =?UTF-8?q?=EF=BC=8C=E5=88=99=E4=B8=8D=E8=A6=81=E6=8F=90=E4=BA=A4=E5=88=B0?= =?UTF-8?q?sap=E5=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/BomNewPbomParentService.java | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java index dbad8357..593a33f5 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java @@ -1152,7 +1152,19 @@ public class BomNewPbomParentService extends ServiceImpl { + for (BomNewPbomChildEntity c : children) { + BomNewPbomParentEntity cp = lambdaQuery() + .eq(BomNewPbomParentEntity::getMaterialNo, c.getMaterialNo()) + .eq(BomNewPbomParentEntity::getStatus, EBomStatusEnum.PUBLISHED.getValue()) + .orderByDesc(BomNewPbomParentEntity::getRowId) + .last(" limit 1") + .one(); + if (Objects.equals(c.getVirtualPartType(), VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getValue())) { + if (Objects.nonNull(cp) && !pbomChildService.lambdaQuery().eq(BomNewPbomChildEntity::getParentRowId, cp.getRowId()).exists()) { + continue; + } + } + T1DTO t1 = new T1DTO(); t1.setID(RandomUtil.randomNumbers(5)); t1.setMATNR(parent.getMaterialNo()); @@ -1166,14 +1178,11 @@ public class BomNewPbomParentService extends ServiceImpl