diff --git a/app/Admin/Metrics/Examples/Follow/AllEnrollCollege.php b/app/Admin/Metrics/Examples/Follow/AllEnrollCollege.php index 88c7cc6..1d1246a 100644 --- a/app/Admin/Metrics/Examples/Follow/AllEnrollCollege.php +++ b/app/Admin/Metrics/Examples/Follow/AllEnrollCollege.php @@ -42,6 +42,7 @@ class AllEnrollCollege extends Round $studentsIds = AdmissionNewStudents::query()->where(["is_new_student" => "1"])->pluck('idCard')->toArray(); $all = UsersMember::query() ->whereIn("idcard", $studentsIds) + ->where("enroll_status", 1) ->where(function ($query) { if (is_array($this->data['secondary_college_id'])) { $ids = $this->data['secondary_college_id']; @@ -64,7 +65,7 @@ class AllEnrollCollege extends Round // 女生 $girl = $all[2] ?? 0; - $manPercent = $total != 0 ? number_format(($man /$total) * 100) : 0; + $manPercent = $total != 0 ? number_format(($man / $total) * 100) : 0; $girlPercent = $total != 0 ? number_format(($girl / $total) * 100) : 0; // 卡片内容 $this->withContent($total, $man, $girl)->height('220px');