From f3e1240dc943cefae96860ea4cd4a82e4da3c41e Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期三, 23 十月 2024 08:37:48 +0800
Subject: [PATCH] 修改大理片进片程序

---
 hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/mapper/RawGlassStorageDetailsMapper.xml |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/mapper/RawGlassStorageDetailsMapper.xml b/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/mapper/RawGlassStorageDetailsMapper.xml
index c157460..e9fc32e 100644
--- a/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/mapper/RawGlassStorageDetailsMapper.xml
+++ b/hangzhoumesParent/moduleService/GlassStorageModule/src/main/resources/mapper/RawGlassStorageDetailsMapper.xml
@@ -3,17 +3,22 @@
 <mapper namespace="com.mes.rawglassdetails.mapper.RawGlassStorageDetailsMapper">
 
     <select id="listBySlotState" resultType="java.lang.Integer">
-        select t.slot
-        from raw_glass_storage_station t
-        inner JOIN raw_glass_storage_details t1
-        on t.slot = t1.slot and t.enable_state = 1
-        and t.device_id in
-        <foreach collection="leftingStation" item="item" open='(' close=')' separator=','>
-            #{item}
-        </foreach>
-        and t1.state not in
+        SELECT
+        T.SLOT
+        FROM
+        RAW_GLASS_STORAGE_STATION T
+        LEFT JOIN RAW_GLASS_STORAGE_DETAILS AS T1 ON T.DEVICE_ID = T1.DEVICE_ID
+        AND T.SLOT = T1.SLOT
+        AND T1.STATE IN
         <foreach collection="state" item="item" open='(' close=')' separator=','>
             #{item}
         </foreach>
+        WHERE
+        T.ENABLE_STATE = 1
+        AND T.DEVICE_ID IN
+        <foreach collection="leftingStation" item="item" open='(' close=')' separator=','>
+            #{item}
+        </foreach>
+        AND T1.SLOT IS NULL
     </select>
 </mapper>

--
Gitblit v1.8.0