Merge remote-tracking branch 'origin/feature/DM/nflg-bom-transition-sit' into feature/DM/nflg-bom-transition

This commit is contained in:
10001392 2024-08-28 16:21:51 +08:00
commit 4fb3dfa2b2
2 changed files with 3 additions and 2 deletions

View File

@ -383,7 +383,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
if (CollUtil.isNotEmpty(materialNos)) { if (CollUtil.isNotEmpty(materialNos)) {
List<BomNewEbomParentEntity> list = this.lambdaQuery().in(BomNewEbomParentEntity::getMaterialNo, materialNos) List<BomNewEbomParentEntity> list = this.lambdaQuery().in(BomNewEbomParentEntity::getMaterialNo, materialNos)
// .eq(!EBomStatusEnum.PUBLISHED.equalsValue(parent.getStatus()), BomNewEbomParentEntity::getLastVersionIs, 1) // .eq(!EBomStatusEnum.PUBLISHED.equalsValue(parent.getStatus()), BomNewEbomParentEntity::getLastVersionIs, 1)
.eq(EBomStatusEnum.PUBLISHED.equalsValue(parent.getStatus()), BomNewEbomParentEntity::getStatus, EBomStatusEnum.PUBLISHED.getValue()).list(); .eq(type.equals(1), BomNewEbomParentEntity::getStatus, EBomStatusEnum.PUBLISHED.getValue()).list();
// if (EBomStatusEnum.CHECKED.equalsValue(parent.getStatus())) { // if (EBomStatusEnum.CHECKED.equalsValue(parent.getStatus())) {
// list = list.stream().filter(u -> EBomStatusEnum.CHECKED.equalsValue(u.getStatus())).collect(Collectors.toList()); // list = list.stream().filter(u -> EBomStatusEnum.CHECKED.equalsValue(u.getStatus())).collect(Collectors.toList());
// } // }

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<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()); 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") && 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(); Integer state = parent.getMaterialNo().startsWith("31") ? PBomStatusEnum.FACTORY_CONFIRM.getValue() : PBomStatusEnum.PUBLISH.getValue();
@ -1150,6 +1150,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
} }
else { else {
bomRowIds.add(bomRowId); bomRowIds.add(bomRowId);
parentMaterialNos.add(parent.getMaterialNo());
} }
if(CollUtil.isNotEmpty(bomRowIds)) { if(CollUtil.isNotEmpty(bomRowIds)) {
this.getBaseMapper().bomRelease(state, SessionUtil.getUserName(), bomRowIds); this.getBaseMapper().bomRelease(state, SessionUtil.getUserName(), bomRowIds);