From d6efb3c2db8074e991c13a285a5c9225ad241616 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, 5 Feb 2026 15:34:31 +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/models/yuthon_shift_planning.py | 9 ++-------
yuthon_hr_attendance/views/yuthon_holiday_statement.xml | 4 ++--
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/yuthon_hr_attendance/models/yuthon_shift_planning.py b/yuthon_hr_attendance/models/yuthon_shift_planning.py
index 367f6809d..52db6b490 100644
--- a/yuthon_hr_attendance/models/yuthon_shift_planning.py
+++ b/yuthon_hr_attendance/models/yuthon_shift_planning.py
@@ -129,15 +129,10 @@ class YuthonShiftPlanning(models.Model):
current_date = start_date
while current_date <= end_date:
current_weekday = current_date.weekday()
- if resource_id in ever_holidays and current_weekday in ever_holidays[resource_id]:
- pass
- else:
+ if not (resource_id in ever_holidays and current_weekday in ever_holidays[resource_id]):
self.create_planning_slot(record, role_a, role_item, current_date)
current_date += timedelta(days=1)
- if current_date >= end_date:
- break
- if current_date >= end_date:
- break
+
# 为白班员工创建排班
create_shifts_for_group(self.planning_ever_white_ids, role[0])
# 为中班员工创建排班
diff --git a/yuthon_hr_attendance/views/yuthon_holiday_statement.xml b/yuthon_hr_attendance/views/yuthon_holiday_statement.xml
index 872b21d18..d6960c392 100644
--- a/yuthon_hr_attendance/views/yuthon_holiday_statement.xml
+++ b/yuthon_hr_attendance/views/yuthon_holiday_statement.xml
@@ -12,10 +12,10 @@
-
+
-
+