fix:需求单查询中鼎库存重复key问题

This commit is contained in:
zhaoyf
2026-11-05 15:33:43 +08:00
parent 5800ced076
commit bb5214416c

View File

@@ -125,7 +125,8 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
List<ZDInventory> zdInventorys = responseEntity.getBody();
Map<String, BigDecimal> collect = zdInventorys.stream().collect(Collectors.toMap(
ZDInventory::getSkuCode,
ZDInventory::getQty
ZDInventory::getQty,
(t1,t2) -> t2.add(t1)
));
for (PmDemandDto record : records) {
record.setLkInv(collect.get(record.getSkuCode()));