|
|
|
|
@ -251,6 +251,9 @@ class OtherController extends CommonController
|
|
|
|
|
// 入学后上市公司数量(在指定时间范围内报名的学员所在公司中,在入学后上市的公司数量)
|
|
|
|
|
$list['company_market_after_enrollment_total'] = CourseSign::companyMarketAfterEnrollment($start_date, $end_date, $course_ids);
|
|
|
|
|
|
|
|
|
|
// 入学后被投企业数量(在指定时间范围内报名的学员所在公司中,在入学后被投的公司数量)
|
|
|
|
|
$list['company_invested_after_enrollment_total'] = CourseSign::companyInvestedAfterEnrollment($start_date, $end_date, $course_ids);
|
|
|
|
|
|
|
|
|
|
// 元和员工参与企业
|
|
|
|
|
$list['company_join_total'] = CourseSign::companyJoin($start_date, $end_date, $course_ids);
|
|
|
|
|
// 全市干部参与企业
|
|
|
|
|
@ -310,7 +313,7 @@ class OtherController extends CommonController
|
|
|
|
|
* tags={"其他"},
|
|
|
|
|
* summary="课程统计明细导出",
|
|
|
|
|
* description="导出课程统计数据的明细",
|
|
|
|
|
* @OA\Parameter(name="export_type", in="query", @OA\Schema(type="string"), required=true, description="导出类型:course_signs_invested-被投企业明细, course_signs_total-报名人数明细, course_signs_pass-审核通过人数明细, course_signs_pass_unique-审核通过人数去重明细, courseTypesSum-课程分类明细, areas-区域明细, company_market_total-上市公司明细, ganbu_total-跟班学员明细, company_market_year_total-今年上市公司明细, company_market_after_enrollment_total-入学后上市公司明细, course_total-开课场次明细, course_day_total-开课天数明细, company_join_total-元和员工参与企业明细, company_ganbu_total-全市干部参与企业明细, cover_head_total-苏州头部企业明细, cover_rencai_total-高层次人才明细, cover_stock_total-重点上市公司明细"),
|
|
|
|
|
* @OA\Parameter(name="export_type", in="query", @OA\Schema(type="string"), required=true, description="导出类型:course_signs_invested-被投企业明细, course_signs_total-报名人数明细, course_signs_pass-审核通过人数明细, course_signs_pass_unique-审核通过人数去重明细, courseTypesSum-课程分类明细, areas-区域明细, company_market_total-上市公司明细, ganbu_total-跟班学员明细, company_market_year_total-今年上市公司明细, company_market_after_enrollment_total-入学后上市公司明细, company_invested_after_enrollment_total-入学后被投企业明细, course_total-开课场次明细, course_day_total-开课天数明细, company_join_total-元和员工参与企业明细, company_ganbu_total-全市干部参与企业明细, cover_head_total-苏州头部企业明细, cover_rencai_total-高层次人才明细, cover_stock_total-重点上市公司明细"),
|
|
|
|
|
* @OA\Parameter(name="start_date", in="query", @OA\Schema(type="string"), required=false, description="开始日期"),
|
|
|
|
|
* @OA\Parameter(name="end_date", in="query", @OA\Schema(type="string"), required=false, description="结束日期"),
|
|
|
|
|
* @OA\Parameter(name="course_type_id", in="query", @OA\Schema(type="string"), required=false, description="课程体系id,多个英文逗号"),
|
|
|
|
|
@ -632,6 +635,39 @@ class OtherController extends CommonController
|
|
|
|
|
$filename = '入学后上市公司明细';
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 'company_invested_after_enrollment_total':
|
|
|
|
|
// 入学后被投企业明细 - 使用模型方法
|
|
|
|
|
$companiesAfterEnrollment = CourseSign::companyInvestedAfterEnrollment($start_date, $end_date, $course_ids, true);
|
|
|
|
|
|
|
|
|
|
foreach ($companiesAfterEnrollment as $item) {
|
|
|
|
|
$company = $item['company'];
|
|
|
|
|
$userNames = collect($item['users'])->pluck('name')->filter()->unique()->implode("\n\r");
|
|
|
|
|
$data[] = [
|
|
|
|
|
'company_name' => $company->company_name,
|
|
|
|
|
'company_legal_representative' => $company->company_legal_representative ?? '',
|
|
|
|
|
'company_date' => $company->company_date ?? '',
|
|
|
|
|
'invest_date' => $item['invest_date'] ?? '',
|
|
|
|
|
'first_sign_date' => $item['first_sign_date'],
|
|
|
|
|
'user_names' => $userNames,
|
|
|
|
|
'company_address' => $company->company_address ?? '',
|
|
|
|
|
'company_city' => $company->company_city ?? '',
|
|
|
|
|
'company_area' => $company->company_area ?? '',
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
$fields = [
|
|
|
|
|
'company_name' => '企业名称',
|
|
|
|
|
'company_legal_representative' => '法人',
|
|
|
|
|
'company_date' => '成立时间',
|
|
|
|
|
'invest_date' => '被投日期',
|
|
|
|
|
'first_sign_date' => '首次报名时间',
|
|
|
|
|
'user_names' => '学员姓名',
|
|
|
|
|
'company_address' => '地址',
|
|
|
|
|
'company_city' => '所在城市',
|
|
|
|
|
'company_area' => '所在区域',
|
|
|
|
|
];
|
|
|
|
|
$filename = '入学后被投企业明细';
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 'course_total':
|
|
|
|
|
// 开课场次明细 - 与coursesHome算法一致
|
|
|
|
|
$calendars = Calendar::whereIn('course_id', $course_ids)
|
|
|
|
|
|