diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/impl/BusMaterialbatchdemandplanServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/impl/BusMaterialbatchdemandplanServiceImpl.java index c65d9d5e..92eccbfa 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/impl/BusMaterialbatchdemandplanServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/cailiaoshebei/service/impl/BusMaterialbatchdemandplanServiceImpl.java @@ -93,20 +93,20 @@ public class BusMaterialbatchdemandplanServiceImpl extends ServiceImpl busBiddingPlanVos = busBiddingPlanService.getBillofquantitiesLimitListVo(bo1); - if (busBiddingPlanVos != null && !busBiddingPlanVos.isEmpty()) { - Set hashSet = new HashSet<>(); - busBiddingPlanVos.stream().forEach(vo -> { - hashSet.add(vo.getName()+"+"+vo.getSpecification()); - }); - Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); - List list = result.getRecords().stream().filter(vo -> { - String key = vo.getName() + "+" + vo.getSpecification(); // 拼接字符串(需与 Set 中格式一致) - return hashSet.contains(key); // 仅保留 Set 中存在的数据 - }).toList(); - result.setRecords(list); - return TableDataInfo.build(result); + if (busBiddingPlanVos == null || busBiddingPlanVos.isEmpty()) { + throw new ServiceException("该供应商暂无材料"); } - return null; + Set hashSet = new HashSet<>(); + busBiddingPlanVos.stream().forEach(vo -> { + hashSet.add(vo.getName()+"+"+vo.getSpecification()); + }); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + List list = result.getRecords().stream().filter(vo -> { + String key = vo.getName() + "+" + vo.getSpecification(); // 拼接字符串(需与 Set 中格式一致) + return hashSet.contains(key); // 仅保留 Set 中存在的数据 + }).toList(); + result.setRecords(list); + return TableDataInfo.build(result); } /**