退回设计 提示错误的物料编号

This commit is contained in:
jing's 2024-03-31 16:07:54 +08:00
parent c193718b2a
commit 774f830fa9
2 changed files with 3 additions and 3 deletions

View File

@ -343,10 +343,10 @@ public class EbomApi extends BaseApi {
void checkDeleteRule(BomNewEBomParentEditDTO dto){
if(CollUtil.isNotEmpty(dto.getDelDatas()) && CollUtil.isNotEmpty(dto.getDelDatas())){
if(CollUtil.isNotEmpty(dto.getDelDatas()) && CollUtil.isNotEmpty(dto.getDatas())){
List<Long> delList=dto.getDelDatas().stream().map(BomNewEbomParentVO::getRowId).collect(Collectors.toList());
List<Long> dataList=dto.getDelDatas().stream().filter(u-> ObjectUtil.isNotNull(u.getRowId())&& u.getRowId().longValue()>0).map(BomNewEbomParentVO::getRowId).collect(Collectors.toList());
List<Long> dataList=dto.getDatas().stream().filter(u-> ObjectUtil.isNotNull(u.getRowId())&& u.getRowId().longValue()>0).map(BomNewEbomParentVO::getRowId).collect(Collectors.toList());
// 删除编辑出现相同(互斥)
List<Long> sameList= CollectionUtil.intersection(delList,dataList).stream().collect(Collectors.toList());;

View File

@ -1123,7 +1123,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
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());
List<String> materialNoList = waitCheckList.stream().map(BomNewEbomParentVO::getMaterialNo).collect(Collectors.toList());
throw new NflgBusinessException(STATE.BusinessError, StrUtil.format("物料编号 {} 状态为待复核,无法退回设计", StrUtil.join(",", materialNoList)));
}