转EBOM时- PBOM发布报错修复3

This commit is contained in:
大米 2024-08-28 14:23:04 +08:00
parent ef3287ba9c
commit ca7bbdc353
2 changed files with 22 additions and 20 deletions

View File

@ -1151,10 +1151,8 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
else {
bomRowIds.add(bomRowId);
}
if(CollUtil.isNotEmpty(bomRowIds)) {
this.getBaseMapper().bomRelease(state, SessionUtil.getUserName(), bomRowIds);
//同步sap
// saySyncDEMO();
// importSap(parent,allBom);
//记录-BOM版本RowId
List<BomNewPbomChildEntity> pBomChildren = new ArrayList<>();
allBom.forEach(k -> {
@ -1168,7 +1166,8 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
}
//历史版本转移到formal正式工作表
pBomToFormal(bomRowIds, parentMaterialNos,parent.getFacCode());
pBomToFormal(bomRowIds, parentMaterialNos, parent.getFacCode());
}
// SpringUtil.getBean(BomNewPbomParentFormalService.class).copyPbomFormal(bomRowId);
} catch (Exception ex) {

View File

@ -89,10 +89,13 @@ public class EBomToPBomForFormalNew extends FormalEBomToPbomBase {
continue;
}
//检查是否用户跟用户节点
List<String> childMaterialNos = SpringUtil.getBean(BomNewPbomParentMapper.class).getPBomExistMaterialInChildForWorkList(parentEnt.getMaterialNo());
if(CollUtil.isEmpty(childMaterialNos)){
if(parentEnt.getMaterialNo().equals(parent.getMaterialNo())) {
List<String> childMaterialNos = SpringUtil.getBean(BomNewPbomParentMapper.class).getPBomExistMaterialInChildForWorkList(parent.getMaterialNo());
if (CollUtil.isEmpty(childMaterialNos)) {
parentEnt.setUserRootIs(1);
}
}
//子级
if (CollUtil.isNotEmpty(child)) {
//合并子级