refector: 离职或退休可提供当前8h内的门禁时间
This commit is contained in:
parent
023dd12195
commit
1f8963514f
|
@ -94,7 +94,7 @@ class EmployeeCreateUpdateSerializer(CustomModelSerializer):
|
|||
end_time = now + timedelta(days=7300)
|
||||
if instance.job_state in [20, 30] and old_job_state == 10: # 离职或退休
|
||||
start_time = now
|
||||
end_time = now + timedelta(minutes=60)
|
||||
end_time = now + timedelta(hours=8)
|
||||
elif instance.job_state == 10 and old_job_state in [20, 30] and instance.type == 'employee': # 正式员工重新在职
|
||||
start_time = now
|
||||
end_time = now + timedelta(days=7300)
|
||||
|
|
Loading…
Reference in New Issue