|
|
|
|
@ -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);
|
|
|
|
|
|