From e490c10037473a0d504a2d4c04b38e3c872933c8 Mon Sep 17 00:00:00 2001 From: jing's Date: Sun, 31 Mar 2024 14:39:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=85=E5=A4=8D=E6=A0=B8=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E9=80=80=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bomnew/service/BomNewEbomParentService.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 4ce3255a..57491490 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 @@ -1119,8 +1119,18 @@ public class BomNewEbomParentService extends ServiceImpl waitCheckList = bomTreeList.stream().filter(item -> EBomStatusEnum.WAIT_CHECK.getValue().equals(item.getStatus())).collect(Collectors.toList()); + if (CollectionUtil.isNotEmpty(waitCheckList)) { + List materialNoList = pbomList.stream().map(BomNewEbomParentVO::getMaterialNo).collect(Collectors.toList()); + throw new NflgBusinessException(STATE.BusinessError, StrUtil.format("物料编号 {} 状态为待复核,无法退回设计", StrUtil.join(",", materialNoList))); + } + + + + revertList.clear(); - //忽略叶子节点 和 工艺人员 + //忽略叶子节点 和 工艺人员不退回设计 revertList.addAll(bomTreeList.stream() .filter(u -> u.getBomRowId() > 0 && !Objects.equals(UserJobEnum.ENGINEER.getValue(),u.getCreatedJob())) .map(BomNewEbomParentVO::getBomRowId).collect(Collectors.toList()));