From 3e42139cd2a5e665faef6c5c11bc7f7ca2bfd30d Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 20 二月 2025 10:02:41 +0800
Subject: [PATCH] 修改流程卡打印编辑查询 并查列不匹配问题

---
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
index e6bd6ad..91135dd 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -588,7 +588,8 @@
                       ogdss.concatenated_glass_child                                   as glass_child,
                       fc.founder,
                       date(fc.splitFrame_time)                                         as splitFrame_time,
-                      processed_part                                                   as process
+                      processed_part                                                   as process,
+                      merge
 
                from flow_card as fc
                         left join sd.order_glass_detail as ogd
@@ -625,7 +626,8 @@
                       ogdss.concatenated_glass_child                                   as glass_child,
                       fc.founder,
                       date(fc.splitFrame_time)                                         as splitFrame_time,
-                      processed_part                                                   as process
+                      processed_part                                                   as process,
+                      merge
 
                from flow_card as fc
                         left join sd.order_glass_detail as ogd
@@ -831,7 +833,7 @@
     <update id="updateProcessCardRack">
         update flow_card as fc
         set fc.rack=#{rack}
-        where fc.process_id = #{processId} and fc.technology_number=#{technologyNumber} and order_number=#{orderNumber}
+        where fc.process_id = #{processId} and fc.technology_number=#{technologyNumber}
     </update>
 
     <select id="getPrintLabel">
@@ -2874,4 +2876,27 @@
         group by a.process_id,a.technology_number
 
     </select>
+    
+    <select id="getGlassThicknessByProdutionId">
+        select total_thickness as 'totalThickness',thickness as 'thickness' from sd.product
+        where id = (
+            select distinct b.product_id from sd.order_glass_detail as a
+                    left join sd.order_detail as b
+                    on a.order_id = b.order_id and a.order_number = b.order_number
+                    where a.order_id = #{orderId}
+                    and a.production_id = #{productionId}
+            )
+    </select>
+    
+    <select id="getOrderDetailByProductionId">
+        select * from (select a.*,
+        IF(a.height >= a.width, a.height, a.width) as 'long',
+        IF(a.height &lt; a.width, a.height, a.width) as 'short'
+        from sd.order_detail as a
+        left join sd.order_glass_detail as b
+        on a.order_id = b.order_id and a.order_number = b.order_number
+        where a.order_id = #{orderId} and b.production_id = #{productionId}
+        group by a.order_number) as c
+        order by c.`long` desc
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0