From 3938a9d9f636dfa538443fc9883113c697c1f0ff Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期二, 11 八月 2026 14:48:40 +0800
Subject: [PATCH] fix: 清理配置文件
---
src/main/resources/mapper/staff/PersonalShiftMapper.xml | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/src/main/resources/mapper/staff/PersonalShiftMapper.xml b/src/main/resources/mapper/staff/PersonalShiftMapper.xml
index e872e01..69bcae3 100644
--- a/src/main/resources/mapper/staff/PersonalShiftMapper.xml
+++ b/src/main/resources/mapper/staff/PersonalShiftMapper.xml
@@ -18,25 +18,22 @@
u.id user_id
FROM personal_shift s
LEFT JOIN staff_on_job u ON u.id = s.staff_on_job_id
- LEFT JOIN staff_leave sl ON sl.staff_on_job_id = u.id
LEFT JOIN personal_attendance_location_config palc ON palc.id = s.personal_attendance_location_config_id
<where>
- u.id IS NOT NULL
<if test="sysDeptId != null and sysDeptId != ''">
and u.sys_dept_id = #{sysDeptId}
</if>
<if test="time != null and time != ''">
and DATE_FORMAT(s.work_time, '%Y-%m') = DATE_FORMAT(#{time}, '%Y-%m')
- AND (u.staff_state = 1 OR (u.staff_state = 0 AND sl.leave_date IS NOT NULL AND sl.leave_date >= DATE_FORMAT(#{time}, '%Y-%m-01')))
</if>
<if test="userName != null and userName != ''">
and u.staff_name like concat('%', #{userName}, '%')
</if>
</where>
GROUP BY u.id, u.staff_name
- ORDER BY MAX(s.create_time) desc
+ ORDER BY MAX(s.create_time)
</select>
-
+
<select id="performanceShiftYear" resultType="java.util.Map">
SELECT
u.staff_name name,
@@ -46,12 +43,10 @@
GROUP_CONCAT(DATE_FORMAT(s.work_time, '%c'), '锛�', IFNULL(palc.shift, '') order by s.work_time SEPARATOR ';') month_str
FROM personal_shift s
LEFT JOIN staff_on_job u ON u.id = s.staff_on_job_id
- LEFT JOIN staff_leave sl ON sl.staff_on_job_id = u.id
- LEFT JOIN personal_attendance_location_config palc ON palc.id = s.personal_attendance_location_config_id
+ LEFT JOIN personal_attendance_location_config palc ON palc.id = s.personal_attendance_location_config_id
<where>
<if test="time != null and time != ''">
and DATE_FORMAT(s.work_time, '%Y') = DATE_FORMAT(#{time}, '%Y' )
- AND (u.staff_state = 1 OR (u.staff_state = 0 AND sl.leave_date IS NOT NULL AND sl.leave_date >= DATE_FORMAT(#{time}, '%Y-01-01')))
</if>
<if test="userName != null and userName != ''">
and u.staff_name like concat('%', #{userName}, '%')
@@ -71,12 +66,10 @@
GROUP_CONCAT(DATE_FORMAT(s.work_time, '%c'), '锛�', IFNULL(palc.shift, '') order by s.work_time SEPARATOR ';') month_str
FROM personal_shift s
LEFT JOIN staff_on_job u ON u.id = s.staff_on_job_id
- LEFT JOIN staff_leave sl ON sl.staff_on_job_id = u.id
LEFT JOIN personal_attendance_location_config palc ON palc.id = s.personal_attendance_location_config_id
<where>
<if test="time != null and time != ''">
and DATE_FORMAT(s.work_time, '%Y') = DATE_FORMAT(#{time}, '%Y' )
- AND (u.staff_state = 1 OR (u.staff_state = 0 AND sl.leave_date IS NOT NULL AND sl.leave_date >= DATE_FORMAT(#{time}, '%Y-01-01')))
</if>
<if test="userName != null and userName != ''">
and u.staff_name like concat('%', #{userName}, '%')
@@ -94,12 +87,10 @@
GROUP_CONCAT(s.work_time, '锛�', IFNULL(palc.shift, ''), '锛�', s.id order by s.work_time SEPARATOR ';') AS shift_time, u.id user_id
FROM personal_shift s
LEFT JOIN staff_on_job u ON u.id = s.staff_on_job_id
- LEFT JOIN staff_leave sl ON sl.staff_on_job_id = u.id
LEFT JOIN personal_attendance_location_config palc ON palc.id = s.personal_attendance_location_config_id
<where>
<if test="time != null and time != ''">
and DATE_FORMAT(s.work_time, '%Y-%m') = DATE_FORMAT(#{time}, '%Y-%m' )
- AND (u.staff_state = 1 OR (u.staff_state = 0 AND sl.leave_date IS NOT NULL AND sl.leave_date >= DATE_FORMAT(#{time}, '%Y-%m-01')))
</if>
<if test="userName != null and userName != ''">
and u.staff_name like concat('%', #{userName}, '%')
--
Gitblit v1.9.3