From eef4b7ca66cc2fb34d2d2cb0a4a8643f2bb0f838 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 18 十月 2024 13:44:06 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 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 c2f2955..4e86833 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -257,6 +257,7 @@
                ifnull(p.thickness,'') as thickness,
                od.weight,
                od.remarks,
+               od.processing_note,
                ifnull(od.bend_radius,'') as bend_radius,
                ods.S01,
                ods.S02,
@@ -735,7 +736,7 @@
         (select (@row_number := @row_number + 1) as id,process_id as process_id from (select process_id from pp.optimize_detail tt where project_no =#{projectNo} group by process_id) tt,(select @row_number := 0) as t) a
         on a.process_id=opd.process_id
         where opd.project_no = #{projectNo}
-        order by opd.stock_id
+        order by opd.stock_id,opd.polys_id
     </select>
 
     <select id="getPrintLabel2">
@@ -2113,7 +2114,8 @@
                '鏂囨湰' as custom2,
                '鏂囨湰' as custom3,
                '鏂囨湰' as custom4,
-               '鏂囨湰' as custom5
+               '鏂囨湰' as custom5,
+               od.quantity
         from sd.order as o
                  left join sd.order_detail as od on o.order_id = od.order_id
                  left join flow_card as fc on o.order_id = fc.order_id and
@@ -2225,11 +2227,11 @@
 
     <select id="remakList">
         SELECT
-            JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S01')) AS S01,
-            JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S04')) AS S02,
-            JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S05')) AS S03,
-            JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S06')) AS S04,
-            JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S07')) AS S05
+            ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S01')),'') AS S01,
+            ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S04')),'') AS S02,
+            ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S05')),'') AS S03,
+            ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S06')),'') AS S04,
+            ifnull(JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S07')),'') AS S05
         FROM flow_card as fc left join sd.order_detail as od on  fc.order_id = od.order_id
         and fc.order_number = od.order_number
         WHERE fc.process_id=#{processId}
@@ -2249,7 +2251,7 @@
     </select>
 
     <select id="selectFlowCardMerge">
-        select *
+        select *,GROUP_CONCAT(DISTINCT fc.technology_number) as count1,count(DISTINCT fc.technology_number)  as count2
         from pp.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
@@ -2260,8 +2262,11 @@
     </select>
 
     <update id="updateFlowCardMerge">
-        update  pp.flow_card fc set fc.merge=1
-        where fc.process_id = #{processId}
+        update  pp.flow_card fc set fc.merge=#{index}
+        where fc.process_id = #{processId} and fc.technology_number  in
+        <foreach item="technologyNumber" collection="technologyNumbers" open="(" separator="," close=")">
+            #{technologyNumber}
+        </foreach>
     </update>
 
     <delete id="deleteflowCardSort">

--
Gitblit v1.8.0