From 6ad5c2cdc193cf7bb02884961b7434cd7f607a0d Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 16 四月 2026 10:48:09 +0800
Subject: [PATCH] feat(production): 扩展生产工艺路线支持多产品绑定及工单权限控制
---
src/main/resources/mapper/production/ProductOrderMapper.xml | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/production/ProductOrderMapper.xml b/src/main/resources/mapper/production/ProductOrderMapper.xml
index fdcb54e..3fcec90 100644
--- a/src/main/resources/mapper/production/ProductOrderMapper.xml
+++ b/src/main/resources/mapper/production/ProductOrderMapper.xml
@@ -41,7 +41,7 @@
) shipping_status_counts ON sl.id = shipping_status_counts.sales_ledger_id
left join product_model pm on po.product_model_id = pm.id
left join product p on pm.product_id = p.id
- left join sales_ledger_product slp on po.sale_ledger_product_id = slp.id
+ left join sales_ledger_product slp on po.sale_ledger_product_id = slp.id and slp.type = 1
left join product_process_route ppr on po.id = ppr.product_order_id
left join product_bom pb on pb.id = ppr.bom_id
<where>
@@ -63,6 +63,14 @@
<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">
--
Gitblit v1.9.3