From 182b0785c628e6b1134d51985a692d0df7a8fb85 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期二, 16 七月 2024 21:17:22 +0800
Subject: [PATCH] 区间改为&
---
performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml | 28 ++++++++++++++++------------
1 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml b/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
index 8210a83..de3994d 100644
--- a/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
+++ b/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
@@ -35,12 +35,13 @@
output_work_time,
date_time,
week,
- week_day,
+ SUBSTRING(week_day, 2) AS week_day,
name
FROM auxiliary_output_working_hours aowh
left join user on user.id=aowh.`check`
+ WHERE 1=1
<if test="ids !=null and ids != ''">
- WHERE `check` in
+ and `check` in
<foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
#{val}
</foreach>
@@ -54,12 +55,13 @@
select aowh.*,name
FROM auxiliary_output_working_hours aowh
left join user on user.id=aowh.`check`
- <if test="ids !=null and ids != ''">
- WHERE `check` in
- <foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
- #{val}
- </foreach>
- </if>
+ WHERE 1=1
+ <if test="ids !=null and ids != ''">
+ and `check` 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,
@@ -68,24 +70,26 @@
from(
select user.name,
date_time as month,
- sum(output_work_time) as manHours
+ FORMAT(SUM(output_work_time), 2) as manHours
from auxiliary_output_working_hours aowh
left join user on user.id=aowh.`check`
left join department_lims dl on depart_lims_id=dl.id
where date_time LIKE CONCAT('%', #{month}, '%')
+ <!--and `check` in (#{ids})-->
<if test="ids !=null and ids != ''">
and `check` in
- <foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
+ <foreach collection="ids" open="(" separator="," close=")" item="val">
#{val}
</foreach>
</if>
- group by user.name,month
- order by month,user.name
+ group by user.name,date_time
+ order by user.name,date_time
)A
</select>
<select id="selectListByIds" resultType="com.yuanchu.mom.pojo.AuxiliaryOutputWorkingHours">
select * from auxiliary_output_working_hours
where 1=1
+ <!--and `check` in(#{ids})-->
<if test="ids !=null and ids != ''">
and `check` in
<foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
--
Gitblit v1.9.3