|
@@ -240,10 +240,18 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<Long, List<Inventory>> getInventoryMap(QuantityDto dto) {
|
|
|
- return mapKGroup(Inventory::getBomSpecId, q -> q
|
|
|
+ public Map<Long, List<InventoryVo>> getInventoryMap(QuantityDto dto) {
|
|
|
+ List<InventoryVo> list = Sql.create(InventoryVo.class)
|
|
|
+ .selectAll(Inventory.class)
|
|
|
+ .selectAs(BomSpec::getName, InventoryVo::getBomSpecName)
|
|
|
+ .selectAs(BomSpec::getCode, InventoryVo::getBomSpecCode)
|
|
|
+ .from(Inventory.class)
|
|
|
+ .leftJoin(BomSpec.class, Inventory::getBomSpecId)
|
|
|
.eq(Inventory::getWarehouseId, dto.getWarehouseId())
|
|
|
- .in(Inventory::getBomSpecId, dto.getBomSpecIdList()));
|
|
|
+ .in(Inventory::getBomSpecId, dto.getBomSpecIdList())
|
|
|
+ .list();
|
|
|
+
|
|
|
+ return list.stream().collect(Collectors.groupingBy(Inventory::getBomSpecId));
|
|
|
}
|
|
|
|
|
|
/**
|