From 09e6dc3fb7266620fafb5e341808a8eb36e080a1 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期六, 13 十二月 2025 22:51:52 +0800
Subject: [PATCH] feat:增加企业微信消息提醒
---
ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml b/ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml
index aee4324..47abb4d 100644
--- a/ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml
@@ -88,16 +88,17 @@
</select>
<select id="selectTaskTimeIntervals" resultMap="TaskTimeIntervalResult">
- select tv.task_id, t.create_time as start_time,
+ select tv.task_id, t.actual_start_time as start_time,
IFNULL(t.actual_end_time, NOW()) as end_time
from sys_task_vehicle tv
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.create_time < #{endTime}
- and t.actual_end_time > #{startTime}
- order by t.create_time
+ and (
+ (t.actual_end_time is not null and t.actual_start_time > #{startTime} and t.actual_end_time < #{endTime})
+ or (t.actual_end_time is null and t.actual_start_time > #{startTime})
+ )
+ order by t.actual_start_time
</select>
<insert id="insertVehicleMileageStats" parameterType="VehicleMileageStats" useGeneratedKeys="true" keyProperty="statsId">
--
Gitblit v1.9.1