|
|
|
|
@ -116,7 +116,13 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
|
// 开始结束日期的筛选。or查询
|
|
|
|
|
$query->whereBetween('start_time', [$start_date, $end_date])
|
|
|
|
|
->orWhereBetween('end_time', [$start_date, $end_date]);
|
|
|
|
|
})->where('type', request('course_type_id', 0))->sum('course_type_signs_pass');
|
|
|
|
|
})->where(function ($query) {
|
|
|
|
|
$course_type_id = request('course_type_id', '');
|
|
|
|
|
$course_type_id = explode(',', $course_type_id);
|
|
|
|
|
if ($course_type_id) {
|
|
|
|
|
$query->whereIn('type', $course_type_id);
|
|
|
|
|
}
|
|
|
|
|
})->sum('course_type_signs_pass');
|
|
|
|
|
// 返回统计数据
|
|
|
|
|
return $historyTotal + $baseTotal;
|
|
|
|
|
}
|
|
|
|
|
@ -141,7 +147,13 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
|
// 开始结束日期的筛选。or查询
|
|
|
|
|
$query->whereBetween('start_time', [$start_date, $end_date])
|
|
|
|
|
->orWhereBetween('end_time', [$start_date, $end_date]);
|
|
|
|
|
})->where('type', request('course_type_id', 0))->sum('course_type_signs_pass_unique');
|
|
|
|
|
})->where(function ($query) {
|
|
|
|
|
$course_type_id = request('course_type_id', '');
|
|
|
|
|
$course_type_id = explode(',', $course_type_id);
|
|
|
|
|
if ($course_type_id) {
|
|
|
|
|
$query->whereIn('type', $course_type_id);
|
|
|
|
|
}
|
|
|
|
|
})->sum('course_type_signs_pass_unique');
|
|
|
|
|
// 统计数据
|
|
|
|
|
return $baseTotal + $historyTotal;
|
|
|
|
|
}
|
|
|
|
|
|