| xqd
@@ -543,7 +543,7 @@ class ApiController extends Controller
|
|
|
'day'=>$scheduleDate
|
|
|
];
|
|
|
|
|
|
-
|
|
|
+ $newBase = $baseData;
|
|
|
|
|
|
if($type == 1){//门诊
|
|
|
$today = SchedulePeriod::where(['docter_id'=>$docter_id,'schedule_date'=>$scheduleDate,'organization_id'=>$org_id])->distinct('organization_id')
|
| xqd
@@ -564,7 +564,6 @@ class ApiController extends Controller
|
|
|
];
|
|
|
} else {
|
|
|
// echo '周几'.$week.' 日期 '.$scheduleDate;
|
|
|
- $newBase =$baseData;
|
|
|
// dump($today);
|
|
|
foreach ($today as $tType => $orginfo){
|
|
|
$orgids = array_column($orginfo,'organization_id');
|
| xqd
@@ -601,8 +600,8 @@ class ApiController extends Controller
|
|
|
foreach ($today as $type => $orginfo){
|
|
|
$orgids = array_column($orginfo,'organization_id');
|
|
|
$idSum = array_sum($orgids);
|
|
|
- if($org_id == $idSum) $baseData[$type]['status'] = true;
|
|
|
- if($org_id != $idSum) $baseData[$type]['status'] = 'other';
|
|
|
+ if($org_id == $idSum) $newBase[$type]['status'] = true;
|
|
|
+ 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();
|