待复核不能退回

This commit is contained in:
jing's 2024-03-31 14:39:26 +08:00
parent d10962d79c
commit e490c10037
1 changed files with 11 additions and 1 deletions

View File

@ -1119,8 +1119,18 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
throw new NflgBusinessException(STATE.BusinessError, StrUtil.format("物料编号 {} 状态为已发布PBOM无法退回设计", StrUtil.join(",", materialNoList)));
}
List<BomNewEbomParentVO> waitCheckList = bomTreeList.stream().filter(item -> EBomStatusEnum.WAIT_CHECK.getValue().equals(item.getStatus())).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(waitCheckList)) {
List<String> 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()));