转PBOM-bug修复
This commit is contained in:
parent
721287c899
commit
60a807daec
|
|
@ -271,20 +271,22 @@ public abstract class EBomToPbomBase {
|
||||||
//创建工艺包版本
|
//创建工艺包版本
|
||||||
BomNewPbomParentEntity artParent = buildPBomParent(Convert.convert(BomNewEbomParentVO.class, oldPBomAddItem), facCode, parentList);
|
BomNewPbomParentEntity artParent = buildPBomParent(Convert.convert(BomNewEbomParentVO.class, oldPBomAddItem), facCode, parentList);
|
||||||
//old 工艺包子级
|
//old 工艺包子级
|
||||||
|
if(Objects.nonNull(artParent)) {
|
||||||
List<BomNewPbomParentVO> oldArtChildren = SpringUtil.getBean(BomNewPbomParentService.class).getChild(oldPBomAddItem.getBomRowId(), 1);
|
List<BomNewPbomParentVO> oldArtChildren = SpringUtil.getBean(BomNewPbomParentService.class).getChild(oldPBomAddItem.getBomRowId(), 1);
|
||||||
for (BomNewPbomParentVO oldArtChild : oldArtChildren) {
|
for (BomNewPbomParentVO oldArtChild : oldArtChildren) {
|
||||||
//工艺包新增
|
//工艺包新增
|
||||||
if (StrUtil.isBlank(oldArtChild.getOriginalMaterialNo())) {
|
if (StrUtil.isBlank(oldArtChild.getOriginalMaterialNo())) {
|
||||||
buildPBomAddChild(artParent, facCode, oldArtChild);
|
buildPBomAddChild(artParent, facCode, oldArtChild);
|
||||||
}
|
}
|
||||||
if(StrUtil.isNotBlank(oldArtChild.getOriginalMaterialNo()) && newBomChildrenMap.containsKey(oldArtChild.getOriginalMaterialNo())){
|
if (StrUtil.isNotBlank(oldArtChild.getOriginalMaterialNo()) && newBomChildrenMap.containsKey(oldArtChild.getOriginalMaterialNo())) {
|
||||||
// newBomChildrenMap.get(oldArtChild.getOriginalMaterialNo()).setParentRowId(artParent.getRowId());
|
// newBomChildrenMap.get(oldArtChild.getOriginalMaterialNo()).setParentRowId(artParent.getRowId());
|
||||||
buildPBomAddChild(artParent, facCode, Convert.convert(BomNewPbomParentVO.class,newBomChildrenMap.get(oldArtChild.getOriginalMaterialNo()) ));
|
buildPBomAddChild(artParent, facCode, Convert.convert(BomNewPbomParentVO.class, newBomChildrenMap.get(oldArtChild.getOriginalMaterialNo())));
|
||||||
delResult.add(oldArtChild.getOriginalMaterialNo());
|
delResult.add(oldArtChild.getOriginalMaterialNo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//pBom中修改过的
|
//pBom中修改过的
|
||||||
List<BomNewPbomParentVO> oldPBomUpdateChildren = oldChildren.stream().filter(u -> StrUtil.isNotBlank(u.getOriginalMaterialNo())).collect(Collectors.toList());
|
List<BomNewPbomParentVO> oldPBomUpdateChildren = oldChildren.stream().filter(u -> StrUtil.isNotBlank(u.getOriginalMaterialNo())).collect(Collectors.toList());
|
||||||
for (BomNewPbomParentVO oldPBomUpdateChild : oldPBomUpdateChildren) {
|
for (BomNewPbomParentVO oldPBomUpdateChild : oldPBomUpdateChildren) {
|
||||||
|
|
|
||||||
|
|
@ -275,20 +275,22 @@ public abstract class FormalEBomToPbomBase {
|
||||||
//创建工艺包版本
|
//创建工艺包版本
|
||||||
BomNewPbomParentEntity artParent = buildPBomParent(Convert.convert(BomNewEbomParentVO.class, oldPBomAddItem), facCode, parentList);
|
BomNewPbomParentEntity artParent = buildPBomParent(Convert.convert(BomNewEbomParentVO.class, oldPBomAddItem), facCode, parentList);
|
||||||
//old 工艺包子级
|
//old 工艺包子级
|
||||||
|
if(Objects.nonNull(artParent)) {
|
||||||
List<BomNewPbomParentVO> oldArtChildren = SpringUtil.getBean(BomNewPbomParentService.class).getChild(oldPBomAddItem.getBomRowId(), 1);
|
List<BomNewPbomParentVO> oldArtChildren = SpringUtil.getBean(BomNewPbomParentService.class).getChild(oldPBomAddItem.getBomRowId(), 1);
|
||||||
for (BomNewPbomParentVO oldArtChild : oldArtChildren) {
|
for (BomNewPbomParentVO oldArtChild : oldArtChildren) {
|
||||||
//工艺包新增
|
//工艺包新增
|
||||||
if (StrUtil.isBlank(oldArtChild.getOriginalMaterialNo())) {
|
if (StrUtil.isBlank(oldArtChild.getOriginalMaterialNo())) {
|
||||||
buildPBomAddChild(artParent, facCode, oldArtChild);
|
buildPBomAddChild(artParent, facCode, oldArtChild);
|
||||||
}
|
}
|
||||||
if(StrUtil.isNotBlank(oldArtChild.getOriginalMaterialNo()) && newBomChildrenMap.containsKey(oldArtChild.getOriginalMaterialNo())){
|
if (StrUtil.isNotBlank(oldArtChild.getOriginalMaterialNo()) && newBomChildrenMap.containsKey(oldArtChild.getOriginalMaterialNo())) {
|
||||||
// newBomChildrenMap.get(oldArtChild.getOriginalMaterialNo()).setParentRowId(artParent.getRowId());
|
// newBomChildrenMap.get(oldArtChild.getOriginalMaterialNo()).setParentRowId(artParent.getRowId());
|
||||||
buildPBomAddChild(artParent, facCode, Convert.convert(BomNewPbomParentVO.class,newBomChildrenMap.get(oldArtChild.getOriginalMaterialNo()) ));
|
buildPBomAddChild(artParent, facCode, Convert.convert(BomNewPbomParentVO.class, newBomChildrenMap.get(oldArtChild.getOriginalMaterialNo())));
|
||||||
delResult.add(oldArtChild.getOriginalMaterialNo());
|
delResult.add(oldArtChild.getOriginalMaterialNo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//pBom中修改过的
|
//pBom中修改过的
|
||||||
List<BomNewPbomParentVO> oldPBomUpdateChildren = oldChildren.stream().filter(u -> StrUtil.isNotBlank(u.getOriginalMaterialNo())).collect(Collectors.toList());
|
List<BomNewPbomParentVO> oldPBomUpdateChildren = oldChildren.stream().filter(u -> StrUtil.isNotBlank(u.getOriginalMaterialNo())).collect(Collectors.toList());
|
||||||
for (BomNewPbomParentVO oldPBomUpdateChild : oldPBomUpdateChildren) {
|
for (BomNewPbomParentVO oldPBomUpdateChild : oldPBomUpdateChildren) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue