diff --git a/app/Http/Controllers/Admin/OtherController.php b/app/Http/Controllers/Admin/OtherController.php index 69d28fd..8e9f645 100755 --- a/app/Http/Controllers/Admin/OtherController.php +++ b/app/Http/Controllers/Admin/OtherController.php @@ -134,6 +134,7 @@ class OtherController extends CommonController // ->where('start_date', '<=', $end_date) // ->where('start_date', '>=', $start_date) ->get(); + dump($courses->toArray()); // 被投企业数 $list['course_signs_invested'] = CourseSign::yhInvested($start_date, $end_date); // 报名人数 @@ -160,6 +161,7 @@ class OtherController extends CommonController // ->where('start_date', '<=', $end_date) // ->where('start_date', '>=', $start_date) ->get(); + dump($courses2->toArray()); foreach ($courses2 as $course) { $courseTypesSum[] = [ 'course_type' => $courseType->name, diff --git a/app/Models/CourseSign.php b/app/Models/CourseSign.php index 001fc5e..24caf16 100755 --- a/app/Models/CourseSign.php +++ b/app/Models/CourseSign.php @@ -110,14 +110,14 @@ class CourseSign extends SoftDeletesModel $courseSignByType = CourseSign::whereDate('created_at', '>=', $start_date) ->whereDate('created_at', '<=', $end_date) ->whereHas('user', function ($query) use ($area) { - if (isset($area)) { - if ($area == '苏州市外') { - $allArea = ParameterDetail::where('parameter_id', 5)->get(); - $query->whereNotIn('company_area', $allArea->pluck('value')); - } else { - $query->where('company_area', $area); - } - } +// if (isset($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);