feat(pbom): pbom导入到SAP时,将所有子级发货包数据提层到顶级发货包中
This commit is contained in:
parent
c0a9a36d42
commit
785e907aa0
|
|
@ -145,11 +145,11 @@ public class BomNewPbomExportToSAPImpl implements IBomNewPbomExportToSAP {
|
|||
private void buildChildrenForSap(Long cRowId, BomNewPbomParentEntity p, BomNewPbomChildEntity c) {
|
||||
List<BomNewPbomChildEntity> cc = getChildren(p);
|
||||
for (BomNewPbomChildEntity it : cc) {
|
||||
if (is21 && !isForSale && !Objects.equals(it.getVirtualPartType(), VirtualPackageTypeEnum.UN_VIRTUAL_PACKAGE.getValue())) {
|
||||
if (is21 && !isForSale && !Objects.equals(it.getVirtualPartType(), VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getValue())) {
|
||||
return;
|
||||
}
|
||||
if (Objects.equals(it.getVirtualPartType(), VirtualPackageTypeEnum.UN_VIRTUAL_PACKAGE.getValue())) {
|
||||
if (Objects.equals(c.getVirtualPartType(), VirtualPackageTypeEnum.DELIVERY_PACKAGE.getValue())) {
|
||||
if (Objects.equals(c.getVirtualPartType(), VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getValue())) {
|
||||
if (Objects.isNull(cRowId)) {
|
||||
LOGGER.debug("{} 添加物料 编号:{},父级编号:{},数量:{},描述:{}", TAG, it.getMaterialNo(), c.getMaterialNo(), it.getNum().toString(), it.getMaterialDesc());
|
||||
children.add(convert(it, c.getMaterialNo()));
|
||||
|
|
@ -174,6 +174,9 @@ public class BomNewPbomExportToSAPImpl implements IBomNewPbomExportToSAP {
|
|||
LOGGER.debug("{} 添加物料 编号:{},父级编号:{},数量:{},描述:{}", TAG, it.getMaterialNo(), c.getMaterialNo(), it.getNum().toString(), it.getMaterialDesc());
|
||||
children.add(convert(it, c.getMaterialNo()));
|
||||
}
|
||||
} else if (!Objects.equals(it.getVirtualPartType(), VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getValue())) {
|
||||
LOGGER.debug("{} 添加物料 编号:{},父级编号:{},数量:{},描述:{}", TAG, it.getMaterialNo(), c.getMaterialNo(), it.getNum().toString(), it.getMaterialDesc());
|
||||
children.add(convert(it, c.getMaterialNo()));
|
||||
}
|
||||
List<BomNewPbomParentEntity> cp = getParents(it);
|
||||
cp.forEach(cpt -> {
|
||||
|
|
|
|||
Loading…
Reference in New Issue