From 78809560f4315777e770acec0e24cb42e2ca97a7 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 10 七月 2024 08:06:48 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml |   34 ++++++++++++++++++++++++++++++++--
 1 files changed, 32 insertions(+), 2 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 f7d948f..f02d6e6 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -511,12 +511,16 @@
                od.perimeter,
                od.bend_radius,
                concat(od.processing_note,od.remarks) as remarks,
-               od.other_columns
+               od.other_columns,
+               round(ogd.child_width) as width,
+               round(ogd.child_height) as height,
+               pd.separation
         from flow_card as fc
                  left join sd.order_glass_detail as ogd
                            on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
                               fc.technology_number = ogd.technology_number
                  left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
+        left join sd.product_detail as pd on pd.prod_id=od.product_id and pd.glass_sort=ogd.technology_number
         where fc.process_id = #{processId}
           and fc.technology_number = #{technologyNumber}
         group by fc.process_id, fc.order_number
@@ -794,7 +798,33 @@
 
     <update id="updatePrintStateMp">
         update  pp.flow_card
-        set print_status = #{printState}
+        set print_status = print_status+1
         where process_id = #{processId} and technology_number = #{technologyNumber}
     </update>
+
+    <select id="printFlowCardOrderSortMp">
+        SELECT fc.process_id,
+               fc.order_number,
+               fc.technology_number,
+               ogd.glass_address,
+               ogd.child_width,
+               ogd.child_height,
+               fc.quantity,
+               ROUND(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area,
+               fc.sort
+        FROM flow_card AS fc
+                 LEFT JOIN sd.order_glass_detail AS ogd ON fc.order_id = ogd.order_id
+            AND fc.order_number = ogd.order_number
+            AND fc.technology_number = ogd.technology_number
+        where fc.order_id=#{orderId}
+        order by IF(fc.sort != NULL || fc.sort != '', fc.sort, fc.technology_number)
+    </select>
+
+    <update id="printOrderSortMp">
+        update flow_card
+        set sort = #{sort}
+        where process_id = #{processId}
+          and order_number = #{orderNumber}
+          and technology_number = #{technologyNumber}
+    </update>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0