|
@@ -2830,7 +2830,10 @@ public class ExportServiceImpl implements ExportService {
|
|
|
if (!CollectionUtils.isEmpty(sellOrders)) {
|
|
|
sellOrderMap = sellOrders.stream().collect(Collectors.groupingBy(SellOrder::getOrderId));
|
|
|
//获取商品列表
|
|
|
- List<Goods> goodsList = goodsService.findGoodsByIds(sellOrders.stream().map(e -> e.getGoodsId().toString()).distinct().collect(Collectors.joining(",")));
|
|
|
+ List<Goods> goodsList = goodsService.findGoodsByIds(sellOrders.stream().filter(e->e.getGoodsSkuId()==null)
|
|
|
+ .map(e -> e.getGoodsId().toString()).distinct().collect(Collectors.joining(",")));
|
|
|
+ goodsList.addAll(goodsService.findGoodsByIds(sellOrders.stream().filter(e->e.getGoodsSkuId() != null)
|
|
|
+ .map(e -> e.getGoodsSkuId().toString()).distinct().collect(Collectors.joining(","))));
|
|
|
goodsMap = goodsList.stream().collect(Collectors.toMap(Goods::getId, Function.identity()));
|
|
|
}
|
|
|
|
|
@@ -3283,7 +3286,7 @@ public class ExportServiceImpl implements ExportService {
|
|
|
} else if (basicOrder.getSaleAmount().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
//计算销售收入,排除商品编号是76的商品,其他的商品按分类统计
|
|
|
for (SellOrder e : sellOrderList) {
|
|
|
- this.setSaleFee(basicOrder, e, goodsMap.get(e.getGoodsId()));
|
|
|
+ this.setSaleFee(basicOrder, e, goodsMap.get(e.getGoodsSkuId() == null ? e.getGoodsId() : e.getGoodsSkuId()));
|
|
|
}
|
|
|
}
|
|
|
}
|