From 2cb471c2a43e63bc5826162fc5d60ba1758d4731 Mon Sep 17 00:00:00 2001 From: guoshengxiong <1923636941@qq.com> Date: Wed, 29 Oct 2025 16:42:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=9C=88/=E6=97=A5=E5=87=BA=E5=8B=A4/?= =?UTF-8?q?=E5=9C=A8=E8=81=8C=E4=BA=BA=E6=95=B0=E7=BB=9F=E8=AE=A1=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...orkerDailyAttendanceStatisticsV2Mapper.xml | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/WorkerDailyAttendanceStatisticsV2Mapper.xml b/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/WorkerDailyAttendanceStatisticsV2Mapper.xml index 876674080..c4d5ca558 100644 --- a/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/WorkerDailyAttendanceStatisticsV2Mapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/WorkerDailyAttendanceStatisticsV2Mapper.xml @@ -136,7 +136,23 @@ ,count(*) as total_in_service_num ,ifnull(sum(t.is_attendance),0) as total_attendance_num - from worker_daily_attendance_statistics_v2 t + from ( + select * from + worker_daily_attendance_statistics_v2 t + where 1=1 + + and t.attendance_date =]]> concat(#{startMonth},'-01 00:00:00') + + + and t.attendance_date CONCAT(LAST_DAY(CONCAT(#{endMonth}, '-01')), ' 23:59:59') + + + and t.attendance_date >= #{startDate} + + + and t.attendance_date concat(#{endDate},' 23:59:59') + + ) t JOIN worker_info a on t.person_sn=a.person_sn LEFT JOIN team_info b ON a.team_id = b.id and a.person_type = 1 LEFT JOIN department_info c ON a.department_id = c.id and a.person_type = 2 @@ -156,18 +172,6 @@ and a.department_id=#{departmentId} - - and t.attendance_date =]]> concat(#{startMonth},'-01 00:00:00') - - - and t.attendance_date CONCAT(LAST_DAY(CONCAT(#{endMonth}, '-01')), ' 23:59:59') - - - and t.attendance_date >= #{startDate} - - - and t.attendance_date concat(#{endDate},' 23:59:59') - group by x_name )t