From 3ae364164cb9d85acce0b53a1ba5c70a80991308 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期三, 03 七月 2024 22:21:49 +0800 Subject: [PATCH] 温度循环+报告英文换行+检验只有一项的设备查询+光纤配置报告换页+温度湿度 --- performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml | 31 ++++++++++++++++++++++++++++--- 1 files changed, 28 insertions(+), 3 deletions(-) diff --git a/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml b/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml index cbcc3a6..04cdf11 100644 --- a/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml +++ b/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml @@ -26,7 +26,7 @@ <result column="state" property="state"/> </resultMap> <select id="selectAuxiliaryWorkingHoursDay" resultType="com.yuanchu.mom.dto.AuxiliaryWorkingHoursDayDto"> - select data.* + select A.* from ( select awhd.*,name FROM auxiliary_working_hours_day awhd @@ -37,7 +37,7 @@ #{val} </foreach> </if> - ) data + ) A <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} </if> @@ -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