From b8045b11ca8af95cb5aeba464bff589e0b9f53b8 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期四, 30 五月 2024 18:08:13 +0800 Subject: [PATCH] 光纤配置三层架构+辅助工时的审核与批准逻辑修改 --- performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml | 27 +++++++++++++++++++++++++-- 1 files changed, 25 insertions(+), 2 deletions(-) diff --git a/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml b/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml index 0b702be..31d6551 100644 --- a/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml +++ b/performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml @@ -6,6 +6,7 @@ <result column="name" property="name"/> <result column="shift_time" property="shiftTime"/> <result column="user_id" property="userId" /> + <result column="department" property="department" /> </resultMap> <select id="performanceShiftPage" resultMap="performanceShiftPageMap"> @@ -25,6 +26,7 @@ </if> </where> GROUP BY u.id + order by s.create_time </select> <select id="performanceShiftYearPage" resultType="map"> @@ -42,6 +44,7 @@ </if> <if test="laboratory != null and laboratory != ''"> </if> + order by s.create_time </select> <select id="performanceShiftYear" resultType="java.util.Map"> @@ -62,7 +65,7 @@ <if test="laboratory != null and laboratory != ''"> </if> GROUP BY u.id - order by s.work_time + order by s.create_time </select> <select id="performanceShiftYearList" resultType="map"> @@ -83,6 +86,26 @@ <if test="laboratory != null and laboratory != ''"> </if> GROUP BY u.id - order by s.work_time + order by s.create_time + </select> + + <select id="performanceShiftList" resultMap="performanceShiftPageMap"> + SELECT + if(u.department is not null and u.department != '', CONCAT(u.name, '锛�', u.department, '锛�'), u.name) name, + GROUP_CONCAT(s.work_time, '锛�', s.shift, '锛�', s.id order by s.work_time SEPARATOR ';') AS shift_time, u.id user_id, u.department + FROM performance_shift s + LEFT JOIN user u on u.id = s.user_id + <where> + <if test="time != null and time != ''"> + and DATE_FORMAT(s.work_time, '%Y-%m') = DATE_FORMAT(#{time}, '%Y-%m' ) + </if> + <if test="userName != null and userName != ''"> + and u.name like concat('%', #{userName}, '%') + </if> + <if test="laboratory != null and laboratory != ''"> + </if> + </where> + GROUP BY u.id + order by s.create_time </select> </mapper> -- Gitblit v1.9.3