From d096516873552404eac98ee7c1d37490af9e8340 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 14 九月 2026 11:00:46 +0800
Subject: [PATCH] feat(home): 添加工序颜色支持功能
---
src/main/resources/mapper/production/ProductionOperationTaskMapper.xml | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/production/ProductionOperationTaskMapper.xml b/src/main/resources/mapper/production/ProductionOperationTaskMapper.xml
index 5cae25b..b013abc 100644
--- a/src/main/resources/mapper/production/ProductionOperationTaskMapper.xml
+++ b/src/main/resources/mapper/production/ProductionOperationTaskMapper.xml
@@ -30,6 +30,7 @@
pm.unit as unit,
poro.operation_name as operationName,
poro.type as type,
+ topo.color as operationColor,
IFNULL(scrapStat.scrapQty, 0) AS scrapQty,
CASE WHEN pickStat.pickCount > 0 THEN 1 ELSE 0 END AS picked,
ROUND(IFNULL(pot.complete_quantity, 0) / NULLIF(pot.plan_quantity, 0) * 100, 2) AS completionStatus,
@@ -42,6 +43,7 @@
left join production_order_routing_operation poro on pot.production_order_routing_operation_id = poro.id
left join product_model pm on pm.id = ifnull(poro.product_model_id, po.product_model_id)
left join product p on pm.product_id = p.id
+ left join technology_operation topo on poro.technology_operation_id = topo.id
left join (
select count(1) as pickCount, pop.production_order_id, pop.technology_operation_id
from production_order_pick pop
@@ -94,10 +96,12 @@
p.product_name as productName,
pm.model,
pm.unit,
- po.nps_no as productOrderNpsNo
+ po.nps_no as productOrderNpsNo,
+ topo.color as processColor
from production_operation_task pot
left join production_order po on pot.production_order_id = po.id
left join production_order_routing_operation poro on pot.production_order_routing_operation_id = poro.id
+ left join technology_operation topo on poro.technology_operation_id = topo.id
left join product_model pm on pm.id = ifnull(poro.product_model_id, po.product_model_id)
left join product p on pm.product_id = p.id
where date(pot.create_time) between #{startDate} and #{endDate}
@@ -170,6 +174,7 @@
<select id="getOperation" resultType="com.ruoyi.production.bean.vo.ProductionOperationTaskVo">
select poro.operation_name as operationName,
max(poro.type) as type,
+ max(topo.color) as operationColor,
count(pot.id) as productionTaskCount,
sum(ifnull(pot.plan_quantity, 0)) as planQuantity,
sum(ifnull(pot.complete_quantity, 0)) as completeQuantity,
@@ -185,6 +190,7 @@
) as completionStatus
from production_operation_task pot
left join production_order_routing_operation poro on pot.production_order_routing_operation_id = poro.id
+ left join technology_operation topo on poro.technology_operation_id = topo.id
left join (
select ppm.production_operation_task_id as taskId,
sum(ifnull(ppo.scrap_qty, 0)) as scrapQty
@@ -225,10 +231,12 @@
<select id="listProcessStatusByOrderIds" resultType="com.ruoyi.production.bean.vo.ProductionOrderProcessTaskVo">
select pot.production_order_id as productionOrderId,
poro.operation_name as operationName,
+ topo.color as operationColor,
ROUND(IFNULL(pot.complete_quantity, 0) / NULLIF(pot.plan_quantity, 0) * 100, 2) AS completionStatus
from production_operation_task pot
left join production_order_routing_operation poro
on pot.production_order_routing_operation_id = poro.id
+ left join technology_operation topo on poro.technology_operation_id = topo.id
where pot.production_order_id in
<foreach collection="orderIds" item="orderId" open="(" separator="," close=")">
#{orderId}
--
Gitblit v1.9.3