添加功能

This commit is contained in:
zhou
2025-07-05 19:13:56 +08:00
parent 751616f071
commit b749d87da8
@@ -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'<p style="color:red">{check_in_str}</p>' if check_in_status in ['迟到', '早退', '缺卡'] else f'<p style="color:green">{check_in_str}</p>'
check_out_html = f'<p style="color:red">{check_out_str}</p>' if check_out_status in ['迟到', '早退', '缺卡'] else f'<p style="color:green">{check_out_str}</p>'
check_in_html = '' if not attendance_id.shift_name else (f'<p style="color:red">{check_in_str}</p>' if check_in_status in ['迟到', '早退', '缺卡']else f'<p style="color:green">{check_in_str}</p>' )
check_out_html = '' if not attendance_id.shift_name else (f'<p style="color:red">{check_out_str}</p>' if check_out_status in ['迟到', '早退', '缺卡']else f'<p style="color:green">{check_out_str}</p>')
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']}__________")