From b749d87da88b47af446da18da7f6870eb513e2d3 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Sat, 5 Jul 2025 19:13:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_attendance/controllers/applet_attendance.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yuthon_hr_attendance/controllers/applet_attendance.py b/yuthon_hr_attendance/controllers/applet_attendance.py index e0c595513..145c77a10 100644 --- a/yuthon_hr_attendance/controllers/applet_attendance.py +++ b/yuthon_hr_attendance/controllers/applet_attendance.py @@ -58,8 +58,8 @@ class AppletAttendance(Controller): end_time_str = f"{int(check_out_end):02d}-{end_minute:02d}" is_early_card = attendance_id.is_early_card is_late_card = attendance_id.is_late_card - check_in_status = '缺卡' if not check_in else ('迟到' if is_late_card else '') - check_out_status = '缺卡' if not check_out else ('早退' if is_early_card else '') + check_in_status = '' if not attendance_id.shift_name else ('缺卡' if not check_in else ('迟到' if is_late_card else '')) + check_out_status = '' if not attendance_id.shift_name else ('缺卡' if not check_out else ('早退' if is_early_card else '')) state_result = '' if is_late_card: state_result = '迟到' @@ -69,8 +69,8 @@ class AppletAttendance(Controller): state_result = '缺卡' check_in_str = check_in.strftime('%H:%M:%S') if check_in else ' ' check_out_str = check_out.strftime('%H:%M:%S') if check_out else ' ' - check_in_html = f'
{check_in_str}
' if check_in_status in ['迟到', '早退', '缺卡'] else f'{check_in_str}
' - check_out_html = f'{check_out_str}
' if check_out_status in ['迟到', '早退', '缺卡'] else f'{check_out_str}
' + check_in_html = '' if not attendance_id.shift_name else (f'{check_in_str}
' if check_in_status in ['迟到', '早退', '缺卡']else f'{check_in_str}
' ) + check_out_html = '' if not attendance_id.shift_name else (f'{check_out_str}
' if check_out_status in ['迟到', '早退', '缺卡']else f'{check_out_str}
') self_address = self.get_address_from_coords(kw['att_latitude'], kw['att_longitude']) _logger.info(f"打卡经度{kw['att_longitude'] }打卡纬度{kw['att_latitude']}__________") _logger.info(f"人员{employee_id.name}地址{self_address['formatted_address']}__________")