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') $countryArea = Company::groupBy('company_city')->whereNotNull('company_city')->get(['company_city']);
->get(['company_city']);
$country = []; $country = [];
foreach ($countryArea as $item) { foreach ($countryArea as $item) {
$country[] = [ $country[] = [

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

Loading…
Cancel
Save