|
|
|
@ -140,6 +140,12 @@ class OtherController extends CommonController
|
|
|
|
$list['cover_rencai_total'] = CourseSign::rencai();
|
|
|
|
$list['cover_rencai_total'] = CourseSign::rencai();
|
|
|
|
// 重点上市公司
|
|
|
|
// 重点上市公司
|
|
|
|
$list['cover_stock_total'] = CourseSign::shangshi();
|
|
|
|
$list['cover_stock_total'] = CourseSign::shangshi();
|
|
|
|
|
|
|
|
// 培养人次
|
|
|
|
|
|
|
|
$list['course_signs_pass'] = CourseSign::courseSignsTotal(null, null, 1);
|
|
|
|
|
|
|
|
// 培养人数
|
|
|
|
|
|
|
|
$list['course_signs_pass_unique'] = CourseSign::courseSignsTotalByUnique(null, null, 1, null, null);
|
|
|
|
|
|
|
|
// 跟班学员数
|
|
|
|
|
|
|
|
$list['genban_total'] = CourseSign::genban();
|
|
|
|
// 本月课程
|
|
|
|
// 本月课程
|
|
|
|
$monthCourses = Calendar::with('course.teacher')
|
|
|
|
$monthCourses = Calendar::with('course.teacher')
|
|
|
|
->where('start_time', 'like', '%' . date('Y-m') . '%')
|
|
|
|
->where('start_time', 'like', '%' . date('Y-m') . '%')
|
|
|
|
@ -159,11 +165,11 @@ class OtherController extends CommonController
|
|
|
|
$query->where('name', 'like', '%' . $courseType->name . '%');
|
|
|
|
$query->where('name', 'like', '%' . $courseType->name . '%');
|
|
|
|
})->get();
|
|
|
|
})->get();
|
|
|
|
// 课程
|
|
|
|
// 课程
|
|
|
|
$courses = Course::where('type', $courseType->id)->get();
|
|
|
|
$courses = Course::where('type', $courseType->id)->where('is_chart', 1)->get();
|
|
|
|
// 历史课程期数
|
|
|
|
// 历史课程期数
|
|
|
|
$courseType->history_course_periods_total = $historyCourse->count();
|
|
|
|
$courseType->history_course_periods_total = $historyCourse->count();
|
|
|
|
// 现在课程数据
|
|
|
|
// 现在课程数据
|
|
|
|
$courseType->now_course_periods_total = Course::where('type', $courseType->id)->count();
|
|
|
|
$courseType->now_course_periods_total = Course::where('type', $courseType->id)->where('is_chart', 1)->count();
|
|
|
|
|
|
|
|
|
|
|
|
// 历史课程培养人数去重
|
|
|
|
// 历史课程培养人数去重
|
|
|
|
$courseType->history_course_signs_total = $historyCourse->sum('course_type_signs_pass_unique');
|
|
|
|
$courseType->history_course_signs_total = $historyCourse->sum('course_type_signs_pass_unique');
|
|
|
|
@ -301,7 +307,7 @@ class OtherController extends CommonController
|
|
|
|
$query->whereBetween('start_date', [$start_date, $end_date])
|
|
|
|
$query->whereBetween('start_date', [$start_date, $end_date])
|
|
|
|
->orWhereBetween('end_date', [$start_date, $end_date]);
|
|
|
|
->orWhereBetween('end_date', [$start_date, $end_date]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})->orderBy('start_date', 'asc')->get();
|
|
|
|
})->where('is_chart', 1)->orderBy('start_date', 'asc')->get();
|
|
|
|
foreach ($courses2 as $course) {
|
|
|
|
foreach ($courses2 as $course) {
|
|
|
|
$courseTypesSum[] = [
|
|
|
|
$courseTypesSum[] = [
|
|
|
|
'course_type' => $courseType->name,
|
|
|
|
'course_type' => $courseType->name,
|
|
|
|
@ -461,8 +467,9 @@ class OtherController extends CommonController
|
|
|
|
$data[] = [
|
|
|
|
$data[] = [
|
|
|
|
'user_name' => $sign->user->name ?? '',
|
|
|
|
'user_name' => $sign->user->name ?? '',
|
|
|
|
'mobile' => $sign->user->mobile ?? '',
|
|
|
|
'mobile' => $sign->user->mobile ?? '',
|
|
|
|
'company_name' => $sign->user->company_name ?? '',
|
|
|
|
'company_name' => $sign->user->company->company_name ?? '',
|
|
|
|
'company_area' => $sign->user->company_area ?? '',
|
|
|
|
'company_area' => $sign->user->company->company_area ?? '',
|
|
|
|
|
|
|
|
'company_industry' => $sign->user->company->company_industry ?? '',
|
|
|
|
'course_name' => $sign->course->name ?? '',
|
|
|
|
'course_name' => $sign->course->name ?? '',
|
|
|
|
'course_type' => $sign->course->typeDetail->name ?? '',
|
|
|
|
'course_type' => $sign->course->typeDetail->name ?? '',
|
|
|
|
// 'created_at' => $sign->created_at ? $sign->created_at->format('Y-m-d H:i:s') : '',
|
|
|
|
// 'created_at' => $sign->created_at ? $sign->created_at->format('Y-m-d H:i:s') : '',
|
|
|
|
@ -503,9 +510,9 @@ class OtherController extends CommonController
|
|
|
|
$data[] = [
|
|
|
|
$data[] = [
|
|
|
|
'user_name' => $user->name ?? '',
|
|
|
|
'user_name' => $user->name ?? '',
|
|
|
|
'mobile' => $user->mobile ?? '',
|
|
|
|
'mobile' => $user->mobile ?? '',
|
|
|
|
'company_name' => $user->company_name ?? '',
|
|
|
|
'company_name' => $user->company->company_name ?? '',
|
|
|
|
'company_area' => $user->company_area ?? '',
|
|
|
|
'company_area' => $user->company->company_area ?? '',
|
|
|
|
'company_industry' => $user->company_industry ?? '',
|
|
|
|
'company_industry' => $user->company->company_industry ?? '',
|
|
|
|
'course_names' => $courseNames,
|
|
|
|
'course_names' => $courseNames,
|
|
|
|
'course_count' => $userCourseSigns->count(),
|
|
|
|
'course_count' => $userCourseSigns->count(),
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|