diff --git a/yuthon_hr_attendance/controllers/applet_attendance.py b/yuthon_hr_attendance/controllers/applet_attendance.py index 5c9893ac9..c8277e728 100644 --- a/yuthon_hr_attendance/controllers/applet_attendance.py +++ b/yuthon_hr_attendance/controllers/applet_attendance.py @@ -77,6 +77,24 @@ class AppletAttendance(Controller): 'state_result': ' ', 'check_in': [' ', '未打卡'], 'check_out': [' ', '未打卡']} + elif not check_in and is_early_card: + return { + 'location': '%s' % address_id.address_name2, + 'user_id': user_id, + 'state': 'yes', + 'class':attendance_class, + 'state_result': ' ', + 'check_in': [' ', '未打卡'], + 'check_out': [' ', '迟到']} + elif not check_out and is_late_card: + return { + 'location': '%s' % address_id.address_name2, + 'user_id': user_id, + 'state': 'yes', + 'class':attendance_class, + 'state_result': ' ', + 'check_in': [' ', '迟到'], + 'check_out': [' ', '未打卡']} elif not check_out and not is_late_card: return { 'location': '%s' % address_id.address_name2,