parent
45381290e9
commit
4f928b6839
|
|
@ -72,7 +72,7 @@ public class EBomToPBom extends EBomToPbomBase {
|
|||
// buildUpgradeChangeDetail(vo, VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE);
|
||||
|
||||
//子级
|
||||
List<BomNewEbomParentVO> child = result.stream().filter(u -> u.getParentRowId().equals(vo.getBomRowId())).distinct().collect(Collectors.toList());
|
||||
List<BomNewEbomParentVO> child = result.stream().filter(u -> u.getParentRowId().equals(vo.getBomRowId()) && !childDelMaterialNos.contains(u.getMaterialNo())).distinct().collect(Collectors.toList());
|
||||
List<BomNewEbomParentVO> mergeChild = mergeChild(child);
|
||||
if( compareContentIsSame(vo, mergeChild, facCode)){
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public class EBomToPBomFor31 extends EBomToPbomBase {
|
|||
// buildUpgradeChangeDetail(vo, VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE);
|
||||
|
||||
//子级
|
||||
List<BomNewEbomParentVO> child = facBomDataMp.get(facCode).stream().filter(u -> u.getParentRowId().equals(vo.getBomRowId())).distinct().collect(Collectors.toList());
|
||||
List<BomNewEbomParentVO> child = facBomDataMp.get(facCode).stream().filter(u -> u.getParentRowId().equals(vo.getBomRowId()) && !childDelMaterialNos.contains(u.getMaterialNo())).collect(Collectors.toList());
|
||||
List<BomNewEbomParentVO> mergeChild = mergeChild(child);
|
||||
if( compareContentIsSame(vo, mergeChild, facCode)){
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public class EBomToPBomForFormal extends EBomToPbomBase {
|
|||
// buildUpgradeChangeDetail(vo, VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE);
|
||||
|
||||
//子级
|
||||
List<BomNewEbomParentVO> child = result.stream().filter(u -> u.getParentRowId().equals(vo.getBomRowId())).distinct().collect(Collectors.toList());
|
||||
List<BomNewEbomParentVO> child = result.stream().filter(u -> u.getParentRowId().equals(vo.getBomRowId()) && !childDelMaterialNos.contains(u.getMaterialNo())).distinct().collect(Collectors.toList());
|
||||
List<BomNewEbomParentVO> mergeChild = mergeChild(child);
|
||||
if( compareContentIsSame(vo, mergeChild, facCode)){
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ public class EBomToPBomForFormal31 extends EBomToPbomBase {
|
|||
// buildUpgradeChangeDetail(vo, VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE);
|
||||
|
||||
//子级
|
||||
List<BomNewEbomParentVO> child = facBomDataMp.get(facCode).stream().filter(u -> u.getParentRowId().equals(vo.getBomRowId())).distinct().collect(Collectors.toList());
|
||||
List<BomNewEbomParentVO> child = facBomDataMp.get(facCode).stream().filter(u -> u.getParentRowId().equals(vo.getBomRowId()) && !childDelMaterialNos.contains(u.getMaterialNo())).distinct().collect(Collectors.toList());
|
||||
List<BomNewEbomParentVO> mergeChild = mergeChild(child);
|
||||
if( compareContentIsSame(vo, mergeChild, facCode)){
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -68,6 +68,9 @@ public abstract class EBomToPbomBase {
|
|||
|
||||
protected Set<String> hasBuildVNo = Sets.newHashSet();
|
||||
|
||||
//当子级为F项或Z项时-无需转的父级物料
|
||||
protected Set<String> childDelMaterialNos=new HashSet<>();
|
||||
|
||||
public abstract void convert();
|
||||
|
||||
/**
|
||||
|
|
@ -586,6 +589,7 @@ public abstract class EBomToPbomBase {
|
|||
if (!VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getProductTypeKey().equals(parentBom.getVirtualPartType()) && !VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE.getProductTypeKey().equals(parentBom.getVirtualPartType()) &&
|
||||
(ImmutableSet.of("F").equals(projectSet) || ImmutableSet.of("F", "Z").equals(projectSet) || ImmutableSet.of("Z").equals(projectSet))) {
|
||||
parentBom.setNoConvertToPBomIs(1);
|
||||
childDelMaterialNos.add(parentBom.getMaterialNo());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -608,6 +612,7 @@ public abstract class EBomToPbomBase {
|
|||
if (!VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getProductTypeKey().equals(parentBom.getVirtualPartType()) && !VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE.getProductTypeKey().equals(parentBom.getVirtualPartType()) &&
|
||||
(ImmutableSet.of("F").equals(projectSet) || ImmutableSet.of("F", "Z").equals(projectSet) || ImmutableSet.of("Z").equals(projectSet))) {
|
||||
parentBom.setNoConvertToPBomIs(1);
|
||||
childDelMaterialNos.add(parentBom.getMaterialNo());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -305,6 +305,7 @@ public class OriginalBomToEBomV2Convert extends BaseConvert {
|
|||
parentEntity.setMaterialTexture(baseMaterialVO.getMaterialTexture());
|
||||
parentEntity.setMaterialUnit("KG");
|
||||
parentEntity.setProjectType("L");
|
||||
parentEntity.setDrawingNo(baseMaterialVO.getDrawingNo());
|
||||
parentEntity.setRegReplaceIs(1);
|
||||
} else {
|
||||
parentEntity.setMaterialDesc(parentEntity.getMaterialName());
|
||||
|
|
|
|||
|
|
@ -193,6 +193,8 @@ public class PlmBomToOriginalConvertV2 extends BaseConvert {
|
|||
parentEntity.setMaterialDesc(baseMaterialVO.getMaterialDesc());
|
||||
parentEntity.setMaterialTexture(baseMaterialVO.getMaterialTexture());
|
||||
parentEntity.setProjectType("L");
|
||||
parentEntity.setDrawingNo(baseMaterialVO.getDrawingNo());
|
||||
parentEntity.setChartNo(baseMaterialVO.getDrawingNo());
|
||||
parentEntity.setRegReplaceIs(1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue