From a3dfc8966bb702c4ccb20f2a2afda7b7c39bd98d Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 06 十一月 2024 15:17:08 +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 |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 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..1a6aba7 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

--
Gitblit v1.8.0