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