From 7ea8883ca6b47ec014a32ed57c3bea64544e893e Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期四, 19 三月 2026 17:09:34 +0800
Subject: [PATCH] feat: 生产订单绑定工艺路线、BOM、工艺路线、工序参数新增修改

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

diff --git a/src/main/resources/mapper/production/ProcessRouteMapper.xml b/src/main/resources/mapper/production/ProcessRouteMapper.xml
index 48d0708..1baf536 100644
--- a/src/main/resources/mapper/production/ProcessRouteMapper.xml
+++ b/src/main/resources/mapper/production/ProcessRouteMapper.xml
@@ -29,4 +29,24 @@
         order by ps.id
     </select>
 
+    <select id="latestTypeDate" resultType="com.ruoyi.production.pojo.ProcessRoute">
+        SELECT *
+        FROM process_route pr
+        WHERE pr.dict_code = (SELECT d.dict_code
+                              FROM sys_dict_data d
+                              WHERE d.dict_label =
+                                <choose>
+                                    <when test="strength != null and strength != ''">
+                                        CONCAT(#{productName}, '-', #{strength})
+                                    </when>
+                                    <otherwise>
+                                        #{productName}
+                                    </otherwise>
+                                </choose>
+                                AND d.dict_type = 'product_type'
+                              LIMIT 1)
+        ORDER BY pr.create_time DESC
+        LIMIT 1
+    </select>
+
 </mapper>

--
Gitblit v1.9.3