feat(ebom): 导入到SAP时不再移除空的直发包

This commit is contained in:
曹鹏飞 2024-08-06 11:47:46 +08:00
parent 09c2b1c8ee
commit b193c5917f
1 changed files with 8 additions and 8 deletions

View File

@ -57,14 +57,14 @@ public class BomNewEbomExportToSAP {
SapStatusEnum state = SapStatusEnum.PUB_ERROR_ALL; SapStatusEnum state = SapStatusEnum.PUB_ERROR_ALL;
try { try {
buildChildrenForSap(root); buildChildrenForSap(root);
//移除空的直发包 // //移除空的直发包
Set<String> zfbMaterialNos = this.children.stream().filter(T1ExtDTO::isZFB).map(T1ExtDTO::getIDNRK).collect(Collectors.toSet()); // Set<String> zfbMaterialNos = this.children.stream().filter(T1ExtDTO::isZFB).map(T1ExtDTO::getIDNRK).collect(Collectors.toSet());
if (CollUtil.isNotEmpty(zfbMaterialNos)) { // if (CollUtil.isNotEmpty(zfbMaterialNos)) {
Set<String> allMaterialNos = this.children.stream().map(T1ExtDTO::getMATNR).collect(Collectors.toSet()); // Set<String> allMaterialNos = this.children.stream().map(T1ExtDTO::getMATNR).collect(Collectors.toSet());
zfbMaterialNos.removeAll(allMaterialNos); // zfbMaterialNos.removeAll(allMaterialNos);
LOGGER.debug("{} 移除空的直发包:{}", TAG, String.join(",", zfbMaterialNos)); // LOGGER.debug("{} 移除空的直发包:{}", TAG, String.join(",", zfbMaterialNos));
this.children.removeIf(c -> c.isZFB() && zfbMaterialNos.contains(c.getIDNRK())); // this.children.removeIf(c -> c.isZFB() && zfbMaterialNos.contains(c.getIDNRK()));
} // }
ImportSapParamDTO sapDto = new ImportSapParamDTO(); ImportSapParamDTO sapDto = new ImportSapParamDTO();
sapDto.setZID(RandomUtil.randomNumbers(5)); sapDto.setZID(RandomUtil.randomNumbers(5));