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