From 22a189d37bd7e27ef46ed7e3951202259bf14da0 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期四, 13 三月 2025 17:05:45 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/YiWuProject

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

diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassRelationInfoMapper.xml
index 1fe646c..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,
@@ -59,7 +60,6 @@
                                   t.quantity,
                                   t1.child_width,
                                   t1.child_height
-
                            from pp.flow_card t
                                     LEFT JOIN sd.order_glass_detail t1
                                               on t.order_id = t1.order_id
@@ -129,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