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()));