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);