From a383e7dbc619cdb468979d4863349c43550a9af2 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 16 四月 2026 11:33:13 +0800
Subject: [PATCH] feat(production): 扩展生产工艺路线支持多产品绑定及工单权限控制
---
src/main/resources/mapper/production/ProductOrderMapper.xml | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/production/ProductOrderMapper.xml b/src/main/resources/mapper/production/ProductOrderMapper.xml
index 6b993bf..d72b7e5 100644
--- a/src/main/resources/mapper/production/ProductOrderMapper.xml
+++ b/src/main/resources/mapper/production/ProductOrderMapper.xml
@@ -63,13 +63,23 @@
<if test="c.startTime != null and c.endTime != null">
and po.create_time between #{c.startTime} and #{c.endTime}
</if>
+ <if test="isAdmin == false">
+ and exists (
+ select 1
+ from product_work_order pwo_auth
+ where pwo_auth.product_order_id = po.id
+ and find_in_set(#{userId}, pwo_auth.report_user_ids)
+ )
+ </if>
</where>
</select>
<select id="listProcessRoute" resultType="com.ruoyi.production.pojo.ProcessRoute">
select pr.*
from process_route pr
- left join product_model pm on pr.product_model_id = pm.id
- where pm.id = #{productModelId}
+ where (
+ find_in_set(#{productModelId}, pr.product_model_ids) > 0
+ or pr.product_model_id = #{productModelId}
+ )
</select>
<select id="listProcessBom" resultType="com.ruoyi.production.dto.ProductStructureDto">
select ps.id,
--
Gitblit v1.9.3