From 71f44d71edeabfdcc83366127a2f1f40f5a8de3e Mon Sep 17 00:00:00 2001
From: 123456 <123456>
Date: 星期三, 17 七月 2024 16:08:32 +0800
Subject: [PATCH] 费用统计分页查询功能修改
---
performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml b/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
index 97ff05d..aca6fec 100644
--- a/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
+++ b/performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
@@ -39,13 +39,14 @@
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>
</if>
- ) data
+ ) A
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
${ew.customSqlSegment}
</if>
@@ -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,
@@ -73,19 +75,21 @@
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