From 92d8d06d8ae38c407715a5e9389691b446413e0a Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 27 三月 2026 10:06:09 +0800
Subject: [PATCH] yys 1.生产逻辑修改

---
 src/main/resources/mapper/production/ProcessRouteMapper.xml |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/src/main/resources/mapper/production/ProcessRouteMapper.xml b/src/main/resources/mapper/production/ProcessRouteMapper.xml
index b71d4d8..e06ce32 100644
--- a/src/main/resources/mapper/production/ProcessRouteMapper.xml
+++ b/src/main/resources/mapper/production/ProcessRouteMapper.xml
@@ -13,14 +13,28 @@
     </resultMap>
 
     <select id="pageProcessRouteDto" resultType="com.ruoyi.production.dto.ProcessRouteDto">
-        select ps.*, pm.speculative_trading_name
+        select ps.*, p.product_name,pm.product_id,pm.model,pb.bom_no,pm.drawing_number,group_concat(pp.name) as processName
         from process_route ps
-                 left join product_model pm on ps.product_model_id = pm.id
+        left join process_route_item ppi on ps.id = ppi.route_id
+        left join product_process pp on ppi.process_id = pp.id
+        left join product_bom pb on ps.bom_id = pb.id
+        left join product_model pm on ps.product_model_id = pm.id
+        left join product p on pm.product_id = p.id
         <where>
-            <if test="c.speculativeTradingName != null || c.speculativeTradingName != ''">
-                and pm.speculative_trading_name like concat('%',#{c.speculativeTradingName},'%')
+            <if test="c.model != null and c.model != ''">
+                and pm.model like concat('%',#{c.model},'%')
+            </if>
+            <if test="c.processRouteCode != null and c.processRouteCode != ''">
+                and ps.process_route_code like concat('%',#{c.processRouteCode},'%')
+            </if>
+            <if test="c.processRouteName != null and c.processRouteName != ''">
+                and ps.process_route_name like concat('%',#{c.processRouteName},'%')
+            </if>
+            <if test="c.processName != null and c.processName != ''">
+                and pp.name like concat('%',#{c.processName},'%')
             </if>
         </where>
+        group by ps.id
         order by ps.id asc
     </select>
 </mapper>

--
Gitblit v1.9.3