From 62914e8c873328712742f789e5fdea1a1a46c121 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期二, 23 九月 2025 08:25:34 +0800
Subject: [PATCH] 流程卡打印、报工层数过多问题修改

---
 north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml |   11 ++++++-----
 1 files changed, 6 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 b0cbee1..cdc4ada 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -811,7 +811,7 @@
                               fcs.technology_number = fc.technology_number
                                and fcs.process = #{process}
         where fc.process_id = #{processId}
-          and position(fc.technology_number in #{technologyNumber})
+          and FIND_IN_SET(fc.technology_number , #{technologyNumber})
         group by fc.process_id, fc.order_number
         <choose>
             <!-- 褰� landingSequence != 1 涓� flashback != 1 鏃讹紝鎸� landing_sequence 鍊掑簭 -->
@@ -1479,7 +1479,7 @@
         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 POSITION(fc.technology_number in #{technologyNumber})
+          and  FIND_IN_SET(fc.technology_number , #{technologyNumber})
         GROUP BY other_columns
         order by IF(fc.sort != NULL or fc.sort != '', fc.sort, fc.order_number)
     </select>
@@ -1629,7 +1629,7 @@
                               fcs.technology_number = fc.technology_number
                                and fcs.process = #{process}
         where fc.process_id = #{processId}
-          and position(fc.technology_number in #{technologyNumber})
+          and  FIND_IN_SET(fc.technology_number , #{technologyNumber})
         group by fc.process_id, fc.order_number, fc.technology_number
         <choose>
             <when test="landingSequence != 1 and flashback != 1">
@@ -3533,7 +3533,8 @@
         fcs.technology_number = fc.technology_number
         and fcs.process = #{process}
         where fc.process_id = #{processId}
-        and position(fc.technology_number in #{compound})
+        and
+        FIND_IN_SET(fc.technology_number , #{compound})
         group by fc.process_id, fc.order_number
         <choose>
             <when test="landingSequence != 1 and flashback != 1">
@@ -3589,7 +3590,7 @@
         fcs.technology_number = fc.technology_number
         and fcs.process = #{process}
         where fc.process_id = #{processId}
-        and position(fc.technology_number in #{compound})
+        and FIND_IN_SET(fc.technology_number , #{compound})
         group by fc.process_id, fc.order_number
         <choose>
             <when test="landingSequence != 1 and flashback != 1">

--
Gitblit v1.8.0