From 3e564b130198d5809e7529109c37af63444a732b Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期三, 23 十月 2024 18:01:44 +0800
Subject: [PATCH] bug修改

---
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java
index 280cabf..0bbf386 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java
+++ b/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)
@@ -427,7 +427,7 @@
         PageInfo<ChargingBillListVO> pageInfo = new PageInfo<>(dto.getPageCurr(),dto.getPageSize());
         PageInfo<ChargingBillListVO> pageInfo1 = new PageInfo<>(1,9999999);
         List<ChargingBillListVO> list = this.baseMapper.chargingBillList(pageInfo,dto,startTime1,startTime2);
-        List<ChargingBillListVO> list1 = this.baseMapper.chargingBillList1(pageInfo,dto,startTime1,startTime2);
+        List<ChargingBillListVO> list1 = this.baseMapper.chargingBillList(pageInfo1,dto,startTime1,startTime2);
         BigDecimal paymentAmountTotal = new BigDecimal("0");
         BigDecimal orderAmountTotal = new BigDecimal("0");
         BigDecimal electrovalenceTotal = new BigDecimal("0");
@@ -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)

--
Gitblit v1.7.1