From 364adbc9a93a396b74e154f910c2a0a72bfb1a0f Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期六, 29 十一月 2025 22:10:41 +0800
Subject: [PATCH] feat: 更新车辆里程统计

---
 ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml b/ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml
index 69ddb7e..4179acf 100644
--- a/ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml
@@ -77,12 +77,14 @@
                  s.data_source, s.create_time, s.update_time, vd.dept_id
     </select>
 
+    <!-- 鏍规嵁杞﹁締ID鍜岀粺璁℃棩鏈熸煡璇㈠敮涓�缁熻璁板綍 -->
     <select id="selectByVehicleIdAndDate" resultMap="VehicleMileageStatsResult">
-        <include refid="selectVehicleMileageStatsVo"/>
+        select s.stats_id, s.vehicle_id, s.vehicle_no, s.stat_date, s.total_mileage, s.task_mileage, 
+               s.non_task_mileage, s.task_ratio, s.gps_point_count, s.task_count, s.segment_count, 
+               s.data_source, s.create_time, s.update_time
+        from tb_vehicle_mileage_stats s
         where s.vehicle_id = #{vehicleId} and s.stat_date = #{statDate}
-        group by s.stats_id, s.vehicle_id, s.vehicle_no, s.stat_date, s.total_mileage, s.task_mileage,
-                 s.non_task_mileage, s.task_ratio, s.gps_point_count, s.task_count, s.segment_count,
-                 s.data_source, s.create_time, s.update_time, vd.dept_id
+        limit 1
     </select>
 
     <select id="selectTaskTimeIntervals" resultMap="TaskTimeIntervalResult">

--
Gitblit v1.9.1