bug修改

This commit is contained in:
2025-09-06 18:35:51 +08:00
parent 95c2858a64
commit 66e8495859

View File

@ -93,20 +93,20 @@ public class BusMaterialbatchdemandplanServiceImpl extends ServiceImpl<BusMateri
bo1.setType("2"); bo1.setType("2");
bo1.setWinningBidderId(bo.getSupplierId()); bo1.setWinningBidderId(bo.getSupplierId());
List<BusBillofquantitiesLimitListVo> busBiddingPlanVos = busBiddingPlanService.getBillofquantitiesLimitListVo(bo1); List<BusBillofquantitiesLimitListVo> busBiddingPlanVos = busBiddingPlanService.getBillofquantitiesLimitListVo(bo1);
if (busBiddingPlanVos != null && !busBiddingPlanVos.isEmpty()) { if (busBiddingPlanVos == null || busBiddingPlanVos.isEmpty()) {
Set<String> hashSet = new HashSet<>(); throw new ServiceException("该供应商暂无材料");
busBiddingPlanVos.stream().forEach(vo -> {
hashSet.add(vo.getName()+"+"+vo.getSpecification());
});
Page<BusMaterialbatchdemandplanVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
List<BusMaterialbatchdemandplanVo> 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);
} }
return null; Set<String> hashSet = new HashSet<>();
busBiddingPlanVos.stream().forEach(vo -> {
hashSet.add(vo.getName()+"+"+vo.getSpecification());
});
Page<BusMaterialbatchdemandplanVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
List<BusMaterialbatchdemandplanVo> 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);
} }
/** /**