From 948194840fc18c00617cbf3cf72f9e81bb0ee5b3 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 14 四月 2026 16:50:00 +0800
Subject: [PATCH] 人员考勤调整:导出区分年度和月度

---
 performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml b/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
index 1388484..8fa884c 100644
--- a/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
+++ b/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
@@ -145,4 +145,30 @@
         from department_lims
         where id = #{depLimsId}
     </select>
+    <select id="selectListByWorkTime" resultType="com.ruoyi.performance.dto.PerformanceShiftMapDto">
+        SELECT
+            ps.id,
+            ps.shift,
+            ps.work_time,
+            ps.user_id,
+            u.name AS user_name,
+            u.account AS person_code,
+            st.start_time,
+            st.end_time,
+            sd.dict_label AS shift_name,
+            ps.annotation_text
+        FROM performance_shift ps
+        inner JOIN user u ON ps.user_id = u.id
+        LEFT JOIN shift_time st ON ps.shift = st.shift
+        left join sys_dict_data sd on ps.shift = sd.dict_value AND sd.dict_type='sys_class_type'
+        <where>
+            <if test="startTime!=null and endTime!=null">
+                AND ps.work_time BETWEEN #{startTime} AND #{endTime}
+            </if>
+            <if test="keyword!='' and keyword!=null">
+                AND (u.account like concat('%',#{keyword},'%') OR u.name like concat('%',#{keyword},'%'))
+            </if>
+        </where>
+        ORDER BY ps.work_time,ps.user_id
+    </select>
 </mapper>

--
Gitblit v1.9.3