From 617a22d4a6ec7160adfe9b6f611038461656ee58 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期六, 15 三月 2025 15:45:16 +0800
Subject: [PATCH] 1、中空lisec由一次多对改为1次一对,确保出片顺序不变

---
 hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml
index cab76b1..0d655b2 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml
@@ -19,6 +19,7 @@
         <result column="thickness" property="thickness"/>
         <result column="lack_cout" property="lackCount"/>
     </resultMap>
+
     <select id="queryFlowCardIdMaxLayerGlassInfo" resultMap="baseMap">
         with temp_flow as (SELECT t.process_id,
                                   t.order_id,
@@ -128,4 +129,22 @@
         from hollow_glass_relation_info
         where flow_card_id = #{flowCardId}
     </select>
+
+    <update id="clearDirtyFlowCardData">
+        update hollow_glass_relation_info
+        set glass_id                = null,
+            tempering_layout_id     = null,
+            tempering_feed_sequence = null,
+            engineer_id             = null,
+            state                   = 0
+        where flow_card_id = #{flowCardId}
+          and layer = #{layer}
+          and glass_id not in (
+            select glass_id
+            from hollow_big_storage_cage_details
+            where flow_card_id = #{flowCardId}
+              and layer = #{layer}
+              and state in (100, 102, 103, 104)
+        )
+    </update>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0