pbom发布报错物料处理

This commit is contained in:
大米 2024-08-28 16:19:23 +08:00
parent c250e91514
commit a908b2d6f3
1 changed files with 2 additions and 1 deletions

View File

@ -1135,7 +1135,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
List<Long> bomRowIds = allBom.stream().filter(u -> PBomStatusEnum.WAIT_PUBLISH.equalsValue(u.getStatus()) && u.getBomRowId() > 0).map(u -> u.getBomRowId()).collect(Collectors.toList());
List<String> parentMaterialNos = allBom.stream().filter(u -> PBomStatusEnum.WAIT_PUBLISH.equalsValue(u.getStatus()) && u.getBomRowId() > 0).map(u->u.getMaterialNo()).collect(Collectors.toList());
parentMaterialNos.add(parent.getMaterialNo());
//Integer state = (parent.getMaterialNo().startsWith("31") && parent.getFacCode().equals(EBomConstant.MAIN_FACTORY_CODE_1010)) ? PBomStatusEnum.WAIT_FACTORY.getValue() : PBomStatusEnum.PUBLISH.getValue();
Integer state = parent.getMaterialNo().startsWith("31") ? PBomStatusEnum.FACTORY_CONFIRM.getValue() : PBomStatusEnum.PUBLISH.getValue();
@ -1150,6 +1150,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
}
else {
bomRowIds.add(bomRowId);
parentMaterialNos.add(parent.getMaterialNo());
}
if(CollUtil.isNotEmpty(bomRowIds)) {
this.getBaseMapper().bomRelease(state, SessionUtil.getUserName(), bomRowIds);