From 073de05f9d11128533e5abea0c64a0f375718f4f Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 23 十二月 2024 16:13:52 +0800
Subject: [PATCH] #

---
 zy-acs-fake/src/main/resources/mapper/ActionMapper.xml |   13 ++++++-------
 version/db/sqlIndex                                    |    2 +-
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/version/db/sqlIndex b/version/db/sqlIndex
index 8ec61de..a9a58f0 100644
--- a/version/db/sqlIndex
+++ b/version/db/sqlIndex
@@ -1,7 +1,7 @@
 CREATE INDEX idx_agv_action ON man_action(agv_id, action_sts);
 CREATE INDEX idx_group_io_time ON man_action(group_id, io_time);
 CREATE INDEX idx_priority ON man_action(priority);
-
+CREATE INDEX idx_action_sts ON man_action(action_sts);
 CREATE INDEX idx_action_sts_uuid ON man_action_sts(uuid);
 CREATE INDEX idx_action_type_uuid ON man_action_type(uuid);
 CREATE INDEX idx_agv_model_type ON man_agv_model(type);
diff --git a/zy-acs-fake/src/main/resources/mapper/ActionMapper.xml b/zy-acs-fake/src/main/resources/mapper/ActionMapper.xml
index 0f6a768..59d1e8b 100644
--- a/zy-acs-fake/src/main/resources/mapper/ActionMapper.xml
+++ b/zy-acs-fake/src/main/resources/mapper/ActionMapper.xml
@@ -66,13 +66,12 @@
     </select>
 
     <select id="selectPrepareGroup" 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 group_id IS NOT NULL
-        GROUP BY group_id
+        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">

--
Gitblit v1.9.1