| xqd
@@ -574,12 +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])->get(['type']->GroupBy('type')->toArray();
|
|
|
- if(!empty($self)){
|
|
|
- foreach($self as $sf){
|
|
|
- $newBase[$sf['type']]['status'] = true;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
//
|
|
|
// dump($newBase);
|
|
|
$scheduleList[] = [
|
| xqd
@@ -589,6 +584,12 @@ class ApiController extends Controller
|
|
|
'day'=>$scheduleDate
|
|
|
];
|
|
|
}
|
|
|
+ $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 $sf){
|
|
|
+ $newBase[$sf['type']]['status'] = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
$today = SchedulePeriod::where(['docter_id'=>$docter_id,'schedule_date'=>$scheduleDate])->where('organization_id','!=',0)->distinct('organization_id')
|
|
|
->distinct('type')->get(['organization_id','type'])->GroupBy('type')->toArray();
|
| xqd
@@ -614,6 +615,12 @@ class ApiController extends Controller
|
|
|
'day'=>$scheduleDate
|
|
|
];
|
|
|
}
|
|
|
+ $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 $sf){
|
|
|
+ $newBase[$sf['type']]['status'] = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//// if(empty( $schedule_data[$scheduleDate])) continue;
|