From 71af682447e953e309cc953e65a5f32cc24998b2 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期三, 18 三月 2026 17:04:56 +0800
Subject: [PATCH] feat: 生产下发时(砌块、板材)绑定最新的工艺路线到附表、删除生产订单时清除所有附表数据
---
src/main/resources/mapper/production/ProcessRouteItemMapper.xml | 27 +++++++++++----------------
1 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/src/main/resources/mapper/production/ProcessRouteItemMapper.xml b/src/main/resources/mapper/production/ProcessRouteItemMapper.xml
index 3814aeb..375482c 100644
--- a/src/main/resources/mapper/production/ProcessRouteItemMapper.xml
+++ b/src/main/resources/mapper/production/ProcessRouteItemMapper.xml
@@ -10,25 +10,20 @@
<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,
- pm.model,
- p.product_name,
- pm.unit
- 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 product p on p.id = pm.product_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,
+ (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
+ where pri.route_id = #{c.routeId}
+ order by pri.drag_sort
</select>
</mapper>
--
Gitblit v1.9.3