From cc7ef9e33544dbcc90223a003869e8c9e7bd9235 Mon Sep 17 00:00:00 2001 From: jing's Date: Mon, 1 Apr 2024 15:13:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E9=80=80=E5=9B=9E=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=A4=8D=E6=A0=B8=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/BomNewEbomParentService.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 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 7bc0ab9d..62947ead 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 @@ -1129,19 +1129,20 @@ 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 = waitCheckList.stream().map(BomNewEbomParentVO::getMaterialNo).collect(Collectors.toList()); - throw new NflgBusinessException(STATE.BusinessError, StrUtil.format("物料编号 {} 状态为待复核,无法退回设计", StrUtil.join(",", materialNoList))); - } - - +// List waitCheckList = bomTreeList.stream().filter(item -> EBomStatusEnum.WAIT_CHECK.getValue().equals(item.getStatus())).collect(Collectors.toList()); +// if (CollectionUtil.isNotEmpty(waitCheckList)) { +// List materialNoList = waitCheckList.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())) + .filter(u -> (ObjectUtil.isNotNull(u.getBomRowId()) && u.getBomRowId().longValue() > 0 ) + && !ObjectUtil.equal(UserJobEnum.ENGINEER.getValue(),u.getCreatedJob()) + && ObjectUtil.equal(EBomStatusEnum.CHECKED.getValue(),u.getStatus()) + ) .map(BomNewEbomParentVO::getBomRowId).collect(Collectors.toList()));