|
|
|
@ -83,14 +83,14 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
$total = CourseSign::whereDate('created_at', '>=', $start_date)
|
|
|
|
$total = CourseSign::whereDate('created_at', '>=', $start_date)
|
|
|
|
->whereDate('created_at', '<=', $end_date)
|
|
|
|
->whereDate('created_at', '<=', $end_date)
|
|
|
|
->whereHas('user', function ($query) use ($area) {
|
|
|
|
->whereHas('user', function ($query) use ($area) {
|
|
|
|
// if (isset($area)) {
|
|
|
|
if (isset($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);
|
|
|
|
@ -113,8 +113,8 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
->whereHas('user', function ($query) use ($area) {
|
|
|
|
->whereHas('user', function ($query) use ($area) {
|
|
|
|
if (isset($area)) {
|
|
|
|
if (isset($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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|