From 9233361dcf1f0455483bef3ab25ceb5786460017 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 14 Aug 2025 18:42:29 +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 --- .../controllers/applet_attendance.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yuthon_hr_attendance/controllers/applet_attendance.py b/yuthon_hr_attendance/controllers/applet_attendance.py index 0067b2cc1..c0ee18bdc 100644 --- a/yuthon_hr_attendance/controllers/applet_attendance.py +++ b/yuthon_hr_attendance/controllers/applet_attendance.py @@ -75,8 +75,8 @@ class AppletAttendance(Controller): [('employee_id', '=', employee_id.id), ('current_data', '=', current_date)]) check_in = attendance_id.check_in + timedelta(hours=8) if attendance_id.check_in else '' check_out = attendance_id.check_out + timedelta(hours=8) if attendance_id.check_out else '' - start_time_str = '09:00' - end_time_str = '18:00' + start_time_str = '' + end_time_str = '' if attendance_id: if not attendance_id.shift_id: year = attendance_id.current_data.year @@ -138,10 +138,10 @@ class AppletAttendance(Controller): state = 'yes' break _logger.info(f"\n人员: {employee_id.name} {employee_id.company_id.name} \n当前所在地址: {self_address['formatted_address']} \n是否可以打卡: {state}\n {wifi_name_list}\n wifi:{kw['wifi_name']}_________") - shift_info = attendance_id.shift_name if attendance_id else ( - "行政班次" if self.is_workday(current_date) else "") - time_part = f"{start_time_str}-{end_time_str}" if self.is_workday(current_date) else "休息" - attendance_id_class = f"{shift_info}{time_part}" if shift_info else time_part + if self.is_workday(current_date): + attendance_id_class = f"{attendance_id.shift_name} {start_time_str}-{end_time_str}" + else: + attendance_id_class = f"{attendance_id.shift_name}休息" data = { 'location': self_address['formatted_address'], 'user_id': user_id.id,