baoyubo 5 天之前
父节点
当前提交
276c29eb83
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      routers/api/dutyManagement/schedule.py

+ 3 - 3
routers/api/dutyManagement/schedule.py

@@ -753,14 +753,14 @@ async def create_contact(
                 shift_type = '1'
             else:
                 if start_time==end_time:
-                    shift_type = '2'
-                else:
                     shift_type = '3'
+                else:
+                    shift_type = '2'
             start_date1 = xlrd.xldate.xldate_as_datetime(start_date, book.datemode).strftime('%Y-%m-%d')
 
             new_duty_data = DutySchedule(
                 start_time=xlrd.xldate.xldate_as_datetime(start_date+start_time, book.datemode).strftime('%Y-%m-%d %H:%M:%S'), #f'{start_date} {start_time}',
-                end_time=xlrd.xldate.xldate_as_datetime(end_date+end_date, book.datemode).strftime('%Y-%m-%d %H:%M:%S'), #f'{end_date} {end_time}',
+                end_time=xlrd.xldate.xldate_as_datetime(end_date+end_time, book.datemode).strftime('%Y-%m-%d %H:%M:%S'), #f'{end_date} {end_time}',
                 duty_date=start_date1,
                 shift_type=shift_type,
                 duty_unit=duty_unit,