fix(pbom): 31编码的才一定需要生成虚拟包
This commit is contained in:
parent
b34c3523e8
commit
e1f093023d
|
|
@ -54,12 +54,15 @@ public class BomNewPbomExportToSAPImpl implements IBomNewPbomExportToSAP {
|
||||||
List<BomNewPbomChildEntity> rcs = bomNewPbomChildService.lambdaQuery()
|
List<BomNewPbomChildEntity> rcs = bomNewPbomChildService.lambdaQuery()
|
||||||
.eq(BomNewPbomChildEntity::getParentRowId, rootBomRowId)
|
.eq(BomNewPbomChildEntity::getParentRowId, rootBomRowId)
|
||||||
.list();
|
.list();
|
||||||
|
if (root.getMaterialNo().startsWith("31")) {
|
||||||
List<BomNewPbomChildEntity> unVirtualParts = rcs.stream()
|
List<BomNewPbomChildEntity> unVirtualParts = rcs.stream()
|
||||||
.filter(c -> Objects.equals(c.getVirtualPartType(), VirtualPackageTypeEnum.UN_VIRTUAL_PACKAGE.getValue()))
|
.filter(c -> Objects.equals(c.getVirtualPartType(), VirtualPackageTypeEnum.UN_VIRTUAL_PACKAGE.getValue())
|
||||||
|
&& !StrUtil.equals(BomConstant.PROJECT_TYPE_TEMPORARY, c.getProjectType(), true))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (CollUtil.isNotEmpty(unVirtualParts)) {
|
if (CollUtil.isNotEmpty(unVirtualParts)) {
|
||||||
return unVirtualParts.stream().map(c -> OperationErrorMsgVO.create(c.getMaterialNo(), "未生成发货包")).collect(Collectors.toList());
|
return unVirtualParts.stream().map(c -> OperationErrorMsgVO.create(c.getMaterialNo(), "未生成发货包")).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
children.addAll(convert(rcs, root.getMaterialNo()));
|
children.addAll(convert(rcs, root.getMaterialNo()));
|
||||||
rcs.forEach(it -> {
|
rcs.forEach(it -> {
|
||||||
List<BomNewPbomParentEntity> cps = getParents(it);
|
List<BomNewPbomParentEntity> cps = getParents(it);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue