From 5e1331250e491952caf8d5bc0500c4d2659e5c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8B=82=E5=BE=92=E5=BC=A0=E4=B8=89?= Date: Mon, 10 Jan 2022 22:38:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=A1=E9=95=BF=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E6=88=90=E7=BB=A9=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/model/Admin.php | 2 +- app/chengji/controller/Bjtongji.php | 5 +---- app/chengji/model/TongjiBj.php | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/admin/model/Admin.php b/app/admin/model/Admin.php index eeb6c96b..d5cd078d 100755 --- a/app/admin/model/Admin.php +++ b/app/admin/model/Admin.php @@ -513,7 +513,7 @@ class Admin extends BaseModel $adInfo = $this->searchOne(session('user_id')); $banji_id = array(); // 获取职务权限 - $zhiwu_array = array(10703, 10705); + $zhiwu_array = array(10701, 10703, 10705); if (in_array($adInfo->zhiwu_id, $zhiwu_array)) { $bj = new \app\teach\model\Banji; diff --git a/app/chengji/controller/Bjtongji.php b/app/chengji/controller/Bjtongji.php index 439fec59..7be8e8ff 100755 --- a/app/chengji/controller/Bjtongji.php +++ b/app/chengji/controller/Bjtongji.php @@ -62,10 +62,7 @@ class Bjtongji extends AdminBase $src['auth'] = event('mybanji', $src['auth']); $src['auth'] = $src['auth'][0]; - if(count($src['banji_id']) > 0) # 如果没有获取到班级id,则查询班级id - { - $src['auth']['banji_id'] = array_intersect($src['auth']['banji_id'], $src['banji_id']); - } + // 统计成绩 $btj = new BTJ; $data = $btj->search($src); diff --git a/app/chengji/model/TongjiBj.php b/app/chengji/model/TongjiBj.php index 89640d2d..46057464 100755 --- a/app/chengji/model/TongjiBj.php +++ b/app/chengji/model/TongjiBj.php @@ -346,7 +346,7 @@ class TongjiBj extends BaseModel ->where('kaoshi_id', $src['kaoshi_id']) ->where('banji_id', 'in', $src['banji_id']) ->when($src['auth']['check'] != false, function($query) use($src){ - $query->where('id', 'in', $src['auth']['banji_id']); + $query->where('banji_id', 'in', $src['auth']['banji_id']); }) ->when($src['all'] == false, function ($query) use($src) { $query