From 94adc6f8c317f26da2f1f3b65224ac262670bdd8 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期五, 31 五月 2024 17:15:52 +0800 Subject: [PATCH] 工时统计的原始工时 --- 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