Browse Source

预报到数据统计各院录取统计错误修复

master
Hjj 2 days ago
parent
commit
6016079a76
  1. 3
      app/Admin/Metrics/Examples/Follow/AllEnrollCollege.php

3
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(); $studentsIds = AdmissionNewStudents::query()->where(["is_new_student" => "1"])->pluck('idCard')->toArray();
$all = UsersMember::query() $all = UsersMember::query()
->whereIn("idcard", $studentsIds) ->whereIn("idcard", $studentsIds)
->where("enroll_status", 1)
->where(function ($query) { ->where(function ($query) {
if (is_array($this->data['secondary_college_id'])) { if (is_array($this->data['secondary_college_id'])) {
$ids = $this->data['secondary_college_id']; $ids = $this->data['secondary_college_id'];
@ -64,7 +65,7 @@ class AllEnrollCollege extends Round
// 女生 // 女生
$girl = $all[2] ?? 0; $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; $girlPercent = $total != 0 ? number_format(($girl / $total) * 100) : 0;
// 卡片内容 // 卡片内容
$this->withContent($total, $man, $girl)->height('220px'); $this->withContent($total, $man, $girl)->height('220px');

Loading…
Cancel
Save