|
|
|
|
@ -118,7 +118,7 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
|
// 开始结束日期的筛选。or查询
|
|
|
|
|
$query->whereBetween('start_time', [$start_date, $end_date])
|
|
|
|
|
->orWhereBetween('end_time', [$start_date, $end_date]);
|
|
|
|
|
})->where(function ($query) {
|
|
|
|
|
})->where(function ($query) use ($courseType) {
|
|
|
|
|
$course_type_id = $courseType ?? request('course_type_id');
|
|
|
|
|
if ($course_type_id) {
|
|
|
|
|
$course_type_id = explode(',', $course_type_id);
|
|
|
|
|
@ -143,7 +143,7 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
|
} else {
|
|
|
|
|
$baseTotal = $user->count();
|
|
|
|
|
// 历史数据
|
|
|
|
|
$historyTotal = HistoryCourse::whereHas('calendar', function ($query) {
|
|
|
|
|
$historyTotal = HistoryCourse::whereHas('calendar', function ($query) use ($courseType) {
|
|
|
|
|
$query->where('is_count_people', 1);
|
|
|
|
|
})->whereHas('typeDetail', function ($query) {
|
|
|
|
|
$query->where('is_history', 1);
|
|
|
|
|
@ -151,7 +151,7 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
|
// 开始结束日期的筛选。or查询
|
|
|
|
|
$query->whereBetween('start_time', [$start_date, $end_date])
|
|
|
|
|
->orWhereBetween('end_time', [$start_date, $end_date]);
|
|
|
|
|
})->where(function ($query) {
|
|
|
|
|
})->where(function ($query) use ($courseType) {
|
|
|
|
|
$course_type_id = $courseType ?? request('course_type_id');
|
|
|
|
|
if ($course_type_id) {
|
|
|
|
|
$course_type_id = explode(',', $course_type_id);
|
|
|
|
|
|