From 95e69381eeb4a589e9ab7b8e3b967ceb36d13b1d Mon Sep 17 00:00:00 2001 From: Crunchy <3114200645@qq.com> Date: 星期四, 18 七月 2024 18:20:28 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- performance-server/src/main/resources/mapper/AuxiliaryCorrectionHoursMapper.xml | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/performance-server/src/main/resources/mapper/AuxiliaryCorrectionHoursMapper.xml b/performance-server/src/main/resources/mapper/AuxiliaryCorrectionHoursMapper.xml index a57a4c3..6626e9f 100644 --- a/performance-server/src/main/resources/mapper/AuxiliaryCorrectionHoursMapper.xml +++ b/performance-server/src/main/resources/mapper/AuxiliaryCorrectionHoursMapper.xml @@ -46,16 +46,22 @@ <select id="selectAuxiliaryCorrectionHours" resultType="com.yuanchu.mom.dto.AuxiliaryCorrectionHoursDto"> select A.* from ( - select ach.*,name + select ach.*, + name, + sum(one_hours+two_hours+ three_hours+ four_hours+ five_hours+ six_hours+ seven_hours+ eight_hours+ nine_hours+ + ten_hours+ eleven_hours+ twelve_hours+thirteen_hours+ fourteen_hours+ fifteen_hours+ sixteen_hours+ + seventeen_hours+ eighteen_hours+ nineteen_hours+ twenty_hours+ twenty_one_hours+ twenty_two_hours+ + twenty_three_hours+ twenty_four_hours+ twenty_five_hours+ twenty_six_hours+ twenty_seven_hours+ + twenty_eight_hours+ twenty_nine_hours+ thirty_hours+ thirty_one_hours) as total FROM auxiliary_correction_hours ach left join user on user.id=ach.name_user - WHERE name_user in(#{ids}) - <!--<if test="ids !=null and ids != ''"> - WHERE name_user in + WHERE 1=1 + <if test="ids !=null and ids != ''"> + and name_user in <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> #{val} </foreach> - </if>--> + </if> ) A <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> ${ew.customSqlSegment} -- Gitblit v1.9.3