From 93b80ffb7f7ffc02bc414271b8ebeac82be6bcb9 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期一, 11 十一月 2024 16:29:00 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override

---
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 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 c30df83..b413693 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -67,7 +67,7 @@
         b.customer_name,
         if(a.layout_status=0,'涓嶅彲鎺掔増',if(a.layout_status=1,'鍙帓鐗�','宸叉帓鐗�')) as layout_status,
         a.merge
-        from (select id,order_id,process_id,order_number, quantity,founder,layout_status,create_time,merge from flow_card
+        from (select id,order_id,process_id,order_number, quantity,founder,max(layout_status) as layout_status,create_time,merge from flow_card
         group by process_Id,order_number) as a left join sd.`order` as b on a.order_Id=b.order_id
         left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number
         where date(a.create_time)>=#{selectTime1} and date(a.create_time) &lt;= #{selectTime2}
@@ -263,7 +263,8 @@
                ods.S02,
                ods.S03,
                ods.S04,
-               ods.S05
+               ods.S05,
+               od.building_number
         from sd.order_detail as od
                  left join sd.order_glass_detail as ogd
                            on od.order_id = ogd.order_id and od.order_number = ogd.order_number
@@ -516,13 +517,14 @@
                                           ogds.glass_child                                  AS concatenated_glass_child,
                                           process                                           AS processed_part,
                                           ogds.child_width,
-                                          ogds.child_height
+                                          ogds.child_height,
+                                          ogds.group
                                    from sd.order_glass_detail as ogds
                                    where ogds.order_id = #{orderId}
-                                   GROUP BY order_id, order_number, ogds.glass_child, process) as ogdss
+                                   GROUP BY order_id, order_number, ogds.glass_child, process,ogds.group) as ogdss
                                   on fc.order_id = ogdss.order_id and ogdss.order_number = fc.order_number
                where fc.order_id = #{orderId}
-               GROUP BY fc.process_id, ogdss.concatenated_glass_child, ogdss.processed_part
+               GROUP BY fc.process_id, ogdss.concatenated_glass_child, ogdss.processed_part,ogdss.group
                order by fc.process_id, ogdss.technology_number)
 
               UNION
@@ -664,7 +666,8 @@
                round(ogd.child_width)                                         as width,
                round(ogd.child_height)                                        as height,
                pd.separation,
-               fc.technology_number
+               fc.technology_number,
+               IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber
         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
@@ -1213,7 +1216,8 @@
                round(ogd.child_width)                                         as width,
                round(ogd.child_height)                                        as height,
                pd.separation,
-               fc.technology_number
+               fc.technology_number,
+               IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber
         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
@@ -2014,6 +2018,7 @@
                /*ogd.technology_number,*/
                ogd.glass_address,
                (fc.quantity)                                                          as quantity,
+               (fc.quantity)                                                          as printQuantity,
                round((ogd.child_width * ogd.child_height * fc.quantity / 1000000), 2) as total_area,
                od.product_name,
                ogd.glass_child,
@@ -2044,6 +2049,7 @@
                ogd.technology_number,
                ogd.glass_address,
                (fc.quantity)                                                          as quantity,
+               (fc.quantity)                                                          as printQuantity,
                round((ogd.child_width * ogd.child_height * fc.quantity / 1000000), 2) as total_area,
                od.product_name,
                ogd.glass_child,
@@ -2085,7 +2091,7 @@
                od.processing_note                                    as processingNote,
                width,
                height,
-               fc.quantity,
+               #{printQuantity}                                      as quantity,
                od.order_number                                       as orderNumber,
                fc.technology_number                                  as technologyNumber,
                od.building_number                                    as buildingNumber,

--
Gitblit v1.8.0