From 52c033db1d17e62494540718bf629bd9264562a6 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期三, 23 十月 2024 15:30:58 +0800
Subject: [PATCH] bug修改

---
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingBillServiceImpl.java |    2 +-
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/PayOrderChargingInfo.java              |    3 +++
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/util/task/TaskUtil.java                    |    1 +
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java   |    8 ++++++++
 4 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
index bab1bff..8f860be 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -261,6 +261,14 @@
             List<TAppUserCar> data3 = appUserCarClient.getCarByIds(Collections.singletonList(byId.getAppUserCarId())).getData();
             payOrderChargingInfo.setCarNum(data3.get(0).getLicensePlate());
         }
+        payOrderChargingInfo.setTChargingOrder(byId);
+
+        Long count = chargingOrderAccountingStrategyService.lambdaQuery().eq(TChargingOrderAccountingStrategy::getChargingOrderId, orderId).count();
+        payOrderChargingInfo.setPeriodCount(count);
+        List<Long> carid = new ArrayList<>();
+        carid.add(byId.getAppUserCarId());
+        R<List<TAppUserCar>> carByIds = appUserCarClient.getCarByIds(carid);
+        payOrderChargingInfo.setCarNum(carByIds.getData().get(0).getLicensePlate());
         return R.ok(payOrderChargingInfo);
     }
 
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/PayOrderChargingInfo.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/PayOrderChargingInfo.java
index 0c6b0c9..9d0b2cd 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/PayOrderChargingInfo.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/PayOrderChargingInfo.java
@@ -2,6 +2,7 @@
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.order.api.model.TChargingOrder;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -34,4 +35,6 @@
     private BigDecimal orderAmount;
     @ApiModelProperty(value = "车牌")
     private String carNum;
+    private TChargingOrder tChargingOrder;
+    private Long periodCount;
 }
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..919b992 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
@@ -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)
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/util/task/TaskUtil.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/util/task/TaskUtil.java
index e579cea..a1e684f 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/util/task/TaskUtil.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/util/task/TaskUtil.java
@@ -49,6 +49,7 @@
 
 
 @Scheduled(cron = "0 0 12 1 * ?")
+//@Scheduled(fixedRate = 60000)
     public void taskMonth() {
         try {
             // 获取上个月的开始和结束日期

--
Gitblit v1.7.1