From caf56217dc2bf898b63b0e1f31a7098202c32825 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期六, 15 十一月 2025 16:50:17 +0800
Subject: [PATCH] Merge branch 'feature_gps'
---
ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml b/ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml
index 9e01aae..5d8d093 100644
--- a/ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml
@@ -119,4 +119,21 @@
where g2.vehicle_id = g.vehicle_id
)
</delete>
+
+ <select id="selectGpsDataByTimeRange" resultMap="VehicleGpsResult">
+ select gps_id, vehicle_id, device_id, longitude, latitude, altitude, speed, direction,
+ collect_time, device_report_time, platform_process_time, create_time
+ from tb_vehicle_gps
+ where vehicle_id = #{vehicleId}
+ and collect_time >= #{startTime}
+ and collect_time <= #{endTime}
+ order by collect_time
+ </select>
+
+ <select id="selectActiveVehicleIds" resultType="Long">
+ select distinct vehicle_id
+ from tb_vehicle_gps
+ where collect_time >= DATE_SUB(NOW(), INTERVAL 7 DAY)
+ order by vehicle_id
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1