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

+ 1 - 1
app/Community/Controllers/ApiController.php

xqd
@@ -574,7 +574,7 @@ class ApiController extends Controller
                             if($org_id != $idSum) $newBase[$tType-1]['status'] = 'other';
                         }
 
-                        $self = SelfSchedule::where(['docter_id'=>$docter_id,'schedule_date'=>$scheduleDate,'organization_id'=>$org_id])->first();
+                        $self = SelfSchedule::where(['docter_id'=>$docter_id,'schedule_date'=>$scheduleDate,'organization_id'=>$org_id])->GroupBy('type')->toArray();
                         if(!empty($self)){
                             foreach($self as $sf){
                                 $newBase[$sf['type']]['status'] = true;