PBOM 发布问题

This commit is contained in:
luoliming 2024-06-23 16:54:15 +08:00
parent 1bf8983127
commit 320dd02854
1 changed files with 8 additions and 10 deletions

View File

@ -230,31 +230,29 @@ public abstract class EBomToPbomBase {
*/ */
protected void liftingLayer() { protected void liftingLayer() {
for (BomNewEbomParentVO vo : allBomDetail) { for (BomNewEbomParentVO vo : allBomDetail) {
BomNewEbomParentVO newVo=new BomNewEbomParentVO();
BeanUtil.copyProperties(vo,newVo);
if (StrUtil.isNotBlank(vo.getProjectType()) && vo.getProjectType().equals(VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getProductTypeKey())) { if (StrUtil.isNotBlank(vo.getProjectType()) && vo.getProjectType().equals(VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getProductTypeKey())) {
BomNewEbomParentVO lastVirtualPackage = getLastVirtualPackage(vo, VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE); BomNewEbomParentVO lastVirtualPackage = getLastVirtualPackage(vo, VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE);
if (Objects.nonNull(lastVirtualPackage)) { if (Objects.nonNull(lastVirtualPackage)) {
liftingLayerSummary(lastVirtualPackage, newVo); liftingLayerSummary(lastVirtualPackage, vo);
newVo.setSourceRowId(String.valueOf(vo.getParentRowId())); vo.setSourceRowId(String.valueOf(vo.getParentRowId()));
newVo.setSourceParentMaterialNo(getParentMaterialNo(vo.getBomRowId())); vo.setSourceParentMaterialNo(getParentMaterialNo(vo.getBomRowId()));
newVo.setParentRowId(lastVirtualPackage.getBomRowId()); vo.setParentRowId(lastVirtualPackage.getBomRowId());
result.add(newVo); result.add(vo);
} }
continue; continue;
} }
if (StrUtil.isNotBlank(vo.getProjectType()) && vo.getProjectType().equals(VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE.getProductTypeKey())) { if (StrUtil.isNotBlank(vo.getProjectType()) && vo.getProjectType().equals(VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE.getProductTypeKey())) {
BomNewEbomParentVO lastVirtualPackage = getLastVirtualPackage(vo, VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE); BomNewEbomParentVO lastVirtualPackage = getLastVirtualPackage(vo, VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE);
if (Objects.nonNull(lastVirtualPackage)) { if (Objects.nonNull(lastVirtualPackage)) {
liftingLayerSummary(lastVirtualPackage, newVo); liftingLayerSummary(lastVirtualPackage, vo);
vo.setSourceRowId(String.valueOf(vo.getParentRowId())); vo.setSourceRowId(String.valueOf(vo.getParentRowId()));
vo.setSourceParentMaterialNo(getParentMaterialNo(vo.getBomRowId())); vo.setSourceParentMaterialNo(getParentMaterialNo(vo.getBomRowId()));
vo.setParentRowId(lastVirtualPackage.getBomRowId()); vo.setParentRowId(lastVirtualPackage.getBomRowId());
result.add(newVo); result.add(vo);
} }
continue; continue;
} }
result.add(newVo); result.add(vo);
} }
} }