From 747ab69c961f77d1130fa95731bfec16b0553ed5 Mon Sep 17 00:00:00 2001 From: jing's Date: Wed, 27 Dec 2023 16:26:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=A4=8D=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/BomNewEbomParentService.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 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 6dd85fc3..81161bda 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 @@ -256,7 +256,7 @@ public class BomNewEbomParentService extends ServiceImpl u.getBomRowId() > 0) - .map(BomNewEbomParentVO::getRowId).collect(Collectors.toList())); + .map(BomNewEbomParentVO::getBomRowId).collect(Collectors.toList())); } @@ -846,20 +846,23 @@ public class BomNewEbomParentService extends ServiceImpl updateReviewIdList = new ArrayList<>(); for (Long bomRowId : rowIds) { - CheckEBomException checkEBomException = new CheckEBomException(bomRowId); - System.out.println(JSON.toJSONString(checkEBomException.getAllBomDetail())); - checkEBomException.initException(); + List childList=getBomTree(bomRowId); + CheckEBomException checkEBomException = new CheckEBomException(childList); + // System.out.println(JSON.toJSONString(checkEBomException.getAllBomDetail())); + checkEBomException.initException("projectType"); //错误状态包含在checkStatus内有异常抛出 checkEBomException.checkContainExcept(checkStatus); //筛选bomRowId()>0 说明有bom,更新只到parent这层,无bom不需要更新 //设计人员只可以复核自己的物料,如果存在引用其他用户创建的物料时,不可以改变被引用物料的审核状态。 updateReviewIdList.addAll(checkEBomException.getAllBomDetail().stream() .filter(u -> u.getBomRowId() > 0 - && u.getCreatedBy().equals(dto.getUserCode())) - .map(BomNewEbomParentVO::getRowId).collect(Collectors.toList())); + && u.getCreatedBy().equals(SessionUtil.getUserCode())) + .map(BomNewEbomParentVO::getBomRowId).collect(Collectors.toList())); + updateReviewIdList.add(bomRowId); } //改变复核状态 + List updateReviewList = new ArrayList<>(); for (Long id : updateReviewIdList) { BomNewEbomParentEntity entity = new BomNewEbomParentEntity(); @@ -960,6 +963,8 @@ public class BomNewEbomParentService extends ServiceImpl