master
cody 2 weeks ago
parent 51fae3d762
commit fcf76f98ac

@ -182,8 +182,7 @@ class OtherController extends CommonController
}
// 全国数据
$countryArea = Company::groupBy('company_city')->whereNotNull('company_city')
->get(['company_city']);
$countryArea = Company::groupBy('company_city')->whereNotNull('company_city')->get(['company_city']);
$country = [];
foreach ($countryArea as $item) {
$country[] = [

@ -120,14 +120,14 @@ class CourseSign extends SoftDeletesModel
$query->whereBetween('start_date', [$start_date, $end_date])
->whereBetween('end_date', [$start_date, $end_date]);
})->whereHas('user', function ($query) use ($area) {
if ($area) {
if ($area == '苏州市外') {
$allArea = ParameterDetail::where('parameter_id', 5)->get();
$query->whereNotIn('company_area', $allArea->pluck('value'));
} else {
$query->where('company_area', $area);
}
}
// if ($area) {
// if ($area == '苏州市外') {
// $allArea = ParameterDetail::where('parameter_id', 5)->get();
// $query->whereNotIn('company_area', $allArea->pluck('value'));
// } else {
// $query->where('company_area', $area);
// }
// }
})->where(function ($query) use ($status, $course_ids) {
if (isset($status)) {
$query->where('status', $status);

Loading…
Cancel
Save