|
|
|
@ -317,18 +317,21 @@ class OtherController extends CommonController
|
|
|
|
$query->whereIn('type', $course_type_id);
|
|
|
|
$query->whereIn('type', $course_type_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})->get();
|
|
|
|
})->get();
|
|
|
|
foreach ($historyCourses as $historyCourse) {
|
|
|
|
$historyCoursesType = CourseType::whereIn('id', $historyCourses->pluck('type'))->get();
|
|
|
|
$courseTypesSum[] = [
|
|
|
|
foreach ($historyCoursesType as $historyCourseType) {
|
|
|
|
'course_type' => $historyCourse->typeDetail->name,
|
|
|
|
$historyCourses = $historyCourses->where('type', $historyCourseType->id);
|
|
|
|
// 培养人数
|
|
|
|
foreach ($historyCourses as $historyCourse) {
|
|
|
|
'course_type_signs_pass' => $historyCourses->sum('course_type_signs_pass'),
|
|
|
|
$courseTypesSum[] = [
|
|
|
|
// 去重培养人数
|
|
|
|
'course_type' => $historyCourseType->name,
|
|
|
|
'course_type_signs_pass_unique' => $historyCourses->sum('course_type_signs_pass_unique'),
|
|
|
|
// 培养人数
|
|
|
|
'course_name' => $historyCourse->course_name,
|
|
|
|
'course_type_signs_pass' => $historyCourses->sum('course_type_signs_pass'),
|
|
|
|
'course_signs_pass' => $historyCourse->course_signs_pass,
|
|
|
|
// 去重培养人数
|
|
|
|
];
|
|
|
|
'course_type_signs_pass_unique' => $historyCourses->sum('course_type_signs_pass_unique'),
|
|
|
|
|
|
|
|
'course_name' => $historyCourse->course_name,
|
|
|
|
|
|
|
|
'course_signs_pass' => $historyCourse->course_signs_pass,
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 区域明细统计
|
|
|
|
// 区域明细统计
|
|
|
|
$areas = CourseSign::area($start_date, $end_date, 1, $courses->pluck('id'), true);
|
|
|
|
$areas = CourseSign::area($start_date, $end_date, 1, $courses->pluck('id'), true);
|
|
|
|
return $this->success(compact('list', 'courseTypesSum', 'areas'));
|
|
|
|
return $this->success(compact('list', 'courseTypesSum', 'areas'));
|
|
|
|
|