Merge remote-tracking branch 'origin/feature/DM/nflg-bom' into feature/DM/nflg-bom

This commit is contained in:
大米 2024-01-12 09:17:52 +08:00
commit 7f8f9dcd27
2 changed files with 2 additions and 1 deletions

View File

@ -117,6 +117,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
} }
if (StrUtil.isNotBlank(materialNo)) { if (StrUtil.isNotBlank(materialNo)) {
List<String> parentMaterialByMaterialNo = getParentMaterialByMaterialNo(materialNo, !userRoleService.technician()).stream().collect(Collectors.toList()); List<String> parentMaterialByMaterialNo = getParentMaterialByMaterialNo(materialNo, !userRoleService.technician()).stream().collect(Collectors.toList());
parentMaterialByMaterialNo.add(materialNo);
if (CollUtil.isNotEmpty(parentMaterialByMaterialNo)) { if (CollUtil.isNotEmpty(parentMaterialByMaterialNo)) {
List<BomNewEbomParentVO> parents = this.getBaseMapper().getParentForMaterialNoSeach(parentMaterialByMaterialNo); List<BomNewEbomParentVO> parents = this.getBaseMapper().getParentForMaterialNoSeach(parentMaterialByMaterialNo);
List<BomNewEbomParentVO> childs = this.getBaseMapper().getChildForMaterialNoSeach(parentMaterialByMaterialNo, materialNo); List<BomNewEbomParentVO> childs = this.getBaseMapper().getChildForMaterialNoSeach(parentMaterialByMaterialNo, materialNo);

View File

@ -153,7 +153,7 @@ public class CheckEBomException {
// }); // });
// } // }
//是否存在重复物料 //是否存在重复物料
List<BomNewEbomParentVO> hasMaterialNoList = child.stream().filter(u -> StrUtil.isBlank(u.getMaterialNo())).collect(Collectors.toList()); List<BomNewEbomParentVO> hasMaterialNoList = child.stream().filter(u -> StrUtil.isNotBlank(u.getMaterialNo())).collect(Collectors.toList());
Map<String, List<BomNewEbomParentVO>> childMaterialMap = ListCommonUtil.listGroupMap(hasMaterialNoList, BomNewEbomParentVO::getMaterialNo); Map<String, List<BomNewEbomParentVO>> childMaterialMap = ListCommonUtil.listGroupMap(hasMaterialNoList, BomNewEbomParentVO::getMaterialNo);
for (String key : childMaterialMap.keySet()) { for (String key : childMaterialMap.keySet()) {
List<BomNewEbomParentVO> materialGroupList = childMaterialMap.get(key); List<BomNewEbomParentVO> materialGroupList = childMaterialMap.get(key);