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