From d3dfcd3e96cb0f2b04cfe973e4f348ee5fe96032 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期一, 26 八月 2024 14:02:22 +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 |   28 +++++++++++++++++++++++-----
 1 files changed, 23 insertions(+), 5 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 7f34b09..92f06ae 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -889,7 +889,7 @@
                od.building_number                                    as buildingNumber,
                od.product_name                                       as productName,
                od.edging_type                                        as edgingType,
-               p.remarks,
+               od.remarks,
                c.customer_abbreviation                               as customerAbbreviation,
                p.product_abbreviation                                as productAbbreviation,
                fc.process_id                                         as processId,
@@ -1023,7 +1023,8 @@
         from sd.order_detail as od
                  left join flow_card as fc on od.order_id = fc.order_id and od.order_number = fc.order_number
         where fc.process_id = #{processId}
-          and fc.technology_number = #{technologyNumber}
+          and POSITION(fc.technology_number in #{technologyNumber})
+        GROUP BY other_columns
         order by IF(fc.sort != NULL or fc.sort != '', fc.sort, fc.order_number)
     </select>
 
@@ -1138,7 +1139,7 @@
                                            pl.order_sort = fc.order_number and
                                            pl.technology_number = fc.technology_number
         where pl.create_time between #{selectTime1} and #{selectTime2}
-        GROUP BY fc.process_id, ogd.technology_number, pl.reporting_work_id
+        GROUP BY fc.process_id,fc.order_number, ogd.technology_number, pl.reporting_work_id
         order by pl.id desc, fc.process_id, ogd.technology_number
     </select>
 
@@ -1506,7 +1507,7 @@
                od.building_number                                    as buildingNumber,
                od.product_name                                       as productName,
                od.edging_type                                        as edgingType,
-               p.remarks,
+               od.remarks,
                c.customer_abbreviation                               as customerAbbreviation,
                p.product_abbreviation                                as productAbbreviation,
                CONCAT(fc.process_id, '/', fc.technology_number)      as processId,
@@ -1986,7 +1987,7 @@
                od.building_number                                    as buildingNumber,
                od.product_name                                       as productName,
                od.edging_type                                        as edgingType,
-               p.remarks,
+               od.remarks,
                c.customer_abbreviation                               as customerAbbreviation,
                p.product_abbreviation                                as productAbbreviation,
                fc.process_id                                         as processId,
@@ -2077,4 +2078,21 @@
                        GROUP BY od.order_number
                        order by fc.process_id desc LIMIT 1),'') as process_id
     </select>
+
+    <select id="selectFlowCardMerge">
+        select *
+        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
+                              fc.technology_number = ogd.technology_number
+                 left join sd.order_detail as od on od.order_id = ogd.order_id and od.order_number = ogd.order_number
+        where fc.process_id = #{processId}
+        GROUP BY fc.order_id, fc.process_id, ogd.glass_child
+    </select>
+
+    <update id="updateFlowCardMerge">
+        update  pp.flow_card fc set fc.merge=1
+        where fc.process_id = #{processId}
+    </update>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0