|
|
|
@ -110,7 +110,7 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
// 基础数据
|
|
|
|
// 基础数据
|
|
|
|
$baseTotal = $totalQuery->count();
|
|
|
|
$baseTotal = $totalQuery->count();
|
|
|
|
// 历史数据
|
|
|
|
// 历史数据
|
|
|
|
$historyTotal = HistoryCourse::where('calendar', function ($query) {
|
|
|
|
$historyTotal = HistoryCourse::whereHas('calendar', function ($query) {
|
|
|
|
$query->where('is_count_people', 1);
|
|
|
|
$query->where('is_count_people', 1);
|
|
|
|
})->where(function ($query) use ($start_date, $end_date) {
|
|
|
|
})->where(function ($query) use ($start_date, $end_date) {
|
|
|
|
// 开始结束日期的筛选。or查询
|
|
|
|
// 开始结束日期的筛选。or查询
|
|
|
|
@ -135,7 +135,7 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$baseTotal = $user->count();
|
|
|
|
$baseTotal = $user->count();
|
|
|
|
// 历史数据
|
|
|
|
// 历史数据
|
|
|
|
$historyTotal = HistoryCourse::where('calendar', function ($query) {
|
|
|
|
$historyTotal = HistoryCourse::whereHas('calendar', function ($query) {
|
|
|
|
$query->where('is_count_people', 1);
|
|
|
|
$query->where('is_count_people', 1);
|
|
|
|
})->where(function ($query) use ($start_date, $end_date) {
|
|
|
|
})->where(function ($query) use ($start_date, $end_date) {
|
|
|
|
// 开始结束日期的筛选。or查询
|
|
|
|
// 开始结束日期的筛选。or查询
|
|
|
|
|