Merge branch 'refs/heads/feature/DM/nflg-bom' into feature/DM/nflg-bom-transition

This commit is contained in:
曹鹏飞 2024-06-23 16:48:34 +08:00
commit 390a790640
1 changed files with 10 additions and 8 deletions

View File

@ -233,29 +233,31 @@ 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, vo); liftingLayerSummary(lastVirtualPackage, newVo);
vo.setSourceRowId(String.valueOf(vo.getParentRowId())); newVo.setSourceRowId(String.valueOf(vo.getParentRowId()));
vo.setSourceParentMaterialNo(getParentMaterialNo(vo.getBomRowId())); newVo.setSourceParentMaterialNo(getParentMaterialNo(vo.getBomRowId()));
vo.setParentRowId(lastVirtualPackage.getBomRowId()); newVo.setParentRowId(lastVirtualPackage.getBomRowId());
result.add(vo); result.add(newVo);
} }
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, vo); liftingLayerSummary(lastVirtualPackage, newVo);
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(vo); result.add(newVo);
} }
continue; continue;
} }
result.add(vo); result.add(newVo);
} }
} }