| | |
| | | settlementDetails = settlementDetailService.selectList(settlementDetailEntityWrapper); |
| | | List<PlatformVO> res = new ArrayList<>(); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | Map<Integer, TDriver> driverMap = driverService.selectList(new EntityWrapper<TDriver>()) |
| | | .stream() |
| | | .collect(Collectors.toMap(TDriver::getId, user -> user)); |
| | | |
| | | Map<Integer, SettlementRecord> settlementRecordMap = settlementRecordService.selectList(new EntityWrapper<SettlementRecord>()) |
| | | .stream() |
| | | .collect(Collectors.toMap(SettlementRecord::getId, user -> user)); |
| | | Map<Integer, TOrderPrivateCar> orderPrivateCarMap = orderPrivateCarService.selectList(new EntityWrapper<TOrderPrivateCar>()) |
| | | .stream() |
| | | .collect(Collectors.toMap(TOrderPrivateCar::getId, user -> user)); |
| | | Map<Integer, TOrderLogistics> orderLogisticsRecordMap = orderLogisticsService.selectList(new EntityWrapper<TOrderLogistics>()) |
| | | .stream() |
| | | .collect(Collectors.toMap(TOrderLogistics::getId, user -> user)); |
| | | // 已结算金额 |
| | | BigDecimal balance = new BigDecimal("0"); |
| | | // 未结算金额 |
| | |
| | | } |
| | | // 查询订单信息 |
| | | // TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(income.getIncomeId()); |
| | | TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectOne(new EntityWrapper<TOrderPrivateCar>() |
| | | .eq("id", income.getIncomeId()) |
| | | .between("insertTime", start, end)); |
| | | |
| | | TOrderPrivateCar tOrderPrivateCar = orderPrivateCarMap.get(income.getIncomeId()); |
| | | if (tOrderPrivateCar==null){ |
| | | continue; |
| | | } |
| | |
| | | // 小件物流 |
| | | // 查询订单信息 |
| | | // TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(income.getIncomeId()); |
| | | TOrderLogistics tOrderLogistics = orderLogisticsService.selectOne(new EntityWrapper<TOrderLogistics>() |
| | | .eq("id", income.getIncomeId()) |
| | | .between("insertTime", start, end)); |
| | | |
| | | TOrderLogistics tOrderLogistics = orderLogisticsRecordMap.get(income.getIncomeId()); |
| | | |
| | | if (tOrderLogistics==null){ |
| | | continue; |
| | | } |
| | |
| | | switch (settlementDetail.getOrderType()){ |
| | | case 1: |
| | | // 专车订单 |
| | | // TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(settlementDetail.getOrderId()); |
| | | TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectOne(new EntityWrapper<TOrderPrivateCar>() |
| | | .eq("id", settlementDetail.getOrderId()) |
| | | .between("insertTime", start, end)); |
| | | TOrderPrivateCar tOrderPrivateCar = orderPrivateCarMap.get(settlementDetail.getOrderId()); |
| | | |
| | | if (tOrderPrivateCar==null){ |
| | | continue; |
| | | } |
| | |
| | | case 4: |
| | | // 小件物流 |
| | | // 查询订单信息 |
| | | // TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(settlementDetail.getOrderId()); |
| | | TOrderLogistics tOrderLogistics = orderLogisticsService.selectOne(new EntityWrapper<TOrderLogistics>() |
| | | .eq("id", settlementDetail.getOrderId()) |
| | | .between("insertTime", start, end)); |
| | | TOrderLogistics tOrderLogistics = orderLogisticsRecordMap.get(settlementDetail.getOrderId()); |
| | | |
| | | if (tOrderLogistics==null){ |
| | | continue; |
| | | } |
| | |
| | | Map<Integer, SettlementDetail> settlementDetailMap = settlementDetailService.selectList(new EntityWrapper<SettlementDetail>()) |
| | | .stream() |
| | | .collect(Collectors.toMap(SettlementDetail::getId, user -> user)); |
| | | Map<Integer, TOrderPrivateCar> orderPrivateCarMap = orderPrivateCarService.selectList(new EntityWrapper<TOrderPrivateCar>()) |
| | | .stream() |
| | | .collect(Collectors.toMap(TOrderPrivateCar::getId, user -> user)); |
| | | Map<Integer, TOrderLogistics> orderLogisticsRecordMap = orderLogisticsService.selectList(new EntityWrapper<TOrderLogistics>()) |
| | | .stream() |
| | | .collect(Collectors.toMap(TOrderLogistics::getId, user -> user)); |
| | | Map<Integer, OrderCancel> orderCancelRecordMap = orderCancelService.selectList(new EntityWrapper<OrderCancel>() |
| | | ) |
| | | .stream() |
| | | .collect(Collectors.toMap(OrderCancel::getId, user -> user)); |
| | | // 已结算金额 |
| | | BigDecimal balance = new BigDecimal("0"); |
| | | // 未结算金额 |
| | |
| | | continue; |
| | | } |
| | | // 查询订单信息 |
| | | // TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(income.getIncomeId()); |
| | | TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectOne(new EntityWrapper<TOrderPrivateCar>() |
| | | .eq("id", income.getIncomeId()) |
| | | .between("insertTime", start, end)); |
| | | TOrderPrivateCar tOrderPrivateCar = orderPrivateCarMap.get(income.getIncomeId()); |
| | | |
| | | if (tOrderPrivateCar==null){ |
| | | continue; |
| | |
| | | } |
| | | if (tOrderPrivateCar.getState() == 10){ |
| | | // 查询取消订单 用户支付方式 |
| | | OrderCancel orderCancel = orderCancelService.selectOne(new EntityWrapper<OrderCancel>() |
| | | .eq("orderType", 1) |
| | | .eq("orderId", tOrderPrivateCar.getId())); |
| | | OrderCancel orderCancel = orderCancelRecordMap.get(tOrderPrivateCar.getId()); |
| | | if (orderCancel!=null &&orderCancel.getPayType()!=null){ |
| | | switch (orderCancel.getPayType()){ |
| | | case 1: |
| | |
| | | } |
| | | // 小件物流 |
| | | // 查询订单信息 |
| | | // TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(income.getIncomeId()); |
| | | TOrderLogistics tOrderLogistics = orderLogisticsService.selectOne(new EntityWrapper<TOrderLogistics>() |
| | | .eq("id", income.getIncomeId()) |
| | | .between("insertTime", start, end)); |
| | | // |
| | | TOrderLogistics tOrderLogistics = orderLogisticsRecordMap.get(income.getIncomeId()); |
| | | |
| | | if (tOrderLogistics==null){ |
| | | continue; |
| | | } |
| | |
| | | } |
| | | if (tOrderLogistics.getState() == 10){ |
| | | // 查询取消订单 用户支付方式 |
| | | OrderCancel orderCancel = orderCancelService.selectOne(new EntityWrapper<OrderCancel>() |
| | | .eq("orderType", 4) |
| | | .eq("orderId", tOrderLogistics.getId())); |
| | | |
| | | OrderCancel orderCancel = orderCancelRecordMap.get(tOrderLogistics.getId()); |
| | | |
| | | if (orderCancel!=null &&orderCancel.getPayType()!=null){ |
| | | switch (orderCancel.getPayType()){ |
| | | case 1: |
| | |
| | | switch (settlementDetail.getOrderType()){ |
| | | case 1: |
| | | // 专车订单 |
| | | // TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(settlementDetail.getOrderId()); |
| | | TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectOne(new EntityWrapper<TOrderPrivateCar>() |
| | | .eq("id", settlementDetail.getOrderId()) |
| | | .between("insertTime", start, end)); |
| | | TOrderPrivateCar tOrderPrivateCar = orderPrivateCarMap.get(settlementDetail.getOrderId()); |
| | | |
| | | if (tOrderPrivateCar==null){ |
| | | continue; |
| | | } |
| | |
| | | case 4: |
| | | // 小件物流 |
| | | // 查询订单信息 |
| | | // TOrderLogistics tOrderLogistics = orderLogisticsService.selectById(settlementDetail.getOrderId()); |
| | | TOrderLogistics tOrderLogistics = orderLogisticsService.selectOne(new EntityWrapper<TOrderLogistics>() |
| | | .eq("id", settlementDetail.getOrderId()) |
| | | .between("insertTime", start, end)); |
| | | TOrderLogistics tOrderLogistics = orderLogisticsRecordMap.get(settlementDetail.getOrderId()); |
| | | if (tOrderLogistics==null){ |
| | | continue; |
| | | } |