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

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

xqd xqd
@@ -547,9 +547,9 @@ class ApiController extends Controller
 
 
                 if($type == 1){//门诊
-                    $today = SchedulePeriod::where(['docter_id'=>$docter_id,'schedule_date'=>$scheduleDate])->where('organization_id','=',$org_id)->distinct('organization_id')
+                    $today = SchedulePeriod::where(['docter_id'=>$docter_id,'schedule_date'=>$scheduleDate,'organization_id','=',$org_id])->distinct('organization_id')
                         ->distinct('type')->get(['organization_id','type'])->GroupBy('type')->toArray();
-                    $self = SelfSchedule::where(['schedule_date'=>$scheduleDate,'docter_id'=>$docter_id,'organization_id'=>$org_id])
+                    $self = SelfSchedule::where(['docter_id'=>$docter_id,'schedule_date'=>$scheduleDate,'organization_id','=',$org_id])
                         ->pluck('type','organization_id')->toArray();
 //                    //检查排班详情
 //                    self::checkDaySchedule($date,$type,$docter_id,$org_id);
@@ -579,6 +579,7 @@ class ApiController extends Controller
                                     if($org != $org_id) $newBase[$tType-1]['status'] = 'other';
                             }
                         }
+//
 //                        dump($newBase);
                         $scheduleList[] = [
                             'schedulelingList'=>$newBase,