| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | |
| | | // LocalDate lastDayOfMonth = date.with(TemporalAdjusters.lastDayOfMonth()); |
| | | // todo 临时修改为查询昨天凌晨00:00:00 到 23:59:59 |
| | | LocalDateTime firstDayOfMonth = LocalDateTime.of(date, LocalTime.MIN); |
| | | LocalDateTime lastDayOfMonth = LocalDateTime.of(date, LocalTime.MIN); |
| | | LocalDateTime lastDayOfMonth = LocalDateTime.of(date, LocalTime.MAX); |
| | | QueryWrapper<TChargingOrder> eq = new QueryWrapper<TChargingOrder>() |
| | | .between("create_time", firstDayOfMonth, lastDayOfMonth) |
| | | .eq("status", 5) |
| | |
| | | // LocalDate lastDayOfMonth = date.with(TemporalAdjusters.lastDayOfMonth()); |
| | | // todo 临时修改为查询昨天凌晨00:00:00 到 23:59:59 |
| | | LocalDateTime firstDayOfMonth = LocalDateTime.of(date, LocalTime.MIN); |
| | | LocalDateTime lastDayOfMonth = LocalDateTime.of(date, LocalTime.MIN); |
| | | LocalDateTime lastDayOfMonth = LocalDateTime.of(date, LocalTime.MAX); |
| | | QueryWrapper<TChargingOrder> eq = new QueryWrapper<TChargingOrder>() |
| | | .between("create_time", firstDayOfMonth, lastDayOfMonth) |
| | | .eq("status", 5) |
| | |
| | | // LocalDate lastDayOfMonth = date.with(TemporalAdjusters.lastDayOfMonth()); |
| | | // todo 临时修改为查询昨天凌晨00:00:00 到 23:59:59 |
| | | LocalDateTime firstDayOfMonth = LocalDateTime.of(date, LocalTime.MIN); |
| | | LocalDateTime lastDayOfMonth = LocalDateTime.of(date, LocalTime.MIN); |
| | | LocalDateTime lastDayOfMonth = LocalDateTime.of(date, LocalTime.MAX); |
| | | QueryWrapper<TChargingOrder> eq = new QueryWrapper<TChargingOrder>() |
| | | .between("create_time", firstDayOfMonth, lastDayOfMonth) |
| | | .eq("status", 5) |
| | |
| | | // LocalDate lastDayOfMonth = date.with(TemporalAdjusters.lastDayOfMonth()); |
| | | // todo 临时修改为查询昨天凌晨00:00:00 到 23:59:59 |
| | | LocalDateTime firstDayOfMonth = LocalDateTime.of(date, LocalTime.MIN); |
| | | LocalDateTime lastDayOfMonth = LocalDateTime.of(date, LocalTime.MIN); |
| | | LocalDateTime lastDayOfMonth = LocalDateTime.of(date, LocalTime.MAX); |
| | | QueryWrapper<TChargingOrder> eq = new QueryWrapper<TChargingOrder>() |
| | | .between("create_time", firstDayOfMonth, lastDayOfMonth) |
| | | .eq("status", 5) |
| | |
| | | serviceChargeTotal = serviceChargeTotal.add(tChargingOrder.getServiceCharge()); |
| | | } |
| | | // 累加平台手续费 |
| | | if (tChargingOrder.getCommissionAmount()!=null){ |
| | | commissionAmount = commissionAmount.add(tChargingOrder.getCommissionAmount()); |
| | | commissionAmountTotal = commissionAmountTotal.add(tChargingOrder.getCommissionAmount()); |
| | | if (tChargingOrder.getServiceCharge()!=null){ |
| | | commissionAmount = commissionAmount.add(tChargingOrder.getServiceCharge().multiply(new BigDecimal("0.006")).setScale(2, RoundingMode.HALF_DOWN)); |
| | | commissionAmountTotal = commissionAmountTotal.add(tChargingOrder.getServiceCharge().multiply(new BigDecimal("0.006")).setScale(2, RoundingMode.HALF_DOWN)); |
| | | } |
| | | // 累加平台分佣 |
| | | if (tChargingOrder.getSharingAmount()!=null){ |