From c26d3f181ddd40a23aaef5bbbd5f0fcf1683d68a Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期五, 27 九月 2024 12:17:56 +0800
Subject: [PATCH] 修改语言权限切换以及接口命名替换

---
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml |   84 +++++++++++++++++++++++++++++++++++++++---
 1 files changed, 78 insertions(+), 6 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 17f3090..02285f8 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -657,7 +657,7 @@
                fc.quantity,
                round(ogd.total_area, 2)                                       as total_area,
                od.perimeter,
-               od.bend_radius,
+               if(od.shape=2,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')),od.bend_radius) as bend_radius,
                concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks,
                od.other_columns,
                round(ogd.child_width)                                         as width,
@@ -794,6 +794,43 @@
         where fc.process_id = #{processId}
           and fc.technology_number = #{technologyNumber}
         group by od.order_number, od.width, od.height
+    </select>
+
+    <select id="getPrintLabelDetail">
+        select o.order_id,
+               o.project,
+               o.customer_id,
+               ogd.child_width                as width,
+               ogd.child_height               as height,
+               fc.quantity,
+               od.order_number                as orderNumber,
+               fc.technology_number           as technologyNumber,
+               ogd.glass_child,
+               ogd.process,
+               c.customer_abbreviation        as customer_name,
+               ifnull(od.processing_note, '') as processing_note,
+               bgt.type_name,
+               od.other_columns,
+               od.building_number,
+               od.bend_radius
+        from sd.order as o
+                 left join sd.order_detail as od on o.order_id = od.order_id
+                 left join sd.order_glass_detail as ogd
+                           on ogd.order_id = od.order_id and ogd.order_number = od.order_number
+                 left join pp.flow_card as fc on o.order_id = fc.order_id and
+                                                 od.order_number = fc.order_number and
+                                                 fc.technology_number = ogd.technology_number
+                 left join sd.product pt on pt.id = od.product_id
+                 left join sd.customer c on c.id = o.customer_id
+                 left join sd.basic_glass_type bgt on bgt.type_id = pt.type_id
+        <where>
+            and fc.process_id = #{flowCard.processId}
+            and fc.order_number = #{flowCard.orderNumber}
+            <if test="flowCard.technologyNumber != null and flowCard.technologyNumber != ''">
+                and fc.technology_number = #{flowCard.technologyNumber}
+            </if>
+        </where>
+        group by od.order_number,fc.technology_number, od.width, od.height
     </select>
 
     <select id="printFlowCardDetailsMp">
@@ -1164,7 +1201,7 @@
                fc.quantity,
                round(ogd.total_area, 2)                                       as total_area,
                od.perimeter,
-               od.bend_radius,
+               if(od.shape=2,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')),od.bend_radius) as bend_radius,
                concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks,
                od.other_columns,
                round(ogd.child_width)                                         as width,
@@ -1236,7 +1273,7 @@
                sum(pl.patch_num)                                                 as quantity,
                round(ogd.total_area, 2)                                       as total_area,
                od.perimeter,
-               od.bend_radius,
+               if(od.shape=2,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')),od.bend_radius) as bend_radius,
                concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks,
                od.other_columns,
                round(ogd.child_width)                                         as width,
@@ -1410,7 +1447,7 @@
                (pl.rework_num)                                              as quantity,
                round(ogd.total_area, 2)                                     as total_area,
                od.perimeter,
-               od.bend_radius,
+               if(od.shape=2,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')),od.bend_radius) as bend_radius,
                concat(od.processing_note, od.remarks)                       as remarks,
                od.other_columns,
                round(ogd.child_width)                                       as width,
@@ -1968,7 +2005,7 @@
                fc.process_id,
                o.customer_name,
                o.project,
-               ogd.technology_number,
+               /*ogd.technology_number,*/
                ogd.glass_address,
                (fc.quantity)                                                          as quantity,
                round((ogd.child_width * ogd.child_height * fc.quantity / 1000000), 2) as total_area,
@@ -1990,6 +2027,36 @@
         where fc.order_id = #{orderId}
         GROUP BY fc.process_id, od.order_number
         order by fc.process_id, od.order_number
+    </select>
+
+    <select id="selectPrintDetailsMp1">
+        select fc.id,
+               fc.order_id,
+               fc.process_id,
+               o.customer_name,
+               o.project,
+               ogd.technology_number,
+               ogd.glass_address,
+               (fc.quantity)                                                          as quantity,
+               round((ogd.child_width * ogd.child_height * fc.quantity / 1000000), 2) as total_area,
+               od.product_name,
+               ogd.glass_child,
+               fc.founder,
+               date(fc.splitFrame_time)                                               as splitFrame_time,
+            /* if(fc.print_status=0,'鏈墦鍗�','宸叉墦鍗�') as  print_status*/
+               fc.print_status,
+               ogd.process,
+               JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01'))                  AS glassNumber,
+               od.order_number
+        from flow_card as fc
+                 left join sd.order_glass_detail as ogd
+                           on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and
+                              ogd.technology_number = fc.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.`order` as o on o.order_id = fc.order_id
+        where fc.order_id = #{orderId}
+        GROUP BY fc.process_id, od.order_number,fc.technology_number
+        order by fc.process_id, od.order_number,fc.technology_number
     </select>
 
     <select id="getPrintCustomDataDetails">
@@ -2036,7 +2103,12 @@
                od.other_columns,
                ogd.glass_child                                       as glassChild,
                ogd.glass_address                                     as glassAddress,
-               JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.color'))  AS color
+               JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.color'))  AS color,
+               '鏂囨湰' as custom1,
+               '鏂囨湰' as custom2,
+               '鏂囨湰' as custom3,
+               '鏂囨湰' as custom4,
+               '鏂囨湰' as custom5
         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

--
Gitblit v1.8.0