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