From 3fa7cdec6ce44f07a0dc7e1910511ead606990f3 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期四, 11 九月 2025 08:19:53 +0800
Subject: [PATCH] 1
---
zy-acs-manager/src/main/resources/mapper/manager/ActionMapper.xml | 30 ++++++++++++++++++++++++++----
1 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/zy-acs-manager/src/main/resources/mapper/manager/ActionMapper.xml b/zy-acs-manager/src/main/resources/mapper/manager/ActionMapper.xml
index aa35574..f86b28a 100644
--- a/zy-acs-manager/src/main/resources/mapper/manager/ActionMapper.xml
+++ b/zy-acs-manager/src/main/resources/mapper/manager/ActionMapper.xml
@@ -65,14 +65,22 @@
ORDER BY count DESC
</select>
- <select id="selectPrepareGroup" resultType="java.lang.String">
- SELECT
- group_id
+ <select id="selectGroupNo" resultType="java.lang.String">
+ SELECT group_id
FROM man_action
WHERE 1=1
- AND action_sts = (SELECT id FROM man_action_sts WHERE UUID = 'PREPARE')
+ AND action_sts = #{actionSts}
AND group_id IS NOT NULL
GROUP BY group_id
+ </select>
+
+ <select id="selectPrepareGroup" resultType="java.lang.String">
+ SELECT ma.group_id
+ FROM man_action ma
+ JOIN man_action_sts mas ON ma.action_sts = mas.id
+ WHERE mas.UUID = 'PREPARE'
+ AND ma.group_id IS NOT NULL
+ GROUP BY ma.group_id
</select>
<select id="selectTaskIdsByGroupId" resultType="java.lang.Long">
@@ -96,4 +104,18 @@
ORDER BY ma.priority DESC
</select>
+ <select id="selectLatestOfGroup" resultType="com.zy.acs.manager.manager.entity.Action">
+ SELECT *
+ FROM man_action a
+ JOIN (
+ SELECT group_id, MAX(io_time) AS max_io_time
+ FROM man_action
+ WHERE agv_id = #{agvId} AND action_sts = #{actionSts}
+ GROUP BY group_id
+ ) b ON a.group_id = b.group_id AND a.io_time = b.max_io_time
+ WHERE a.agv_id = #{agvId}
+ AND a.action_sts = #{actionSts}
+ ORDER BY a.priority DESC
+ </select>
+
</mapper>
--
Gitblit v1.9.1