Mike 4 years ago
parent
commit
05325e8948
1 changed files with 4 additions and 2 deletions
  1. 4 2
      app/Community/Controllers/ApiController.php

+ 4 - 2
app/Community/Controllers/ApiController.php

xqd xqd
@@ -573,10 +573,11 @@ class ApiController extends Controller
                     }
 //
                 }
+                //覆盖自定义排班
                 $self = SelfSchedule::where(['docter_id'=>$docter_id,'schedule_date'=>$scheduleDate,'organization_id'=>$org_id])->get(['type'])->GroupBy('type')->toArray();
                 if(!empty($self)){
                     foreach($self as $k=>$sf){
-                        $newBase[$k]['status'] = true;
+                        $newBase[$k-1]['status'] = true;
                     }
                 }
                 $scheduleList[$i-1] = [
@@ -604,10 +605,11 @@ class ApiController extends Controller
                         if($org_id != $idSum) $newBase[$type]['status'] = 'other';
                     }
                 }
+                //覆盖自定义排班
                 $self = SelfSchedule::where(['docter_id'=>$docter_id,'schedule_date'=>$scheduleDate,'organization_id'=>$org_id])->get(['type'])->GroupBy('type')->toArray();
                 if(!empty($self)){
                     foreach($self as $k=>$sf){
-                        $newBase[$k]['status'] = true;
+                        $newBase[$k-1]['status'] = true;
                     }
                 }
                 $scheduleList[$i-1] = [