From 4d3286b758594acab704d92159b4e4df3deaf7bb Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期五, 17 一月 2025 11:32:14 +0800
Subject: [PATCH] 增加暂停的工程号到选择工程的数据列里,更变engineering表的实现层到公共里

---
 hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/mapper/HollowBigStorageCageDetailsMapper.xml |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/mapper/HollowBigStorageCageDetailsMapper.xml b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/mapper/HollowBigStorageCageDetailsMapper.xml
index febd8e7..38803e6 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/mapper/HollowBigStorageCageDetailsMapper.xml
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/resources/mapper/HollowBigStorageCageDetailsMapper.xml
@@ -39,6 +39,15 @@
             and state !=101
         </where>
     </update>
+    <update id="updateDeviceIdBySlot">
+        update big_storage_cage_details t inner join big_storage_cage t1 on t.slot = t1.slot
+        set t.device_id = t1.device_id
+        where t.slot in (
+        <foreach collection="list" item="item" separator=",">
+            #{item}
+        </foreach>
+        )
+    </update>
 
     <select id="hollowIsAll" resultMap="baseMap">
         WITH sum_flow_layer_count AS ( SELECT flow_card_id, layer, min( films_id ) AS films_id, min(thickness) as
@@ -213,4 +222,29 @@
         group by device_id, slot
         order by sequence
     </select>
+    <select id="queryPairGlassList" resultType="com.mes.hollow.entity.HollowBigStorageCageDetails">
+        with hollow_sequence_temp as (
+        SELECT hollow_sequence, count(distinct layer) as count
+        FROM hollow_big_storage_cage_details
+        WHERE flow_card_id = #{flowCardId}
+        <if test="isOut == 0">
+            AND STATE = 100
+        </if>
+
+        GROUP BY hollow_sequence
+        having count = #{totalLayer}
+        limit #{totalPairQuantity}
+        ),
+        hollow_details as (select *
+        from hollow_big_storage_cage_details
+        WHERE flow_card_id = #{flowCardId}
+        <if test="isOut == 0">
+            AND STATE = 100
+        </if>
+        )
+        select *
+        from hollow_details t
+        inner join hollow_sequence_temp t1 on t.hollow_sequence = t1.hollow_sequence
+        ORDER BY t.hollow_sequence
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0