From 3b1190d4548d38635c3cbfc8b330547d9658583e Mon Sep 17 00:00:00 2001 From: cody <648753004@qq.com> Date: Sat, 29 Nov 2025 12:12:15 +0800 Subject: [PATCH] update --- app/Http/Controllers/Admin/OtherController.php | 6 ++++-- app/Models/CourseSign.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Admin/OtherController.php b/app/Http/Controllers/Admin/OtherController.php index ba42a4d..298cc02 100755 --- a/app/Http/Controllers/Admin/OtherController.php +++ b/app/Http/Controllers/Admin/OtherController.php @@ -127,7 +127,7 @@ class OtherController extends CommonController // 今年新增校友数 $list['schoolmate_year'] = User::where('is_schoolmate', 1)->where('created_at', 'like', '%' . date('Y') . '%')->count(); // 投后企业 - $list['company_invested_total'] = CourseSign::yhInvested(); + $list['company_invested_total'] = CourseSign::yhInvestedTotal(); // 元和员工参与人数 $list['company_join_total'] = CourseSign::companyJoin(); // 全市干部参与企业 @@ -142,7 +142,7 @@ class OtherController extends CommonController $list['cover_stock_total'] = CourseSign::shangshi(); // 本月课程 $monthCourses = Calendar::with('course.teacher') - ->where('date', 'like', '%' . date('Y-m') . '%') + ->where('start_time', 'like', '%' . date('Y-m') . '%') ->get(); // 课程统计 $courseTypes = CourseType::where('is_chart', 1)->get(); @@ -156,6 +156,8 @@ class OtherController extends CommonController // 培养人数去重 $courseType->course_signs_total = CourseSign::courseSignsTotalByUnique($start_date, $end_date, 1, $courses->pluck('id'), null); } + + // 苏州区域数据 $suzhouArea = Company::where('company_city', '苏州市')->groupBy('company_area') ->whereNotNull('company_area') diff --git a/app/Models/CourseSign.php b/app/Models/CourseSign.php index 2683f4f..607ad6a 100755 --- a/app/Models/CourseSign.php +++ b/app/Models/CourseSign.php @@ -176,7 +176,7 @@ class CourseSign extends SoftDeletesModel * @param array|null $course_ids 课程ID(仅在自定义时间时生效) * @param bool $retList 是否返回列表 */ - public static function yhInvestedTotal($start_date = null, $end_date = null, $course_ids, $retList = false) + public static function yhInvestedTotal($start_date = null, $end_date = null, $course_ids = null, $retList = false) { // 默认时间:获取所有学员,不限制课程 $userIds = self::getStudentList($start_date, $end_date, 1, $course_ids)->get()->pluck('user_id');