From dc6a8ff2eb1dbfc532eac8d296b68e5e05a4a6e7 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期一, 17 六月 2024 13:59:27 +0800 Subject: [PATCH] 工时组长权限bug修改 --- performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml b/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml index cbcc3a6..c4c2c6f 100644 --- a/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml +++ b/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml @@ -57,10 +57,35 @@ select * from auxiliary_working_hours_day where 1=1 <if test="ids !=null and ids != ''"> - and name_user in + and name_user in <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> #{val} </foreach> </if> </select> + <select id="totalHours" resultType="java.util.Map"> + select A.name, + A.month, + sum(A.manHour)as manHours + from( + select user.name, + case when reviewer_nonproductive_time is null then nonproductive_time + else reviewer_nonproductive_time end as manHour, + date_time as month + from auxiliary_working_hours_day awhd + left join user on user.id=awhd.name_user + left join department_lims dl on depart_lims_id=dl.id + where date_time LIKE CONCAT('%', #{month}, '%') + and awhd.state='宸叉壒鍑�' + <if test="ids !=null and ids != ''"> + and name_user in + <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> + #{val} + </foreach> + </if> + order by month,user.name + )A + group by A.name,A.month + order by A.name,A.month + </select> </mapper> -- Gitblit v1.9.3