|
|
|
|
@ -185,7 +185,7 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
|
$userIds = self::getStudentList($start_date, $end_date, 1, $course_ids)->get()->pluck('user_id');
|
|
|
|
|
|
|
|
|
|
// 获取这些学员所在的被投企业
|
|
|
|
|
$companies = Company::whereHas('users', function ($query) use ($userIds) {
|
|
|
|
|
$companies = Company::approvedStudents()->whereHas('users', function ($query) use ($userIds) {
|
|
|
|
|
$query->whereIn('id', $userIds);
|
|
|
|
|
})->where('is_yh_invested', 1)->get();
|
|
|
|
|
// 自定义时间:需要按被投时间筛选
|
|
|
|
|
@ -245,7 +245,7 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取这些学员所在的被投企业
|
|
|
|
|
$companies = Company::whereHas('users', function ($query) use ($userIds) {
|
|
|
|
|
$companies = Company::approvedStudents()->whereHas('users', function ($query) use ($userIds) {
|
|
|
|
|
$query->whereIn('id', $userIds);
|
|
|
|
|
})->where('is_yh_invested', 1)->get();
|
|
|
|
|
// 自定义时间:需要按被投时间筛选
|
|
|
|
|
@ -311,7 +311,7 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取这些公司中标记为被投的公司
|
|
|
|
|
$allInvestedCompanies = Company::whereIn('id', $companyIds)
|
|
|
|
|
$allInvestedCompanies = Company::approvedStudents()->whereIn('id', $companyIds)
|
|
|
|
|
->where('is_yh_invested', 1)
|
|
|
|
|
->get();
|
|
|
|
|
|
|
|
|
|
@ -542,7 +542,7 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
|
$courseSignList = self::getStudentList($start_date, $end_date, $status, $course_ids);
|
|
|
|
|
|
|
|
|
|
// 地区
|
|
|
|
|
$suzhouArea = Company::where('company_city', '苏州市')->pluck('company_area')->unique();
|
|
|
|
|
$suzhouArea = Company::approvedStudents()->where('company_city', '苏州市')->pluck('company_area')->unique();
|
|
|
|
|
$list = [];
|
|
|
|
|
foreach ($suzhouArea as $area) {
|
|
|
|
|
$sourseSignList2 = (clone $courseSignList)->whereHas('user', function ($query) use ($area) {
|
|
|
|
|
@ -684,7 +684,7 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
|
{
|
|
|
|
|
$courseSignsQuery = self::getStudentList($start_date, $end_date, 1, $course_ids);
|
|
|
|
|
$courseSignByType = $courseSignsQuery->get();
|
|
|
|
|
$list = Company::whereHas('users', function ($query) use ($courseSignByType) {
|
|
|
|
|
$list = Company::approvedStudents()->whereHas('users', function ($query) use ($courseSignByType) {
|
|
|
|
|
$query->whereIn('id', $courseSignByType->pluck('user_id'));
|
|
|
|
|
})->where('company_tag', 'like', '%' . '高新技术企业' . '%')->get();
|
|
|
|
|
if ($retList) {
|
|
|
|
|
@ -758,7 +758,7 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
|
->toArray();
|
|
|
|
|
|
|
|
|
|
// 获取这些公司中标记为上市的公司
|
|
|
|
|
$companies = Company::whereIn('id', $companyIds)
|
|
|
|
|
$companies = Company::approvedStudents()->whereIn('id', $companyIds)
|
|
|
|
|
->where('company_market', 1)
|
|
|
|
|
->get()
|
|
|
|
|
->keyBy('id');
|
|
|
|
|
|