From f3ba4c82487d51cf7dec8c6f4a08ddb5d09fb827 Mon Sep 17 00:00:00 2001 From: luolm <470431449@qq.com> Date: Sat, 12 Oct 2024 17:01:28 +0800 Subject: [PATCH] =?UTF-8?q?pbom-=E7=89=A9=E6=96=99=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=9C=A8=E5=88=AB=E4=BA=BABOM=E4=B8=8B=E5=8F=8A=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/bomnew/service/BomNewEbomParentService.java | 2 ++ .../product/bomnew/service/BomNewPbomParentService.java | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java index 1b36fdac..6770e250 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java @@ -992,6 +992,7 @@ public class BomNewEbomParentService extends ServiceImpl bomRowIds = allBom.stream().filter(u -> PBomStatusEnum.WAIT_PUBLISH.equalsValue(u.getStatus()) && u.getBomRowId() > 0 && !u.getDelIs().equals(1)).map(u -> u.getBomRowId()).collect(Collectors.toList()); + List bomRowIds = allBom.stream().filter(u -> SessionUtil.getUserCode().equals(u.getCreatedBy()) && PBomStatusEnum.WAIT_PUBLISH.equalsValue(u.getStatus()) && u.getBomRowId() > 0 && !u.getDelIs().equals(1)).map(u -> u.getBomRowId()).collect(Collectors.toList()); - List parentMaterialNos = allBom.stream().filter(u -> PBomStatusEnum.WAIT_PUBLISH.equalsValue(u.getStatus()) && u.getBomRowId() > 0 && !u.getDelIs().equals(1)).map(u->u.getMaterialNo()).collect(Collectors.toList()); + List parentMaterialNos = allBom.stream().filter(u -> SessionUtil.getUserCode().equals(u.getCreatedBy()) && PBomStatusEnum.WAIT_PUBLISH.equalsValue(u.getStatus()) && u.getBomRowId() > 0 && !u.getDelIs().equals(1)).map(u->u.getMaterialNo()).collect(Collectors.toList()); //Integer state = (parent.getMaterialNo().startsWith("31") && parent.getFacCode().equals(EBomConstant.MAIN_FACTORY_CODE_1010)) ? PBomStatusEnum.WAIT_FACTORY.getValue() : PBomStatusEnum.PUBLISH.getValue(); Integer state = parent.getMaterialNo().startsWith("31") ? PBomStatusEnum.FACTORY_CONFIRM.getValue() : PBomStatusEnum.PUBLISH.getValue(); @@ -1241,7 +1241,7 @@ public class BomNewPbomParentService extends ServiceImpl oldChildSet0 = oldBomNoTChildren.stream().map(u -> u.getMaterialNoAndNumAndProjectType()).collect(Collectors.toSet()); Set newChildSet0 = newBomNoTChildren.stream().map(u -> u.getMaterialNoAndNumAndProjectType()).collect(Collectors.toSet()); - if(oldChildSet0.equals(newChildSet0)){ + if(oldChildSet0.equals(newChildSet0) && SessionUtil.getUserCode().equals(newPBom.getCreatedBy()) ){ newPBom.setStatus(PBomStatusEnum.PUBLISH.getValue()); newPBom.setDelIs(1);