!10395 添加功能

Merge pull request !10395 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2026-03-30 11:22:39 +00:00
committed by Gitee
+2 -2
View File
@@ -1340,12 +1340,12 @@ class HrAttendance(models.Model):
match_record = False
for go in go_approval_records:
# 按天匹配
if go.start_date and go.end_date:
if go.start_date and go.end_date and go.is_day:
if go.start_date <= current_date <= go.end_date:
match_record = go
break
# 按小时匹配
if go.date_start and go.date_end:
if go.date_start and go.date_end and go.is_hour:
go_start = fields.Datetime.from_string(go.date_start)
go_end = fields.Datetime.from_string(go.date_end)
if go_start <= current_date_end and go_end >= current_date_start: