| xqd
@@ -572,12 +572,12 @@ class ApiController extends Controller
|
|
|
$idSum = array_sum($orgids);
|
|
|
if($org_id == $idSum) $newBase[$tType-1]['status'] = true;
|
|
|
if($org_id != $idSum) $newBase[$tType-1]['status'] = 'other';
|
|
|
+ }
|
|
|
|
|
|
- $self = SelfSchedule::where(['docter_id'=>$docter_id,'schedule_date'=>$scheduleDate,'organization_id'=>$org_id,'type'=>$tType])->first();
|
|
|
- if(!empty($self))
|
|
|
- foreach($self as $key=>$org){
|
|
|
- $newBase[$tType-1]['status'] = true;
|
|
|
- if($org != $org_id) $newBase[$tType-1]['status'] = 'other';
|
|
|
+ $self = SelfSchedule::where(['docter_id'=>$docter_id,'schedule_date'=>$scheduleDate,'organization_id'=>$org_id])->first();
|
|
|
+ if(!empty($self)){
|
|
|
+ foreach($self as $sf){
|
|
|
+ $newBase[$sf['type']]['status'] = true;
|
|
|
}
|
|
|
}
|
|
|
//
|