From 2c4bc1808f272b7d7282d1b8ba416d606ebc7df5 Mon Sep 17 00:00:00 2001
From: tuqin <tuqin@tuqin.cn>
Date: 星期五, 18 九月 2026 15:25:31 +0800
Subject: [PATCH] refactor(生产核算): 成品/白盒归属改为按工序指定
---
src/main/resources/mapper/production/ProductionCostingMapper.xml | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/resources/mapper/production/ProductionCostingMapper.xml b/src/main/resources/mapper/production/ProductionCostingMapper.xml
index 569a067..05e3d7a 100644
--- a/src/main/resources/mapper/production/ProductionCostingMapper.xml
+++ b/src/main/resources/mapper/production/ProductionCostingMapper.xml
@@ -9,7 +9,7 @@
date_format(ppm.create_time, '%Y-%m') as yearMonth,
too.id as processId,
too.name as processName,
- cd.dept_type as deptType,
+ cp.dept_type as deptType,
ppo.product_model_id as productModelId,
p.product_name as productName,
pm.model as modelName,
@@ -18,7 +18,7 @@
inner join production_operation_task pot on pot.id = ppm.production_operation_task_id
inner join production_order_routing_operation poro on poro.id = pot.production_order_routing_operation_id
inner join technology_operation too on too.id = poro.technology_operation_id
- inner join production_costing_dept cd on cd.dept_id = too.dept_id
+ inner join production_costing_process cp on cp.process_id = too.id
inner join production_product_output ppo on ppo.production_product_main_id = ppm.id
left join product_model pm on pm.id = ppo.product_model_id
left join product p on p.id = pm.product_id
@@ -27,7 +27,7 @@
and ppm.report_type in (0, 1)
<if test="c != null">
<if test="c.deptType != null">
- and cd.dept_type = #{c.deptType}
+ and cp.dept_type = #{c.deptType}
</if>
<if test="c.yearMonth != null and c.yearMonth != ''">
and date_format(ppm.create_time, '%Y-%m') = #{c.yearMonth}
@@ -40,7 +40,7 @@
</if>
</if>
</where>
- group by ppm.user_id, ppm.user_name, yearMonth, too.id, too.name, cd.dept_type, ppo.product_model_id, p.product_name, pm.model
+ group by ppm.user_id, ppm.user_name, yearMonth, too.id, too.name, cp.dept_type, ppo.product_model_id, p.product_name, pm.model
order by yearMonth desc, ppm.user_id, too.id
</select>
--
Gitblit v1.9.3