转EBOM时- PBOM发布报错修复3
This commit is contained in:
parent
f983cf3bcb
commit
4e0f149ac9
|
|
@ -1151,24 +1151,23 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
else {
|
||||
bomRowIds.add(bomRowId);
|
||||
}
|
||||
this.getBaseMapper().bomRelease(state, SessionUtil.getUserName(), bomRowIds);
|
||||
//同步sap
|
||||
// saySyncDEMO();
|
||||
// importSap(parent,allBom);
|
||||
//记录-BOM版本RowId
|
||||
List<BomNewPbomChildEntity> pBomChildren = new ArrayList<>();
|
||||
allBom.forEach(k -> {
|
||||
BomNewPbomChildEntity entChild = new BomNewPbomChildEntity();
|
||||
entChild.setRowId(k.getRowId());
|
||||
entChild.setBomVersionRowId(k.getBomRowId());
|
||||
pBomChildren.add(entChild);
|
||||
});
|
||||
if (CollUtil.isNotEmpty(pBomChildren)) {
|
||||
pbomChildService.updateBatchById(pBomChildren);
|
||||
}
|
||||
if(CollUtil.isNotEmpty(bomRowIds)) {
|
||||
this.getBaseMapper().bomRelease(state, SessionUtil.getUserName(), bomRowIds);
|
||||
//记录-BOM版本RowId
|
||||
List<BomNewPbomChildEntity> pBomChildren = new ArrayList<>();
|
||||
allBom.forEach(k -> {
|
||||
BomNewPbomChildEntity entChild = new BomNewPbomChildEntity();
|
||||
entChild.setRowId(k.getRowId());
|
||||
entChild.setBomVersionRowId(k.getBomRowId());
|
||||
pBomChildren.add(entChild);
|
||||
});
|
||||
if (CollUtil.isNotEmpty(pBomChildren)) {
|
||||
pbomChildService.updateBatchById(pBomChildren);
|
||||
}
|
||||
|
||||
//历史版本转移到formal正式工作表
|
||||
pBomToFormal(bomRowIds, parentMaterialNos,parent.getFacCode());
|
||||
//历史版本转移到formal正式工作表
|
||||
pBomToFormal(bomRowIds, parentMaterialNos, parent.getFacCode());
|
||||
}
|
||||
|
||||
// SpringUtil.getBean(BomNewPbomParentFormalService.class).copyPbomFormal(bomRowId);
|
||||
} catch (Exception ex) {
|
||||
|
|
|
|||
|
|
@ -89,10 +89,13 @@ public class EBomToPBomForFormalNew extends FormalEBomToPbomBase {
|
|||
continue;
|
||||
}
|
||||
//检查是否用户跟用户节点()
|
||||
List<String> childMaterialNos = SpringUtil.getBean(BomNewPbomParentMapper.class).getPBomExistMaterialInChildForWorkList(parentEnt.getMaterialNo());
|
||||
if(CollUtil.isEmpty(childMaterialNos)){
|
||||
parentEnt.setUserRootIs(1);
|
||||
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)) {
|
||||
//合并子级
|
||||
|
|
|
|||
Loading…
Reference in New Issue