From 1fb4735cf75f6b98b8d81611a95ccea395cba323 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 20 四月 2026 16:35:04 +0800
Subject: [PATCH] 绩效模块调整
---
performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml | 41 ++++++++++-------------------------------
1 files changed, 10 insertions(+), 31 deletions(-)
diff --git a/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml b/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
index 8fa884c..cf3d451 100644
--- a/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
+++ b/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
@@ -19,9 +19,11 @@
s.shift,
s.work_time,
s.annotation_text,
+ sd.dict_label AS shift_name,
u2.name AS user_name,
u2.id user_id
FROM performance_shift s
+ left join sys_dict_data sd on s.shift = sd.dict_value and sd.dict_type='sys_class_type'
LEFT JOIN (SELECT distinct u.* from
user u
left join department_lims dl on FIND_IN_SET(dl.id,u.depart_lims_id)
@@ -40,32 +42,7 @@
and u2.name like concat('%', #{userName}, '%')
</if>
</where>
- order by s.create_time
- </select>
-
- <select id="performanceShiftYearPage" resultType="map">
- SELECT
- s.user_id, s.shift
- FROM performance_shift s
- LEFT JOIN (SELECT u.* from
- user u
- left join department_lims dl on FIND_IN_SET(dl.id,u.depart_lims_id)
- where status = '0'
- and del_flag = '0'
- <if test="laboratory != null and laboratory != ''">
- and dl.name=#{laboratory}
- </if>
- ) u2 on u2.id = s.user_id
- where s.shift is not NULL
- and s.shift != ''
- and name is not null
- <if test="time != null and time != ''">
- and DATE_FORMAT(s.work_time, '%Y') = DATE_FORMAT(#{time}, '%Y' )
- </if>
- <if test="userName != null and userName != ''">
- and u2.name like concat('%', #{userName}, '%')
- </if>
- order by s.create_time
+ order by s.work_time
</select>
<select id="performanceShiftYear" resultMap="performanceShiftMap">
@@ -73,10 +50,12 @@
u2.name AS user_name,
s.user_id,
u2.account,
- DATE_FORMAT(s.work_time, '%c') month_num,
+ sd.dict_label AS shift_name,
+ s.work_time,
s.shift,
s.id
FROM performance_shift s
+ left join sys_dict_data sd on s.shift = sd.dict_value and sd.dict_type='sys_class_type'
LEFT JOIN (SELECT u.* from
user u
left join department_lims dl on FIND_IN_SET(dl.id,u.depart_lims_id)
@@ -89,13 +68,13 @@
where s.shift is not NULL
and s.shift != ''
and name is not null
- <if test="time != null and time != ''">
- and DATE_FORMAT(s.work_time, '%Y') = DATE_FORMAT(#{time}, '%Y' )
+ <if test="startDateTime != null and endDateTime != null">
+ and s.work_time between #{startDateTime} and #{endDateTime}
</if>
<if test="userName != null and userName != ''">
and u2.name like concat('%', #{userName}, '%')
</if>
- order by s.create_time
+ order by s.work_time
</select>
<select id="performanceShiftYearList" resultType="map">
@@ -169,6 +148,6 @@
AND (u.account like concat('%',#{keyword},'%') OR u.name like concat('%',#{keyword},'%'))
</if>
</where>
- ORDER BY ps.work_time,ps.user_id
+ ORDER BY ps.work_time,u.sort
</select>
</mapper>
--
Gitblit v1.9.3