From faf909e4d53deb5946a761354352d0c71efa1863 Mon Sep 17 00:00:00 2001 From: cody <648753004@qq.com> Date: Thu, 15 Jan 2026 18:06:23 +0800 Subject: [PATCH] update --- .../Controllers/Admin/OtherController.php | 37 ++++--------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/app/Http/Controllers/Admin/OtherController.php b/app/Http/Controllers/Admin/OtherController.php index 6f50a82..436ef31 100755 --- a/app/Http/Controllers/Admin/OtherController.php +++ b/app/Http/Controllers/Admin/OtherController.php @@ -848,8 +848,7 @@ class OtherController extends CommonController 'course_count' => 0, ]); } else { - // 每个学员一行 - $isFirstRow = true; + // 每个学员一行,每行都显示完整的公司信息 foreach ($users as $user) { $courseSigns = $user->courseSigns ?? collect([]); @@ -866,33 +865,13 @@ class OtherController extends CommonController // 报名课程数 $courseCount = $courseSigns->count(); - if ($isFirstRow) { - // 第一行:显示公司信息 - $data[] = array_merge($companyInfo, [ - 'user_name' => $user->name ?? '', - 'course_names' => $courseNames, - 'course_types' => $courseTypes, - 'course_count' => $courseCount, - ]); - $isFirstRow = false; - } else { - // 后续行:公司信息为空 - $data[] = [ - 'company_name' => '', - 'company_legal_representative' => '', - 'company_date' => '', - 'stock_date' => '', - 'is_after_enrollment' => '', - 'company_address' => '', - 'company_city' => '', - 'company_area' => '', - 'company_tag' => '', - 'user_name' => $user->name ?? '', - 'course_names' => $courseNames, - 'course_types' => $courseTypes, - 'course_count' => $courseCount, - ]; - } + // 每个学员一行,每行都显示完整的公司信息 + $data[] = array_merge($companyInfo, [ + 'user_name' => $user->name ?? '', + 'course_names' => $courseNames, + 'course_types' => $courseTypes, + 'course_count' => $courseCount, + ]); } } } else {