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.setStatus(ebomParentEntity.getStatus());
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.setStatus(ebomParentEntity.getStatus());
detailVO.setBatchNo(ebomParentEntity.getBatchNo());
detailVO.setCreatedBy(ebomParentEntity.getCreatedBy());
}
}

View File

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

View File

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