|
|
|
@ -222,7 +222,7 @@ class OtherController extends CommonController
|
|
|
|
$course_type_id = $params['course_type_id'];
|
|
|
|
$course_type_id = $params['course_type_id'];
|
|
|
|
$courses = $params['courses'];
|
|
|
|
$courses = $params['courses'];
|
|
|
|
// 被投企业数
|
|
|
|
// 被投企业数
|
|
|
|
$list['course_signs_invested'] = CourseSign::yhInvested($start_date, $end_date);
|
|
|
|
$list['course_signs_invested'] = CourseSign::yhInvested($start_date, $end_date, $courses->pluck('id')->toArray());
|
|
|
|
// 报名人数
|
|
|
|
// 报名人数
|
|
|
|
$list['course_signs_total'] = CourseSign::courseSignsTotal($start_date, $end_date, null, $courses->pluck('id'));
|
|
|
|
$list['course_signs_total'] = CourseSign::courseSignsTotal($start_date, $end_date, null, $courses->pluck('id'));
|
|
|
|
// 审核通过人数
|
|
|
|
// 审核通过人数
|
|
|
|
@ -292,6 +292,12 @@ class OtherController extends CommonController
|
|
|
|
'course_type_signs_pass_unique' => CourseSign::courseSignsTotalByUnique($start_date, $end_date, 1, $courses2->pluck('id'), null),
|
|
|
|
'course_type_signs_pass_unique' => CourseSign::courseSignsTotalByUnique($start_date, $end_date, 1, $courses2->pluck('id'), null),
|
|
|
|
'course_name' => $course->name,
|
|
|
|
'course_name' => $course->name,
|
|
|
|
'course_signs_pass' => CourseSign::courseSignsTotal($start_date, $end_date, 1, [$course->id]),
|
|
|
|
'course_signs_pass' => CourseSign::courseSignsTotal($start_date, $end_date, 1, [$course->id]),
|
|
|
|
|
|
|
|
// 跟班学员数量
|
|
|
|
|
|
|
|
'genban_total' => CourseSign::genban($start_date, $end_date, [$course->id]),
|
|
|
|
|
|
|
|
// 被投企业数
|
|
|
|
|
|
|
|
'yh_invested_total' => CourseSign::yhInvested($start_date, $end_date, [$course->id]),
|
|
|
|
|
|
|
|
// 元禾同事数
|
|
|
|
|
|
|
|
'company_join_total' => CourseSign::companyJoin($start_date, $end_date, [$course->id]),
|
|
|
|
];
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -359,7 +365,7 @@ class OtherController extends CommonController
|
|
|
|
switch ($export_type) {
|
|
|
|
switch ($export_type) {
|
|
|
|
case 'course_signs_invested':
|
|
|
|
case 'course_signs_invested':
|
|
|
|
// 被投企业明细 - 使用与coursesHome相同的算法
|
|
|
|
// 被投企业明细 - 使用与coursesHome相同的算法
|
|
|
|
$companies = CourseSign::yhInvested($start_date, $end_date, true);
|
|
|
|
$companies = CourseSign::yhInvested($start_date, $end_date, $course_ids, true);
|
|
|
|
foreach ($companies as $company) {
|
|
|
|
foreach ($companies as $company) {
|
|
|
|
$data[] = [
|
|
|
|
$data[] = [
|
|
|
|
'company_name' => $company->company_name,
|
|
|
|
'company_name' => $company->company_name,
|
|
|
|
|