master
cody 4 weeks ago
parent 8deb72ff06
commit 57c3f3a3de

@ -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,

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

Loading…
Cancel
Save