F提层后造成的空包要递归往上检查删除2-先不发生产
This commit is contained in:
parent
ad91ce1a18
commit
a5095fe55a
|
|
@ -739,20 +739,23 @@ public abstract class EBomToPbomBase {
|
|||
else {
|
||||
addEBomNew.add(parentBom.getBomRowId());
|
||||
}
|
||||
|
||||
//如子级都为F 项父级也不转
|
||||
Set<String> projectSet = newParentChild.stream().map(u -> u.getProjectType().toUpperCase()).collect(Collectors.toSet());
|
||||
if (CollUtil.isNotEmpty(projectSet)) {
|
||||
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);
|
||||
parentBom.setNotToPBomForFZ(BomConstant.YES);
|
||||
childDelMaterialNos.add(parentBom.getMaterialNo());
|
||||
}
|
||||
}
|
||||
//如子级都为F 项父级也不转
|
||||
Set<String> projectSet = newParentChild.stream().map(u -> u.getProjectType().toUpperCase()).collect(Collectors.toSet());
|
||||
if (CollUtil.isNotEmpty(projectSet)) {
|
||||
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);
|
||||
parentBom.setNotToPBomForFZ(BomConstant.YES);
|
||||
childDelMaterialNos.add(parentBom.getMaterialNo());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
List<BomNewEbomParentVO> FzItem = allBomDetail.stream().filter(u -> StrUtil.isNotBlank(u.getProjectType()) && ImmutableList.of("F", "Z").contains(u.getProjectType())).collect(Collectors.toList());
|
||||
FzItem.forEach(u->{
|
||||
u.setNotToPBomForFZ(BomConstant.YES);
|
||||
});
|
||||
//递归 F,Z项所有父级
|
||||
handlerFZEmptyBom();
|
||||
|
||||
|
|
@ -764,9 +767,11 @@ public abstract class EBomToPbomBase {
|
|||
List<BomNewEbomParentVO> parentBoms = getParentForAllSubNodeIsNotToPBomForFZ();
|
||||
while (CollUtil.isNotEmpty(parentBoms)){
|
||||
parentBoms.forEach(u->{
|
||||
u.setNoConvertToPBomIs(1);
|
||||
u.setNotToPBomForFZ(BomConstant.YES);
|
||||
childDelMaterialNos.add(u.getMaterialNo());
|
||||
if (!VirtualPackageTypeEnum.DIRECT_DELIVERY_PACKAGE.getProductTypeKey().equals(u.getVirtualPartType()) && !VirtualPackageTypeEnum.PRE_ASSEMBLY_PACKAGE.getProductTypeKey().equals(u.getVirtualPartType())) {
|
||||
u.setNoConvertToPBomIs(1);
|
||||
u.setNotToPBomForFZ(BomConstant.YES);
|
||||
childDelMaterialNos.add(u.getMaterialNo());
|
||||
}
|
||||
});
|
||||
parentBoms = getParentForAllSubNodeIsNotToPBomForFZ();
|
||||
}
|
||||
|
|
@ -811,6 +816,10 @@ public abstract class EBomToPbomBase {
|
|||
|
||||
|
||||
}
|
||||
List<BomNewEbomParentVO> FzItem = allBomDetail.stream().filter(u -> StrUtil.isNotBlank(u.getProjectType()) && ImmutableList.of("F", "Z").contains(u.getProjectType())).collect(Collectors.toList());
|
||||
FzItem.forEach(u->{
|
||||
u.setNotToPBomForFZ(BomConstant.YES);
|
||||
});
|
||||
|
||||
//递归 F,Z项所有父级
|
||||
handlerFZEmptyBom();
|
||||
|
|
|
|||
Loading…
Reference in New Issue