master
cody 3 months ago
parent d07801e25f
commit 5e920486cf

@ -746,6 +746,8 @@ class OtherController extends CommonController
'user_name' => '', 'user_name' => '',
'course_name' => '', 'course_name' => '',
'course_type' => '', 'course_type' => '',
'course_types' => '',
'course_count' => 0,
]); ]);
} else { } else {
// 每个学员一行,多个课程合并显示 // 每个学员一行,多个课程合并显示
@ -766,12 +768,25 @@ class OtherController extends CommonController
} }
$courseDisplay = implode("\r\n", $courseList); $courseDisplay = implode("\r\n", $courseList);
// 获取课程体系列表,用中文顿号分隔
$courseTypes = collect($courses)
->pluck('course_type')
->filter()
->unique()
->values()
->implode('、');
// 报名课程数
$courseCount = count($courses);
if ($isFirstRow) { if ($isFirstRow) {
// 第一行:显示公司信息 // 第一行:显示公司信息
$data[] = array_merge($companyInfo, [ $data[] = array_merge($companyInfo, [
'user_name' => $userInfo['user_name'] ?? '', 'user_name' => $userInfo['user_name'] ?? '',
'course_name' => $courseDisplay, 'course_name' => $courseDisplay,
'course_type' => '', // 课程类型已合并到课程名称中 'course_type' => '', // 课程类型已合并到课程名称中
'course_types' => $courseTypes,
'course_count' => $courseCount,
]); ]);
$isFirstRow = false; $isFirstRow = false;
} else { } else {
@ -787,6 +802,8 @@ class OtherController extends CommonController
'company_tag' => '', 'company_tag' => '',
'user_name' => $userInfo['user_name'] ?? '', 'user_name' => $userInfo['user_name'] ?? '',
'course_name' => $courseDisplay, 'course_name' => $courseDisplay,
'course_types' => $courseTypes,
'course_count' => $courseCount,
]; ];
} }
} }
@ -803,6 +820,8 @@ class OtherController extends CommonController
'company_tag' => '企业资质', 'company_tag' => '企业资质',
'user_name' => '学员姓名', 'user_name' => '学员姓名',
'course_name' => '课程信息', 'course_name' => '课程信息',
'course_types' => '课程体系',
'course_count' => '报名课程数',
]; ];
$filename = '上市公司明细'; $filename = '上市公司明细';
break; break;

Loading…
Cancel
Save