From 8957203bdb94c0119e9e86e56f5f0c82b5ce3869 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 23 三月 2026 14:34:31 +0800
Subject: [PATCH] 产品需求汇总添加过滤条件
---
src/main/resources/mapper/production/ProcessRouteMapper.xml | 32 +++++++++++++++++++-------------
1 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/src/main/resources/mapper/production/ProcessRouteMapper.xml b/src/main/resources/mapper/production/ProcessRouteMapper.xml
index 1baf536..d44a4bd 100644
--- a/src/main/resources/mapper/production/ProcessRouteMapper.xml
+++ b/src/main/resources/mapper/production/ProcessRouteMapper.xml
@@ -26,25 +26,31 @@
<if test="c.dictCode != null">
and ps.dict_code = #{c.dictCode}
</if>
+ <if test="c.status != null">
+ and ps.status = #{c.status}
+ </if>
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)
+ WHERE
+ pr.status = 1
+ and
+ 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>
--
Gitblit v1.9.3