From 7071e6b8b3f144b80463b2c99684d4187bc2b79a Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期三, 09 七月 2025 11:50:19 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override

---
 north-glass-erp/src/main/resources/mapper/pp/Report.xml   |    2 +-
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml |   16 ++++++++++++++++
 2 files changed, 17 insertions(+), 1 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 f3aca7b..adc2142 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -784,6 +784,10 @@
           and position(fc.technology_number in #{technologyNumber})
         group by fc.process_id, fc.order_number
         <choose>
+            <!-- 褰� landingSequence != 1 涓� flashback != 1 鏃讹紝鎸� landing_sequence 鍊掑簭 -->
+            <when test="landingSequence != 1 and flashback != 1">
+                ORDER BY landing_sequence,fc.id desc
+            </when>
             <!-- landingSequence != 1 鏃讹紝浼樺厛鎸� landing_sequence 鍊掑簭 -->
             <when test="landingSequence != 1">
                 ORDER BY landing_sequence DESC
@@ -1477,6 +1481,9 @@
           and position(fc.technology_number in #{technologyNumber})
         group by fc.process_id, fc.order_number, fc.technology_number
         <choose>
+            <when test="landingSequence != 1 and flashback != 1">
+                ORDER BY landing_sequence,fc.id desc
+            </when>
             <!-- landingSequence != 1 鏃讹紝浼樺厛鎸� landing_sequence 鍊掑簭 -->
             <when test="landingSequence != 1">
                 ORDER BY landing_sequence DESC
@@ -1530,6 +1537,9 @@
         where fc.process_id = #{processId} and fc.`merge`=1
         group by fc.process_id, fc.order_number
         <choose>
+            <when test="landingSequence != 1 and flashback != 1">
+                ORDER BY landing_sequence,fc.id desc
+            </when>
             <!-- landingSequence != 1 鏃讹紝浼樺厛鎸� landing_sequence 鍊掑簭 -->
             <when test="landingSequence != 1">
                 ORDER BY landing_sequence DESC
@@ -3221,6 +3231,9 @@
         and position(fc.technology_number in #{compound})
         group by fc.process_id, fc.order_number
         <choose>
+            <when test="landingSequence != 1 and flashback != 1">
+                ORDER BY landing_sequence,fc.id desc
+            </when>
             <!-- landingSequence != 1 鏃讹紝浼樺厛鎸� landing_sequence 鍊掑簭 -->
             <when test="landingSequence != 1">
                 ORDER BY landing_sequence DESC
@@ -3274,6 +3287,9 @@
         and position(fc.technology_number in #{compound})
         group by fc.process_id, fc.order_number
         <choose>
+            <when test="landingSequence != 1 and flashback != 1">
+                ORDER BY landing_sequence,fc.id desc
+            </when>
             <!-- landingSequence != 1 鏃讹紝浼樺厛鎸� landing_sequence 鍊掑簭 -->
             <when test="landingSequence != 1">
                 ORDER BY landing_sequence DESC
diff --git a/north-glass-erp/src/main/resources/mapper/pp/Report.xml b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
index 43a4af5..9eca656 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/Report.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -1969,7 +1969,7 @@
         LEFT JOIN
         pp.reporting_work as rwk
         on rw.reporting_work_id = rwk.reporting_work_id
-        where  position(rwk.this_process in #{selectProcesses})
+        where  position(#{selectProcesses} in rwk.this_process  )
         and rwk.this_process!='鍒囧壊'
         and rw.review_status >= 0
         GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c

--
Gitblit v1.8.0