From 4037c71a2e622e83735e8aecad71b77aae007b3a Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期一, 12 五月 2025 18:21:32 +0800
Subject: [PATCH] 提交大屏时间轴代码
---
hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowBigStorageCageHistoryTaskMapper.xml | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowBigStorageCageHistoryTaskMapper.xml b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowBigStorageCageHistoryTaskMapper.xml
index 6629e95..66f2369 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowBigStorageCageHistoryTaskMapper.xml
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowBigStorageCageHistoryTaskMapper.xml
@@ -47,4 +47,28 @@
from hollow_out_one_temp
inner join hollow_out_two_temp on 1 = 1
</select>
+ <select id="queryRunTimes" resultType="com.mes.largenscreen.entity.RunTime">
+ with big_storage_cage_history_task_temp as (
+ select distinct create_time from hollow_big_storage_cage_history_task where task_type = 5 and
+ create_time BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 1 DAY)
+ )
+ SELECT
+ t1.create_time AS first_timestamp,
+ t2.create_time AS second_timestamp,
+ TIMESTAMPDIFF(MINUTE, t1.create_time, t2.create_time) as diff_minutes
+ FROM
+ (SELECT
+ create_time,
+ LEAD(create_time) OVER (ORDER BY create_time) AS next_timestamp
+ FROM
+ big_storage_cage_history_task_temp ) t1
+ JOIN
+ (SELECT
+ create_time,
+ LEAD(create_time) OVER (ORDER BY create_time) AS next_timestamp
+ FROM
+ big_storage_cage_history_task_temp ) t2 ON t1.next_timestamp = t2.create_time
+ WHERE
+ TIMESTAMPDIFF(MINUTE, t1.create_time, t2.create_time) between 11 and 500;
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0