From 70a0b21595941890a9d26cfde01ff17e3427214a Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 23 七月 2026 09:24:41 +0800
Subject: [PATCH] 修改工资计算
---
src/main/resources/mapper/production/ProductionAccountMapper.xml | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/production/ProductionAccountMapper.xml b/src/main/resources/mapper/production/ProductionAccountMapper.xml
index b7e27b0..f0937f0 100644
--- a/src/main/resources/mapper/production/ProductionAccountMapper.xml
+++ b/src/main/resources/mapper/production/ProductionAccountMapper.xml
@@ -172,6 +172,30 @@
)
</select>
+ <select id="selectMonthSalaryCalcItems" resultType="java.util.Map">
+ select
+ poro.type as operationType,
+ ifnull(pa.finished_num, 0) as finishedNum,
+ ifnull(ppm.work_hour, 0) as workHour,
+ ifnull(ppm.repair_work_hour, 0) as repairWorkHour,
+ ifnull(too.standard_quantity, 0) as standardQuantity,
+ ifnull(too.conversion_factor, 1) as conversionFactor
+ from production_account pa
+ left join production_product_main ppm on ppm.id = pa.production_product_main_id
+ left join production_operation_task pot on ppm.production_operation_task_id = pot.id
+ left join production_order_routing_operation poro on pot.production_order_routing_operation_id = poro.id
+ left join technology_operation too on poro.technology_operation_id = too.id
+ where pa.scheduling_user_id = #{userId}
+ and date_format(pa.scheduling_date, '%Y-%m') = #{date}
+ and (
+ pa.production_product_main_id is null
+ or (
+ ppm.audit_status = 1
+ and ppm.report_type in (0, 1)
+ )
+ )
+ </select>
+
<select id="selectDailyWagesStats" resultType="java.util.Map">
select date_format(scheduling_date, '%m-%d') as dateStr,
cast(ifnull(sum(finished_num), 0) as decimal(18,2)) as numberOfCompleted,
--
Gitblit v1.9.3