fix:需求单查询获取中鼎库存重复值报错问题

This commit is contained in:
zhaoyf
2026-09-15 10:13:42 +08:00
parent bb7226b953
commit 791ee15689

View File

@@ -93,7 +93,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,
(v1, v2) -> v2
));
for (PmDemandDto record : records) {
record.setLkInv(collect.get(record.getSkuCode()));