From ab37a5cf872d400e929c14234c9039f3444302e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Thu, 2 Jul 2026 11:38:17 +0800 Subject: [PATCH 1/2] =?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 --- .../models/hr_attendance_detail_wechat.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py b/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py index 05be98727..4493f70bd 100644 --- a/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py +++ b/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py @@ -386,6 +386,20 @@ class HrAttendanceDetail(models.Model): sch_check_out_time = sch_check_out_time - timedelta(hours=1) is_early_card, is_late_card, is_abnormal, is_warning, absenteeism_card, is_no_card = self.state_judgment(employee, check_in_time, check_out_time, sch_check_in_time, sch_check_out_time, current_data, is_manual, attendance) + + # 如果是厨卫的 只用判断范围内是否打卡了 如果打卡就不算异常 + if template.role_id.name == '厨卫(集团)': + is_early_card = False + is_late_card = False + if check_in_time and check_out_time: + is_abnormal = False + is_no_card = False + absenteeism_card = False + else: + is_abnormal = True + is_no_card = True + absenteeism_card = True + is_expatriation = self.env['expatriation.approval'].search([('work_end', '=', True),('expatriates_ids', 'in', [employee.id]), ('is_effect', '=', False)]) if not self._process_shift_days(current_data) and template.role_id.name == '集团行政': start_datetime = datetime.combine(current_data, datetime.min.time()) @@ -486,10 +500,6 @@ class HrAttendanceDetail(models.Model): start_datetime = datetime.combine(date, datetime.min.time()).replace( hour=start_hour, minute=start_minute, second=0, microsecond=0 ) - timedelta(hours=8) - if template.planning_name == '厨卫(集团本部)': - start_datetime = datetime.combine(date, datetime.min.time()).replace( - hour=start_hour, minute=start_minute, second=0, microsecond=0 - ) - timedelta(hours=6) if template.day2 == '次日': end_datetime = datetime.combine(date, datetime.min.time()).replace( hour=end_hour, minute=end_minute, second=0, microsecond=0 From 265f5a1a680ddd73ba928850e9dd15f6b658c482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Thu, 2 Jul 2026 11:38:24 +0800 Subject: [PATCH 2/2] =?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_notice/models/yuthon_confirm_users.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yuthon_notice/models/yuthon_confirm_users.py b/yuthon_notice/models/yuthon_confirm_users.py index d6ccbfbfe..747485e68 100644 --- a/yuthon_notice/models/yuthon_confirm_users.py +++ b/yuthon_notice/models/yuthon_confirm_users.py @@ -34,7 +34,7 @@ class YuthonConfirmUsers(models.Model): confirm_noice_ids = self.env["yuthon.confirm.users"].browse(self._context.get('active_ids', self._context.get('active_id'))) for record in confirm_noice_ids: if record.state == 'state': - raise UserError(f'{record.notice_name}通知还未发送,无法撤回') + raise UserError(f'{record.notice_id.name}通知还未发送,无法撤回') record.withdrawn() def sync_confirm_users_notices(self): @@ -43,7 +43,7 @@ class YuthonConfirmUsers(models.Model): record.with_context(lang=record.env.lang)._message_auto_subscribe_notify(partner_ids, 'yuthon_notice.message_yuthon_confirm_users_data') url = f'https://phone.thtzjt.com/phone/Notice/{self.notice_id.id}?employee_id={record.employee_id.id}' self.sudo().env["wecom.apps"].sync_send_message_textcard(category='notice', touser=record.employee_id.wecom_userid, title="通知公告", - description="您有待确认的通知公告请尽快确认", url=url, btntxt="详细信息") + description=f"您有一条【{record.notice_id.name}】的通知公告请尽快确认", url=url, btntxt="详细信息") def reminders_notice(self): @@ -52,7 +52,7 @@ class YuthonConfirmUsers(models.Model): for rec in confirm_noice_ids: url = f'https://phone.thtzjt.com/phone/Notice/{self.notice_id.id}?employee_id={rec.employee_id.id}' result_data = self.sudo().env["wecom.apps"].sync_send_message_textcard(category='notice', touser=rec.employee_id.wecom_userid, - title="通知公告(催办)", description="您有待确认的通知公告请尽快确认", + title="通知公告(催办)", description=f"您有一条【{rec.notice_id.name}】的通知公告请尽快确认", url=url, btntxt="详细信息") if result_data: res_dict = result_data[1] @@ -75,7 +75,7 @@ class YuthonConfirmUsers(models.Model): result_data = self.sudo().env["wecom.apps"].sync_send_message_textcard(category='notice', touser=rec.employee_id.wecom_userid, title="通知公告", - description="您有待确认的通知公告请尽快确认", + description=f"您有一条【{rec.notice_id.name}】待确认的通知公告请尽快确认", url=url, btntxt="详细信息") if result_data: res_dict = result_data[1]