From fe33646ee6e2d1e57f2b51812e94983a0e9efb04 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期日, 14 十二月 2025 16:51:28 +0800
Subject: [PATCH] feat: 修复统计

---
 ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml |    6 ++----
 1 files changed, 2 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 47abb4d..1a2218f 100644
--- a/ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml
@@ -94,10 +94,8 @@
         inner join sys_task t on tv.task_id = t.task_id
         where tv.vehicle_id = #{vehicleId}
           and t.del_flag = '0'
-          and (
-                (t.actual_end_time is not null and t.actual_start_time &gt; #{startTime} and t.actual_end_time &lt; #{endTime})
-                or (t.actual_end_time is null and t.actual_start_time &gt; #{startTime})
-        )
+          and (t.actual_start_time &lt;= #{endTime} and (t.actual_end_time is null or t.actual_end_time &gt;= #{startTime}))
+
         order by t.actual_start_time
     </select>
         

--
Gitblit v1.9.1