master
cody 1 week ago
parent 752d8699dd
commit 591d2fb5ba

@ -1138,8 +1138,9 @@ class OtherController extends CommonController
case 'cover_stock_total': case 'cover_stock_total':
// 重点上市公司明细 - 使用模型方法 // 重点上市公司明细 - 使用模型方法
$companies = CourseSign::shangshi($start_date, $end_date, $course_ids, true); $companiesData = CourseSign::shangshi($start_date, $end_date, $course_ids, true);
foreach ($companies as $company) { foreach ($companiesData as $item) {
$company = $item['company'];
$data[] = [ $data[] = [
'company_name' => $company->company_name, 'company_name' => $company->company_name,
'company_legal_representative' => $company->company_legal_representative ?? '', 'company_legal_representative' => $company->company_legal_representative ?? '',

@ -789,7 +789,7 @@ class CourseSign extends SoftDeletesModel
} }
// 转换为数组并返回 // 转换为数组并返回
return collect(array_values($result)); return array_values($result);
} else { } else {
// 返回统计数据 // 返回统计数据
return $companies->count(); return $companies->count();

Loading…
Cancel
Save