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

This commit is contained in:
曹鹏飞 2024-06-23 19:16:24 +08:00
commit 0e80f4e4f7
4 changed files with 14 additions and 14 deletions

View File

@ -68,6 +68,7 @@ public class EBomDetailTask extends RecursiveTask<List<BomNewEbomParentVO>> {
detailVO.setBomExist(ebomParentEntity.getBomExist()); detailVO.setBomExist(ebomParentEntity.getBomExist());
detailVO.setStatus(ebomParentEntity.getStatus()); detailVO.setStatus(ebomParentEntity.getStatus());
detailVO.setBatchNo(ebomParentEntity.getBatchNo()); detailVO.setBatchNo(ebomParentEntity.getBatchNo());
detailVO.setCreatedBy(ebomParentEntity.getCreatedBy());
} }
} }

View File

@ -76,6 +76,7 @@ public class EBomFormalDetailTask extends RecursiveTask<List<BomNewEbomParentVO>
detailVO.setBomExist(ebomParentEntity.getBomExist()); detailVO.setBomExist(ebomParentEntity.getBomExist());
detailVO.setStatus(ebomParentEntity.getStatus()); detailVO.setStatus(ebomParentEntity.getStatus());
detailVO.setBatchNo(ebomParentEntity.getBatchNo()); detailVO.setBatchNo(ebomParentEntity.getBatchNo());
detailVO.setCreatedBy(ebomParentEntity.getCreatedBy());
} }
} }

View File

@ -80,8 +80,8 @@ public class EBomToPBomForFormal31 extends EBomToPbomBase {
check(); check();
//bom 提层 //bom 提层
liftingLayer(); liftingLayer();
result.forEach(u->u.setLevelNo("")); // result.forEach(u->u.setLevelNo(""));
generateDrawingNo(result, parent.getRowId(), "1"); // generateDrawingNo(result, parent.getRowId(), "1");
splitData(); splitData();
List<String> hasConvert = new ArrayList<>(); List<String> hasConvert = new ArrayList<>();

View File

@ -167,8 +167,8 @@ public abstract class EBomToPbomBase {
} }
//pbom 处于工作表 //pbom 处于工作表
else if (Objects.nonNull(oldParent) && oldParent.getStatus() < EBomStatusEnum.PUBLISHED.getValue()) { else if (Objects.nonNull(oldParent) && oldParent.getStatus() < EBomStatusEnum.PUBLISHED.getValue()) {
if (oldParent.getCreatedBy() == parentVo.getCreatedBy()) { if (oldParent.getCreatedBy().equals( parentVo.getCreatedBy())) {
if (ConvertToPBomModelEnum.OVERRIDE.equals(convertMode.getValue())) { if (ConvertToPBomModelEnum.OVERRIDE.equalsValue(convertMode.getValue())) {
SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId())); SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId()));
oldParent.setCurrentVersion(parentVo.getCurrentVersion()); oldParent.setCurrentVersion(parentVo.getCurrentVersion());
oldParent.setSourceRowId(parentVo.getRowId()); oldParent.setSourceRowId(parentVo.getRowId());
@ -233,31 +233,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);
} }
} }