diff --git a/apps/hrm/services.py b/apps/hrm/services.py index 49405a3e..a8d3a02d 100755 --- a/apps/hrm/services.py +++ b/apps/hrm/services.py @@ -259,6 +259,18 @@ class HrmService: elif e_type == 2: card_type = 20 else: + time_10_x = datetime(year=s_time_f.year, month=s_time_f.month, + day=s_time_f.day, hour=3, minute=0, second=0, tzinfo=tzinfo) + time_10_y = datetime(year=s_time_f.year, month=s_time_f.month, + day=s_time_f.day, hour=11, minute=0, second=0, tzinfo=tzinfo) + time_20_x = datetime(year=s_time_f.year, month=s_time_f.month, + day=s_time_f.day, hour=16, minute=0, second=0, tzinfo=tzinfo) + time_20_y = datetime(year=s_time_f.year, month=s_time_f.month, + day=s_time_f.day, hour=23, minute=0, second=0, tzinfo=tzinfo) + if time_10_x < s_time_f < time_10_y: + card_type = 10 + elif time_20_x < s_time_f < time_20_y: + card_type = 20 trigger = 'panel' # 先直接创建记录