11
main
yanzai 2 years ago
parent d296cee1bb
commit 3443a56be0

@ -202,7 +202,11 @@ class AppointmentController extends Controller
if (count($appointments_to_delete)) {
return Yo::error_echo(200023);
}
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['del' => 1]);
if(Login::$info->id==1){
Appointment::whereIn('id', $ids)->update(['del' => 1]);
}else{
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['del' => 1]);
}
return Yo::delete_echo($ids);
}
@ -211,7 +215,11 @@ class AppointmentController extends Controller
Login::admin([], [15, 27]);
$ids = $request->post('ids');
$status = $request->post('status');
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['status' => $status]);
if(Login::$info->id==1){
Appointment::whereIn('id', $ids)->update(['status' => $status]);
}else{
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['status' => $status]);
}
return Yo::update_echo($ids);
}
@ -220,7 +228,11 @@ class AppointmentController extends Controller
Login::admin([], [15, 27]);
$ids = $request->post('ids');
$count = $request->post('count');
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['max_count' => $count]);
if(Login::$info->id==1){
Appointment::whereIn('id', $ids)->update(['max_count' => $count]);
}else{
Appointment::whereIn('id', $ids)->where('hospital', Login::$info->hospital)->update(['max_count' => $count]);
}
return Yo::update_echo($ids);
}

Loading…
Cancel
Save