From 7f4eb9daa3ff725940cde4a3fc3e2e38b1baa3b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E5=AE=9D=E4=B9=A6=E8=AE=B0?= Date: Wed, 12 May 2021 21:34:52 +0800 Subject: [PATCH] 0 --- app/chengji/controller/Bjtongji.php | 4 ++-- app/chengji/controller/Njtongji.php | 4 ++-- app/chengji/controller/Schtongji.php | 4 ++-- app/chengji/controller/Tongji.php | 2 +- app/chengji/model/TongjiNj.php | 7 +++---- app/kaoshi/model/Kaoshi.php | 3 +-- 6 files changed, 11 insertions(+), 13 deletions(-) diff --git a/app/chengji/controller/Bjtongji.php b/app/chengji/controller/Bjtongji.php index 534c40b1..4e18b185 100755 --- a/app/chengji/controller/Bjtongji.php +++ b/app/chengji/controller/Bjtongji.php @@ -296,7 +296,7 @@ class Bjtongji extends AdminBase $data = $btj->tjBanji($kaoshi_id); if (true == $data) { - $data = ['msg' => '各班级成绩统计完成', 'val' => 1]; + $data = ['msg' => '完成', 'val' => 1]; $src = [ 'kaoshi_id' => $kaoshi_id, 'category_id' => 12001, @@ -323,7 +323,7 @@ class Bjtongji extends AdminBase $data = $btj->bjOrder($kaoshi_id); if (true == $data) { - $data = ['msg' => '学生成绩在班级位置统计完成。', 'val' => 1]; + $data = ['msg' => '完成', 'val' => 1]; $src = [ 'kaoshi_id' => $kaoshi_id ,'category_id' => 12002 diff --git a/app/chengji/controller/Njtongji.php b/app/chengji/controller/Njtongji.php index 70d2200b..2d34f374 100755 --- a/app/chengji/controller/Njtongji.php +++ b/app/chengji/controller/Njtongji.php @@ -268,7 +268,7 @@ class Njtongji extends AdminBase if (true == $data) { $data = [ - 'msg'=>'各学校年级成绩统计完成' + 'msg'=>'完成' ,'val'=>1 ]; $src = [ @@ -301,7 +301,7 @@ class Njtongji extends AdminBase if (true == $data) { $data = [ - 'msg' => '学生成绩在学校年级位置统计完成。' + 'msg' => '完成' ,'val' => 1 ]; $src = [ diff --git a/app/chengji/controller/Schtongji.php b/app/chengji/controller/Schtongji.php index 19f2ea07..e13b3cd1 100755 --- a/app/chengji/controller/Schtongji.php +++ b/app/chengji/controller/Schtongji.php @@ -21,7 +21,7 @@ class Schtongji extends AdminBase if(true == $data) { - $data=['msg'=>'全区年级统计完成','val'=>1]; + $data=['msg'=>'完成','val'=>1]; $src = [ 'kaoshi_id' => $kaoshi_id, 'category_id' => 12005, @@ -49,7 +49,7 @@ class Schtongji extends AdminBase if(true == $data) { - $data=['msg'=>'学生成绩在全区位置统计完成','val'=>1]; + $data=['msg'=>'完成','val'=>1]; $src = [ 'kaoshi_id' => $kaoshi_id, 'category_id' => 12006, diff --git a/app/chengji/controller/Tongji.php b/app/chengji/controller/Tongji.php index c67cc802..216eafbb 100755 --- a/app/chengji/controller/Tongji.php +++ b/app/chengji/controller/Tongji.php @@ -39,7 +39,7 @@ class Tongji extends AdminBase } } - $data ? $data = ['msg' => '重新计算完成', 'val' => 1] + $data ? $data = ['msg' => '完成', 'val' => 1] : $data = ['msg' => '数据处理错误', 'val' => 0]; // 返回信息 diff --git a/app/chengji/model/TongjiNj.php b/app/chengji/model/TongjiNj.php index 2cb91b9e..62ddd221 100755 --- a/app/chengji/model/TongjiNj.php +++ b/app/chengji/model/TongjiNj.php @@ -116,16 +116,15 @@ class TongjiNj extends BaseModel $src = array_cover($srcfrom, $src); $ruxuenian = $src['ruxuenian']; $school = strToarray($src['school_id']); - $kaoshi = $src['kaoshi_id']; // 查询要统计成绩的学校 $cy = new \app\kaohao\model\SearchCanYu; $schoolList = $cy->school($src); - - if(count($schoolList) == 0){ + $src['school_id'] = array_column($schoolList, 'id'); + if(count($src['school_id']) == 0){ return array(); } - + halt($src); $tongjiJg = $this ->where('kaoshi_id', $src['kaoshi_id']) ->where('ruxuenian', $src['ruxuenian']) diff --git a/app/kaoshi/model/Kaoshi.php b/app/kaoshi/model/Kaoshi.php index 5d01bee6..c2209852 100755 --- a/app/kaoshi/model/Kaoshi.php +++ b/app/kaoshi/model/Kaoshi.php @@ -88,9 +88,8 @@ class Kaoshi extends BaseModel ->field('kaoshi_id') ->select(); $kaoshi_ids = $data->column('kaoshi_id'); - $ids = $this->where('user_id', session('user_id'))->column(['id']); - $kaoshi_ids = array_merge($kaoshi_ids, $ids); + $kaoshi_ids =array_unique(array_merge($kaoshi_ids, $ids)); return $kaoshi_ids; }