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){