From ee487a7ac3dfb1b2a07aaceef9e6d6b6abc88a02 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期二, 28 二月 2023 11:25:25 +0800
Subject: [PATCH] 优化部门
---
java110-db/src/main/resources/mapper/report/ReportAttendanceServiceDaoImplMapper.xml | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/report/ReportAttendanceServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/report/ReportAttendanceServiceDaoImplMapper.xml
index f892889..ea8c22a 100755
--- a/java110-db/src/main/resources/mapper/report/ReportAttendanceServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/report/ReportAttendanceServiceDaoImplMapper.xml
@@ -43,7 +43,6 @@
SELECT
t.staff_name staffName,
t.staff_id staffId,
- uo.org_name departmentName,
t.classes_id classesId,
ac.classes_name classesName,
(
@@ -57,6 +56,7 @@
AND act.status_cd = '0'
AND act.task_id = b.task_id
AND b.state = '10000'
+ and b.value < now()
<if test="taskYear !=null and taskYear != ''">
and act.task_year= #{taskYear}
</if>
@@ -74,7 +74,7 @@
ac.classes_id = act.class_id
AND act.status_cd = '0'
AND act.task_id = b.task_id
- AND b.state = '30000'
+ AND b.state in ('30000','70000')
<if test="taskYear !=null and taskYear != ''">
and act.task_year= #{taskYear}
</if>
@@ -142,10 +142,12 @@
AND ac.status_cd = '0'
LEFT JOIN u_user s ON t.staff_id = s.user_id
AND s.status_cd = '0'
- LEFT JOIN u_org_staff_rel uosr ON uosr.staff_id = s.user_id
- AND uosr.status_cd = '0'
- LEFT JOIN u_org uo ON uosr.org_id = uo.org_id
- AND uo.status_cd = '0'
+ <if test="departmentId !=null and departmentId != ''">
+ LEFT JOIN u_org_staff_rel uosr ON uosr.staff_id = s.user_id
+ AND uosr.status_cd = '0'
+ LEFT JOIN u_org uo ON uosr.org_id = uo.org_id
+ AND uo.status_cd = '0'
+ </if>
WHERE
t.status_cd = '0'
<if test="staffName !=null and staffName != ''">
@@ -169,9 +171,10 @@
</select>
<select id="getMonthAttendanceDetail" parameterType="Map" resultType="Map">
- select t.detail_id detailId,t.spec_cd specCd,t.`value`,t.check_time checkTime,t.state,t.face_path facePath,t.create_time createTime,act.task_day taskDay
+ select t.detail_id detailId,t.spec_cd specCd,t.`value`,t.check_time checkTime,t.state,t.face_path facePath,t.create_time createTime,act.task_day taskDay,td.`name` stateName
from attendance_classes_task_detail t
left join attendance_classes_task act on t.task_id = act.task_id and act.status_cd = '0'
+ left join t_dict td on t.state = td.status_cd and td.table_name = 'attendance_classes_task_detail' and td.table_columns = 'state'
where
t.status_cd = '0'
and act.class_id = #{classId}
@@ -185,5 +188,6 @@
<if test="taskMonth !=null and taskMonth != ''">
and act.task_month= #{taskMonth}
</if>
+ order by t.`value`
</select>
</mapper>
--
Gitblit v1.8.0