1、PBOM 【BOM删除】 生成小版本号.0a

2、EBOM生成PBOM时,将PBOM下新增的子项给自动带过来时过滤掉K项
This commit is contained in:
10002327 2024-11-01 16:53:30 +08:00
parent 25cb146344
commit 7c5980e821
2 changed files with 4 additions and 3 deletions

View File

@ -1482,8 +1482,8 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
pbomParent.setCreatedBy(SessionUtil.getUserCode()); pbomParent.setCreatedBy(SessionUtil.getUserCode());
pbomParent.setStatus(PBomStatusEnum.FACTORY_CONFIRM.getValue()); pbomParent.setStatus(PBomStatusEnum.FACTORY_CONFIRM.getValue());
pbomParent.setEditStatus(PBomEditStatusEnum.HANDLER_FINISHED.getValue()); pbomParent.setEditStatus(PBomEditStatusEnum.HANDLER_FINISHED.getValue());
//获取大版本号 //获取大版本号 生成小小版本号.0a
pbomParent.setCurrentVersion(VersionUtil.getNextVersion(rootVo.getCurrentVersion())); pbomParent.setCurrentVersion(VersionUtil.getPBomUpgradNextVersion(rootVo.getCurrentVersion()));
pbomParent.setDeptRowId(SessionUtil.getDepartRowId()); pbomParent.setDeptRowId(SessionUtil.getDepartRowId());
pbomParent.setDeptName(SessionUtil.getDepartName()); pbomParent.setDeptName(SessionUtil.getDepartName());
pbomParent.setDeviseName(SessionUtil.getRealName()); pbomParent.setDeviseName(SessionUtil.getRealName());

View File

@ -253,7 +253,8 @@ public abstract class FormalEBomToPbomBase {
List<BomNewPbomParentVO> oldChildren=SpringUtil.getBean(BomNewPbomParentService.class).getChild(oldParent.getRowId(),1); List<BomNewPbomParentVO> oldChildren=SpringUtil.getBean(BomNewPbomParentService.class).getChild(oldParent.getRowId(),1);
//pBom 手工新增物料 //pBom 手工新增物料
List<BomNewPbomParentVO> oldPBomAddChildren = oldChildren.stream().filter(u -> StrUtil.isBlank(u.getOriginalMaterialNo())).collect(Collectors.toList()); //过滤掉K项的记录 10002327 241101
List<BomNewPbomParentVO> oldPBomAddChildren = oldChildren.stream().filter(u -> StrUtil.isBlank(u.getOriginalMaterialNo()) && !Objects.equals("K",u.getProjectType())).collect(Collectors.toList());
Map<String, BomNewEbomParentVO> newBomChildrenMap = newBomChildren.stream().collect(Collectors.toMap(BomNewEbomParentVO::getMaterialNo, Function.identity(),(u,u1) -> u)); Map<String, BomNewEbomParentVO> newBomChildrenMap = newBomChildren.stream().collect(Collectors.toMap(BomNewEbomParentVO::getMaterialNo, Function.identity(),(u,u1) -> u));
for (BomNewPbomParentVO oldPBomAddItem : oldPBomAddChildren) { for (BomNewPbomParentVO oldPBomAddItem : oldPBomAddChildren) {