From 27a40258eb823210af2b286a2b43404e6c49f9e3 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期一, 16 三月 2026 16:36:30 +0800
Subject: [PATCH] fix: 工艺路线内的工序产品名称未返回、工序对应的参数个数
---
src/main/resources/mapper/production/ProcessRouteItemMapper.xml | 29 +++++++++++++++++------------
1 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/src/main/resources/mapper/production/ProcessRouteItemMapper.xml b/src/main/resources/mapper/production/ProcessRouteItemMapper.xml
index c53259d..b75244d 100644
--- a/src/main/resources/mapper/production/ProcessRouteItemMapper.xml
+++ b/src/main/resources/mapper/production/ProcessRouteItemMapper.xml
@@ -10,21 +10,26 @@
<result property="tenantId" column="tenant_id"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
+ <result property="dragSort" column="drag_sort"/>
</resultMap>
<select id="listProcessRouteItemDto" resultType="com.ruoyi.production.dto.ProcessRouteItemDto">
select pri.*,
- pr.description ,
- pp.name as process_name,
- pm.speculative_trading_name,
- pm.product_id
- from
- process_route_item pri
- left join product_model pm on pri.product_model_id = pm.id
- left join product_process pp on pp.id = pri.process_id
- left join process_route pr on pr.id = pri.route_id
- where
- pri.route_id = #{c.routeId}
- order by pri.id
+ pr.description,
+ pp.name as process_name,
+ pms.product_id,
+ pms.model,
+ pm.product_name,
+ pm.unit,
+ (SELECT COUNT(1)
+ FROM process_route_item_param prip
+ WHERE prip.route_item_id = pri.id) as paramCount
+ from process_route_item pri
+ left join process_route pr on pr.id = pri.route_id
+ left join product_process pp on pp.id = pri.process_id
+ left join product_material_sku pms on pms.id = pri.product_model_id
+ left join product_material pm on pm.id = pms.product_id
+ where pri.route_id = #{c.routeId}
+ order by pri.drag_sort
</select>
</mapper>
--
Gitblit v1.9.3