From 257f06104fe4d90dfff963d8cbec73e53c943a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E5=AE=9D=E4=B9=A6=E8=AE=B0?= Date: Thu, 27 May 2021 20:21:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=86=E6=95=B0=E6=AE=B5?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chengji/controller/Bjtongji.php | 3 +++ app/chengji/model/TongjiBj.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/chengji/controller/Bjtongji.php b/app/chengji/controller/Bjtongji.php index 05e43e1e..83a32d6e 100755 --- a/app/chengji/controller/Bjtongji.php +++ b/app/chengji/controller/Bjtongji.php @@ -423,6 +423,9 @@ class Bjtongji extends AdminBase $src['banji_id']= array_column($cy->class($src), 'id'); } + $src['auth'] = event('mybanji', array()); + $src['auth'] = $src['auth'][0]; + // 统计成绩 $btj = new BTJ; $fsd = $btj->tjBanjiFenshuduan($src); diff --git a/app/chengji/model/TongjiBj.php b/app/chengji/model/TongjiBj.php index c8b696bb..368d1b59 100755 --- a/app/chengji/model/TongjiBj.php +++ b/app/chengji/model/TongjiBj.php @@ -205,7 +205,8 @@ class TongjiBj extends BaseModel // 获取并统计各班级成绩 $data = array(); $cj = $more->srcChengjiList($src); - if (array_key_exists($lieming . 'defen', $cj[0])) + + if (isset($cj[0]) && array_key_exists($lieming . 'defen', $cj[0])) { $cjcol = array_column($cj, $lieming . 'defen'); $cjcol = array_filter($cjcol, function($item){