Ver Fonte

修改修改设置排班改变的问题

刘远航 há 4 anos atrás
pai
commit
2056dd0328
1 ficheiros alterados com 1 adições e 2 exclusões
  1. 1 2
      app/Http/Controllers/Api/V2/DoctorController.php

+ 1 - 2
app/Http/Controllers/Api/V2/DoctorController.php

xqd xqd
@@ -701,7 +701,7 @@ class DoctorController extends AuthController
                         $wheres['schedule_type'] = 1;
                         $wheres[] = ['schedule_date','>=',date('Y-m-d',time())];
                         $list = SchedulePeriod::where($wheres)->whereIn('organization_id', $flag)->orderBy('schedule_date','asc')->get();
-                        SchedulePeriod::where($wheres)->delete();
+                        SchedulePeriod::where($wheres)->whereIn('organization_id', $flag)->delete();
                         if ($list) {
                             $list = $list->toArray();
                             $selfList = [];
@@ -792,7 +792,6 @@ class DoctorController extends AuthController
         return out();
     }
 
-
     /**
      * 计算24小时的时间区间段
      * @param $minute 分钟比如:15