puzhibing
2024-10-23 3dbeba05495bf3b8fd929e2e61d6bd38fa7f37ce
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java
@@ -126,7 +126,7 @@
//            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)
@@ -198,7 +198,7 @@
                }
                BigDecimal add = tChargingOrder.getElectrovalence().add(tChargingOrder.getServiceCharge());
                tChargingOrder.setTotalAmount(add.toString());
                tChargingOrder.setDiscount(tChargingOrder.getCouponDiscountAmount().toString());
                tChargingOrder.setDiscount(tChargingOrder.getCouponDiscountAmount()!=null?tChargingOrder.getCouponDiscountAmount().toString():"0");
                UploadRealTimeMonitoringData data5 = uploadRealTimeMonitoringDataClient.chargingOrderInfo(tChargingOrder.getCode()).getData();
                if (data5!=null){
                    if (data5.getTime_remaining()!=null){
@@ -249,7 +249,7 @@
                if (tChargingOrder.getElectrovalence()!=null){
                    electrovalence = electrovalence.add(tChargingOrder.getElectrovalence());
                }
                if (tChargingOrder.getRefundAmount()!=null && tChargingOrder.getRefundStatus() == 2){
                if (tChargingOrder.getRefundAmount()!=null && tChargingOrder.getRefundStatus()!=null && tChargingOrder.getRefundStatus()== 2){
                    refundAmount = refundAmount.add(tChargingOrder.getRefundAmount());
                }
                // 累加累计服务费
@@ -333,7 +333,7 @@
//            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)
@@ -478,7 +478,7 @@
//            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)
@@ -674,7 +674,7 @@
//            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)
@@ -721,9 +721,9 @@
                    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")));
                    commissionAmountTotal = commissionAmountTotal.add(tChargingOrder.getServiceCharge().multiply(new BigDecimal("0.006")));
                }
                // 累加平台分佣
                if (tChargingOrder.getSharingAmount()!=null){