|
@@ -423,7 +423,9 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
|
|
|
|
List<Goods> goodsList = goodsService.findGoodsByIds(goodsIdsStr);
|
|
|
Map<Integer, Goods> goodsMap = goodsList.stream().collect(Collectors.toMap(Goods::getId, t -> t));
|
|
|
- BigDecimal totalGroupPurchasePrice = goodsMap.values().stream().map(Goods::getGroupPurchasePrice).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ BigDecimal totalGroupPurchasePrice =
|
|
|
+ goodsSellDtos.stream().map(t -> goodsMap.get(t.getGoodsId()).getGroupPurchasePrice().
|
|
|
+ multiply(new BigDecimal(t.getGoodsNum()))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
|
Goods goods = null;
|
|
|
for (String goodsIdStr : goodsIdsStr.split(",")) {
|