From 99d45f5c17fa6dc8a94b621be8e840ce7dd90907 Mon Sep 17 00:00:00 2001 From: 10002327 Date: Wed, 23 Oct 2024 17:54:45 +0800 Subject: [PATCH] =?UTF-8?q?BOM=E5=88=A0=E9=99=A4=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nflg/product/bomnew/service/BomNewEbomParentService.java | 5 +++-- .../nflg/product/bomnew/service/BomNewPbomParentService.java | 4 ++-- 2 files changed, 5 insertions(+), 4 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 1f950737..61b5fee7 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 @@ -1499,10 +1499,10 @@ public class BomNewEbomParentService extends ServiceImpl mList = materialMainService.list(Wrappers.lambdaQuery() .eq(MaterialMainEntity::getMaterialNo,parent.getMaterialNo()) - .eq(MaterialMainEntity::getMaterialState, MaterialGetEnum.MaterialStateEnum.STATE_NO_4.getValue())); + .in(MaterialMainEntity::getMaterialState, com.google.common.collect.Lists.newArrayList(MaterialGetEnum.MaterialStateEnum.STATE_NO_4.getValue(),MaterialGetEnum.MaterialStateEnum.STATE_NO_5.getValue()))); if(CollUtil.isNotEmpty(mList)){ VUtils.isTure(true).throwMessage(StrUtil.join(",", Optional.ofNullable(mList).map(l->l.get(0)) - .map(MaterialMainEntity::getMaterialNo).orElse(String.valueOf(bomRowId)), "冻结中无法删除~")); + .map(MaterialMainEntity::getMaterialNo).orElse(String.valueOf(bomRowId)), "冻结编码无法编辑删除BOM~")); } //检查是否存在发布前的版本,有则不能发起 BOM删除 @@ -1640,6 +1640,7 @@ public class BomNewEbomParentService extends ServiceImpl mList = materialMainService.list(Wrappers.lambdaQuery() .eq(MaterialMainEntity::getMaterialNo,parent.getMaterialNo()) - .eq(MaterialMainEntity::getMaterialState, MaterialGetEnum.MaterialStateEnum.STATE_NO_4.getValue())); + .in(MaterialMainEntity::getMaterialState, com.google.common.collect.Lists.newArrayList(MaterialGetEnum.MaterialStateEnum.STATE_NO_4.getValue(),MaterialGetEnum.MaterialStateEnum.STATE_NO_5.getValue()))); if(CollUtil.isNotEmpty(mList)){ VUtils.isTure(true).throwMessage(StrUtil.join(",", Optional.ofNullable(mList).map(l->l.get(0)) - .map(MaterialMainEntity::getMaterialNo).orElse(String.valueOf(bomRowId)), "冻结中无法删除~")); + .map(MaterialMainEntity::getMaterialNo).orElse(String.valueOf(bomRowId)), "冻结编码无法编辑删除BOM~")); } VUtils.isTure(parent.getStatus() < PBomStatusEnum.PUBLISH.getValue()).throwMessage("只有已发布的BOM,才能删除"); //检查当前用户是否有该工厂权限