From 53bc276bdc4aaefc2a2ecadc472f2c2f18e93490 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 26 十一月 2025 16:53:57 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override

---
 north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml b/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml
index c79e835..d513211 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/OrderProcessDetailMapper.xml
@@ -78,11 +78,13 @@
                             when 'stepA' then 3
                             when 'stepD' then 4
                             when 'stepB' then 4
-                     end as sort
+                            else 1
+                     end as sortByprocess,
+                    b.sort as 'sort2'
 
 
         from order_process_detail
-        left join (select DISTINCT basic_name,nickname from basic_data where basic_category = 'process') as b
+        left join (select DISTINCT basic_name,nickname,sort from basic_data where basic_category = 'process') as b
         on b.basic_name = process
         where order_id = #{orderId}
         group by process) as a
@@ -99,7 +101,7 @@
                                                     group by opd.id) as a
                     GROUP BY process)   as sort1
         on sort1.process = a.process
-        order by sort,sort1.count,id
+        order by sortByprocess,sort1.count,sort2,id
 
     </select>
 
@@ -292,4 +294,17 @@
           </if>
 
     </select>
+    
+    <select id="selectProcessSort">
+        select a.process,
+               ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) AS sort,
+               ifnull(b.nickname,"") as recombination
+        from sd.order_process_detail as a
+        inner join sd.basic_data as b
+                on a.process = b.basic_name and b.basic_category = 'process'
+                where a.order_id = #{orderId}
+                and a.process_id = #{processId}
+                and a.order_number =#{orderNumber}
+                and a.technology_number =#{technologyNumber}
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0