|
@@ -149,8 +149,18 @@ public class SettlementManageBillServiceImpl extends ServiceImpl<SettlementManag
|
|
|
@Override
|
|
|
public StoreBillStatistics storeBillSettlement(Long storeId, Date startTime, Date endTime) {
|
|
|
// 1. 查询洗衣订单
|
|
|
+ List<String> orderStatuss = CollUtil.newArrayList(
|
|
|
+ ClothOrderStatusType.WAIT_FACTORY.getCode(),
|
|
|
+ ClothOrderStatusType.WASHING.getCode(),
|
|
|
+ ClothOrderStatusType.HAS_WASH.getCode(),
|
|
|
+ ClothOrderStatusType.WAITING_FOR_COMMENT.getCode(),
|
|
|
+ ClothOrderStatusType.WAITING_TO_SEND.getCode(),
|
|
|
+ ClothOrderStatusType.WAITING_FOR_HANG.getCode(),
|
|
|
+ ClothOrderStatusType.SENDING.getCode(),
|
|
|
+ ClothOrderStatusType.FINISH.getCode()
|
|
|
+ );
|
|
|
List<OrderCloth> orderClothList = orderClothService.list(new QueryWrapper<OrderCloth>().lambda()
|
|
|
- .ne(OrderCloth::getOrderStatus, ClothOrderStatusType.CANCEL.getCode())
|
|
|
+ .in(OrderCloth::getOrderStatus, orderStatuss)
|
|
|
.eq(OrderCloth::getSourceType, SourceType.STORE.getCode())
|
|
|
.eq(OrderCloth::getOrgId, storeId)
|
|
|
.between(OrderCloth::getCreateTime, startTime, endTime));
|
|
@@ -297,12 +307,12 @@ public class SettlementManageBillServiceImpl extends ServiceImpl<SettlementManag
|
|
|
stats.setTransactionCount(orderList.stream()
|
|
|
.filter(order -> PayStatus.HAS_PAY.getCode().equals(order.getPayStatus()))
|
|
|
.count());
|
|
|
-// stats.setGoodsCount(
|
|
|
-// orderList.stream()
|
|
|
-// .map(OrderGoods::get)
|
|
|
-// .filter(Objects::nonNull)
|
|
|
-// .reduce(0, Integer::sum)
|
|
|
-// );
|
|
|
+ stats.setGoodsCount(
|
|
|
+ orderList.stream()
|
|
|
+ .map(OrderGoods::getGoodsCount)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .reduce(0, Integer::sum)
|
|
|
+ );
|
|
|
|
|
|
// 2. 订单金额统计
|
|
|
BigDecimal totalAmount = orderList.stream()
|