This commit is contained in:
andy 2025-12-02 10:45:53 +08:00
parent 873c997719
commit 8b1f2171cf

View File

@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select DATE_FORMAT(max(ad.date_time),'%Y-%m-%d') as lastDate, ad.staff_id as userId, DATEDIFF(DATE_FORMAT(now(),'%Y-%m-%d'), DATE_FORMAT(max(ad.date_time),'%Y-%m-%d')) as diffDays
from rz_attendance_detail ad
left join sys_staff s on s.user_id = ad.staff_id
where s.`status` != '-1' AND ad.button_type like '%上班%' GROUP BY ad.staff_id HAVING DATEDIFF(DATE_FORMAT(now(),'%Y-%m-%d'), DATE_FORMAT(max(ad.date_time),'%Y-%m-%d')) > 3
where s.`status` != '-1' and s.clock_In='是' AND ad.button_type like '%上班%' GROUP BY ad.staff_id HAVING DATEDIFF(DATE_FORMAT(now(),'%Y-%m-%d'), DATE_FORMAT(max(ad.date_time),'%Y-%m-%d')) > 3
</select>