From 30db5b326ae164d1256726191bd36a0d24f5f335 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 19 二月 2025 14:02:28 +0800
Subject: [PATCH] 修改
---
performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml | 57 +++++++++++++++++++++++++++++++++++----------------------
1 files changed, 35 insertions(+), 22 deletions(-)
diff --git a/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml b/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml
index 4a77ae2..476beb0 100644
--- a/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml
+++ b/performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml
@@ -31,13 +31,13 @@
select awhd.*,name
FROM auxiliary_working_hours_day awhd
left join user on name_user=user.id
- 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}
@@ -47,29 +47,28 @@
select awhd.*,name
FROM auxiliary_working_hours_day awhd
left join user on name_user=user.id
- WHERE name_user in(#{ids})
- <!--<if test="ids !=null and ids != ''">
- WHERE name_user in
- <foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
- #{val}
- </foreach>
- </if>-->
- </select>
- <select id="selectListByIds" resultType="com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay">
- select * from auxiliary_working_hours_day
- where 1=1
- and name_user in(#{ids})
- <!-- <if test="ids !=null and ids != ''">
+ 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>
+ </select>
+ <select id="selectListByIds" resultType="com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay">
+ select * from auxiliary_working_hours_day
+ where state='宸插鏍�'
+ <if test="ids !=null and ids != ''">
+ 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
+ FORMAT(SUM(manHour), 4)as manHours
from(
select user.name,
case when reviewer_nonproductive_time is null then nonproductive_time
@@ -80,16 +79,30 @@
left join department_lims dl on depart_lims_id=dl.id
where date_time LIKE CONCAT('%', #{month}, '%')
and awhd.state='宸叉壒鍑�'
- and name_user in (#{ids})
- <!-- <if test="ids !=null and ids != ''">
+ <if test="ids !=null and ids != ''">
and name_user in
<foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
#{val}
</foreach>
- </if>-->
+ </if>
order by month,user.name
)A
group by A.name,A.month
order by A.name,A.month
</select>
+
+ <select id="selectLists" resultMap="BaseResultMap">
+ select * from(select * from auxiliary_working_hours_day
+ 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>
+ ) A
+ <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
+ ${ew.customSqlSegment}
+ </if>
+ </select>
</mapper>
--
Gitblit v1.9.3