Commit 27c392a5 by 张富康

fix(attendance): 修正出勤汇总的总工时计算

- totalWorkHours 字段改为根据 appeal_attendance_days 乘以 8 计算
- 若 appeal_attendance_days 为空则保留原有 total_work_hours 值
- 保持其他字段及查询条件不变
- 优化 SQL 可读性和逻辑表达
1 parent 2bca1284
......@@ -209,14 +209,15 @@
</select>
<select id="attendanceSummary" resultType="cn.com.glsx.dj.staff.dto.perfSalary.AttendanceStaffSummaryDTO">
select sas.id as id,
sas.name as name,
sas.mobile_phone as mobilePhone,
sas.attendance_month as attendanceMonth,
sas.total_work_hours as totalWorkHours,
sas.late_early_hours as lateEarlyHours,
sas.missing_punch_count as missingPunchCount,
sas.oId_job_post as positionName
select sas.id as id,
sas.name as name,
sas.mobile_phone as mobilePhone,
sas.attendance_month as attendanceMonth,
IF(sas.appeal_attendance_days IS NOT NULL, sas.appeal_attendance_days * 8,
sas.total_work_hours) AS totalWorkHours,
sas.late_early_hours as lateEarlyHours,
sas.missing_punch_count as missingPunchCount,
sas.oId_job_post as positionName
from sal_attendance_summary sas
where sas.deleted_flag = 'N'
and sas.mobile_phone = #{mobilePhone}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!