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() {
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())) {
BomNewEbomParentVO lastVirtualPackage = getLastVirtualPackage(vo, VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE);
if (Objects.nonNull(lastVirtualPackage)) {
liftingLayerSummary(lastVirtualPackage, vo);
vo.setSourceRowId(String.valueOf(vo.getParentRowId()));
vo.setSourceParentMaterialNo(getParentMaterialNo(vo.getBomRowId()));
vo.setParentRowId(lastVirtualPackage.getBomRowId());
result.add(vo);
liftingLayerSummary(lastVirtualPackage, newVo);
newVo.setSourceRowId(String.valueOf(vo.getParentRowId()));
newVo.setSourceParentMaterialNo(getParentMaterialNo(vo.getBomRowId()));
newVo.setParentRowId(lastVirtualPackage.getBomRowId());
result.add(newVo);
}
continue;
}
if (StrUtil.isNotBlank(vo.getProjectType()) && vo.getProjectType().equals(VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE.getProductTypeKey())) {
BomNewEbomParentVO lastVirtualPackage = getLastVirtualPackage(vo, VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE);
if (Objects.nonNull(lastVirtualPackage)) {
liftingLayerSummary(lastVirtualPackage, vo);
liftingLayerSummary(lastVirtualPackage, newVo);
vo.setSourceRowId(String.valueOf(vo.getParentRowId()));
vo.setSourceParentMaterialNo(getParentMaterialNo(vo.getBomRowId()));
vo.setParentRowId(lastVirtualPackage.getBomRowId());
result.add(vo);
result.add(newVo);
}
continue;
}
result.add(vo);
result.add(newVo);
}
}