|
|
|
@ -9,6 +9,7 @@ use App\Helpers\StarterResponseCode;
|
|
|
|
use App\Models\Course;
|
|
|
|
use App\Models\Course;
|
|
|
|
use App\Models\CourseAppointmentTotal;
|
|
|
|
use App\Models\CourseAppointmentTotal;
|
|
|
|
use App\Models\CourseSign;
|
|
|
|
use App\Models\CourseSign;
|
|
|
|
|
|
|
|
use App\Models\CourseType;
|
|
|
|
use App\Models\CustomForm;
|
|
|
|
use App\Models\CustomForm;
|
|
|
|
use App\Models\CustomFormField;
|
|
|
|
use App\Models\CustomFormField;
|
|
|
|
use App\Models\User;
|
|
|
|
use App\Models\User;
|
|
|
|
@ -371,13 +372,13 @@ class UserController extends BaseController
|
|
|
|
return Excel::download(new CommonExport($list, $all['export_fields'] ?? ''), $all['file_name'] ?? '' . date('YmdHis') . '.xlsx');
|
|
|
|
return Excel::download(new CommonExport($list, $all['export_fields'] ?? ''), $all['file_name'] ?? '' . date('YmdHis') . '.xlsx');
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// 累计总数
|
|
|
|
// 累计总数
|
|
|
|
$total = CourseSign::courseSignsTotalByUnique('2020-01-01', date('Y-m-d'));
|
|
|
|
$total = CourseSign::courseSignsTotalByUnique(CourseType::START_DATE, date('Y-m-d'));
|
|
|
|
// 报名人数
|
|
|
|
// 报名人数
|
|
|
|
$year_total = CourseSign::courseSignsTotalByUnique($start_date, $end_date);
|
|
|
|
$year_total = CourseSign::courseSignsTotalByUnique($start_date, $end_date);
|
|
|
|
// 年度培养学员
|
|
|
|
// 年度培养学员
|
|
|
|
$year_training_total = CourseSign::courseSignsTotalByUnique($start_date, $end_date, 1);
|
|
|
|
$year_training_total = CourseSign::courseSignsTotalByUnique($start_date, $end_date, 1);
|
|
|
|
// 累计培养学员
|
|
|
|
// 累计培养学员
|
|
|
|
$training_total = CourseSign::courseSignsTotalByUnique('2020-01-01', date('Y-m-d'), 1);
|
|
|
|
$training_total = CourseSign::courseSignsTotalByUnique(CourseType::START_DATE, date('Y-m-d'), 1);
|
|
|
|
$list = $list->paginate($all['page_size'] ?? 20);
|
|
|
|
$list = $list->paginate($all['page_size'] ?? 20);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->success(['list' => $list, 'year_total' => $year_total, 'total' => $total, 'year_training_total' => $year_training_total, 'training_total' => $training_total]);
|
|
|
|
return $this->success(['list' => $list, 'year_total' => $year_total, 'total' => $total, 'year_training_total' => $year_training_total, 'training_total' => $training_total]);
|
|
|
|
|