From b4e50f17346dcb6f95667c514b287959468ef249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Tue, 7 Apr 2020 15:20:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E8=80=83=E5=8F=B7=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chengji/controller/Bjtongji.php | 2 +- app/chengji/controller/Tongji.php | 72 ++-- app/chengji/model/Chengji.php | 2 +- app/chengji/model/Tongji.php | 43 +- app/chengji/model/TongjiBj.php | 293 +++++++------- app/chengji/route/chengji.php | 20 +- app/chengji/view/tongji/yilu_cnt.html | 31 +- app/kaohao/common.php | 5 + app/kaohao/controller/Index.php | 269 +++++++++++++ app/kaohao/controller/KaohaoExcel.php | 315 +++++++++++++++ app/kaohao/model/Kaohao.php | 126 ++++++ app/kaohao/model/KaohaoSearch.php | 443 +++++++++++++++++++++ app/kaohao/route/kaohao.php | 30 ++ app/kaohao/validate/Kaohao.php | 34 ++ app/kaohao/view/index/create.html | 151 +++++++ app/kaohao/view/index/create_all.html | 74 ++++ app/kaohao/view/index/read.html | 168 ++++++++ app/kaohao/view/kaohao_excel/biaoqian.html | 93 +++++ app/kaoshi/model/Kaohao.php | 140 +++---- app/kaoshi/model/KaoshiSet.php | 1 - app/kaoshi/view/index/more_action.html | 6 +- database/seeds/Rule.php | 6 +- 22 files changed, 1993 insertions(+), 331 deletions(-) create mode 100644 app/kaohao/common.php create mode 100644 app/kaohao/controller/Index.php create mode 100644 app/kaohao/controller/KaohaoExcel.php create mode 100644 app/kaohao/model/Kaohao.php create mode 100644 app/kaohao/model/KaohaoSearch.php create mode 100644 app/kaohao/route/kaohao.php create mode 100644 app/kaohao/validate/Kaohao.php create mode 100644 app/kaohao/view/index/create.html create mode 100644 app/kaohao/view/index/create_all.html create mode 100644 app/kaohao/view/index/read.html create mode 100644 app/kaohao/view/kaohao_excel/biaoqian.html diff --git a/app/chengji/controller/Bjtongji.php b/app/chengji/controller/Bjtongji.php index 1870f112..30c0d3b9 100644 --- a/app/chengji/controller/Bjtongji.php +++ b/app/chengji/controller/Bjtongji.php @@ -54,7 +54,6 @@ class Bjtongji extends BaseController 'banji'=>array(), ],'POST'); - if(count($src['banji'])==0) { // 获取参与考试的班级 @@ -82,6 +81,7 @@ class Bjtongji extends BaseController return json($data); } + // 年级、班级学生成绩统计结果下载界面 public function dwBiaoge($kaoshi) { diff --git a/app/chengji/controller/Tongji.php b/app/chengji/controller/Tongji.php index 3cdd47f8..6ace0ec2 100644 --- a/app/chengji/controller/Tongji.php +++ b/app/chengji/controller/Tongji.php @@ -9,77 +9,62 @@ use app\chengji\model\Tongji as TJ; class Tongji extends BaseController { - // 统计已经录入成绩数量 - public function yiluCnt($kaoshi) + public function yiluCnt($kaoshi_id) { // 获取考试信息 $ks = new \app\kaoshi\model\Kaoshi; - $ksinfo = $ks->where('id',$kaoshi) - ->field('id,title') + $ksinfo = $ks->where('id', $kaoshi_id) + ->field('id, title') ->find(); // 获取参加考试的年级和学科 $ksset = new \app\kaoshi\model\KaoshiSet; - $list['nianji'] = $ksset->srcNianji($kaoshi); - $list['subject'] = $ksset->srcSubject($kaoshi); + $list['nianji'] = $ksset->srcNianji($kaoshi_id); + $list['subject_id'] = $ksset->srcSubject($kaoshi_id); - - // 获取参与班级 - if(count($list['nianji'])>0) + // 获取参与学校 + if(count($list['nianji']) > 0) { - $kh = new \app\kaoshi\model\Kaohao; + $khSrc = new \app\kaohao\model\KaohaoSearch; $src['ruxuenian'] = [$list['nianji'][0]['nianji']]; - $src['kaoshi'] = $kaoshi; - $list['school'] = $kh->cySchool($src); + $src['kaoshi_id'] = $kaoshi_id; + $list['school_id'] = $khSrc->cySchool($src); } // 设置要给模板赋值的信息 $list['webtitle'] = '各年级的班级成绩列表'; - $list['kaoshi'] = $kaoshi; + $list['kaoshi_id'] = $kaoshi_id; $list['kaoshititle'] = $ksinfo->title; $list['dataurl'] = '/chengji/tongji/data'; - - // 模板赋值 - $this->view->assign('list',$list); + $this->view->assign('list', $list); // 渲染模板 return $this->view->fetch(); } - // 获取年级成绩统计结果 + // 获取年级成绩统计结果 public function ajaxData() { // 获取参数 $src = $this->request - ->only([ - 'page'=>'1', - 'limit'=>'10', - 'kaoshi'=>'', - 'ruxuenian'=>'', - 'school'=>array(), - 'banji'=>array(), - ],'POST'); + ->only([ + 'page' => '1' + ,'limit' => '10' + ,'kaoshi_id' => '' + ,'ruxuenian' => '' + ,'school_id' => array() + ,'banji_id' => array() + ,'field' => 'banji_id' + ,'order' => 'asc' + ], 'POST'); // 统计成绩 $btj = new \app\chengji\model\TongjiBj; - $data = $btj->tjBanjiCnt($src); - - // 获取记录总数 - $cnt = count($data); - // 截取当前页数据 - $data = array_slice($data,($src['page']-1)*$src['limit'],$src['limit']); - - // 重组返回内容 - $data = [ - 'code'=> 0 , // ajax请求次数,作为标识符 - 'msg'=>"", // 获取到的结果数(每页显示数量) - 'count'=>$cnt, // 符合条件的总数据量 - 'data'=>$data, //获取到的数据结果 - ]; + $data = reSetArray($data, $src); return json($data); } @@ -89,8 +74,8 @@ class Tongji extends BaseController { // 获取考试信息 $ks = new \app\kaoshi\model\Kaoshi; - $ksinfo = $ks->where('id',$kaoshi_id) - ->field('id,title') + $ksinfo = $ks->where('id', $kaoshi_id) + ->field('id, title') ->find(); // 设置要给模板赋值的信息 @@ -99,9 +84,8 @@ class Tongji extends BaseController $list['kaoshititle'] = $ksinfo->title; $list['dataurl'] = '/chengji/tongji/jgdata'; - // 模板赋值 - $this->view->assign('list',$list); + $this->view->assign('list', $list); // 渲染模板 return $this->view->fetch(); @@ -113,7 +97,7 @@ class Tongji extends BaseController // 获取参数 $src = $this->request ->only([ - 'kaoshi'=>'', + 'kaoshi' => '', ],'POST'); // 实例化考号 diff --git a/app/chengji/model/Chengji.php b/app/chengji/model/Chengji.php index 7f738db8..1d9b9613 100644 --- a/app/chengji/model/Chengji.php +++ b/app/chengji/model/Chengji.php @@ -151,7 +151,7 @@ class Chengji extends BaseModel $kh = new \app\kaoshi\model\Kaohao; // 以考号为基础查询成绩 - $chengjilist = $kh->srcChengji($src); + $chengjilist = $kh->srcChengjiList($src); // 按条件排序 diff --git a/app/chengji/model/Tongji.php b/app/chengji/model/Tongji.php index cd929af4..9a5bee59 100644 --- a/app/chengji/model/Tongji.php +++ b/app/chengji/model/Tongji.php @@ -9,15 +9,14 @@ class Tongji extends BaseModel { // 统计成绩 - public function tongjiCnt($cj=array(),$subject) + public function tongjiCnt($cj = array(), $subject_id) { $data = array(); - // 循环统计各学科成绩 - foreach ($subject as $key => $value) { - $cjcol = array_column($cj,$value['lieming']); + foreach ($subject_id as $key => $value) { + $cjcol = array_column($cj, $value['lieming']); - $cjcol = array_filter($cjcol,function($item){ + $cjcol = array_filter($cjcol, function($item){ return $item != null; }); $temp = array(); @@ -34,32 +33,30 @@ class Tongji extends BaseModel // 统计成绩 - public function tongjiSubject($cj=array(),$subject) + public function tongjiSubject($cj = array(), $subject) { - // 设置默认值 $tempNull = [ - 'xkcnt'=>0, - 'sum'=>null, - 'biaozhuncha'=>null, - 'avg'=>null, - 'youxiu'=>null, - 'jige'=>null, - 'sifenwei'=>[ - '0'=>null, - '1'=>null, - '2'=>null - ], - 'max'=>null, - 'min'=>null, - 'zhongshu'=>null, - 'defenlv'=>null, + 'xkcnt' => 0 + ,'sum' => null + ,'biaozhuncha' => null + ,'avg' => null + ,'youxiu' => null + ,'jige' => null + ,'sifenwei' => [ + '0' => null + ,'1' => null + ,'2' => null + ] + ,'max' => null + ,'min' => null + ,'zhongshu' => null + ,'defenlv' => null ]; $data = array(); $sbjdefencnt = 0; #记录试卷满分 - // 循环统计各学科成绩 foreach ($subject as $key => $value) { $sbjdefencnt = $sbjdefencnt + $value['fenshuxian']['manfen']; diff --git a/app/chengji/model/TongjiBj.php b/app/chengji/model/TongjiBj.php index 5c53dd01..b89104ca 100644 --- a/app/chengji/model/TongjiBj.php +++ b/app/chengji/model/TongjiBj.php @@ -5,8 +5,7 @@ namespace app\chengji\model; use app\BaseModel; // 引用学生成绩统计类 use app\chengji\model\Tongji as TJ; -// 引用学生成绩类 -use app\kaoshi\model\Kaohao; + /** * @mixin think\Model @@ -17,18 +16,18 @@ class TongjiBj extends BaseModel * 统计指定个年级的各班级成绩 * 统计项目参考tongji方法 * @access public - * @param number $kaoshi 考试id + * @param number $kaoshi_id 考试id * @param number $ruxuenian 入学年 * @return array 返回类型 */ - public function tjBanji($kaoshi) + public function tjBanji($kaoshi_id) { - $src = array('kaoshi'=>$kaoshi); + $src = array('kaoshi_id' => $kaoshi_id); // 实例化学生成绩统计类 $tj = new TJ; $kh = new Kaohao; $ksset = new \app\kaoshi\model\KaoshiSet; - $nianji = $ksset->srcNianji($kaoshi); + $nianji = $ksset->srcNianji($kaoshi_id); // 初始化统计结果 $data = array(); @@ -37,26 +36,26 @@ class TongjiBj extends BaseModel // 获取参加考试班级 $src['ruxuenian'] = $value['nianji']; $banji = $kh->cyBanji($src); - $subject = $ksset->srcSubject($kaoshi,'',$value['nianji']); + $subject = $ksset->srcSubject($kaoshi_id, '', $value['nianji']); // 循环班级,获取并统计成绩 foreach ($banji as $bjkey => $val) { $srcfrom = [ - 'kaoshi'=>$kaoshi, - 'banji'=>$val['id'], + 'kaoshi_id'=>$kaoshi_id + ,'banji_id'=>$val['id'] ]; - $temp = $kh->srcChengji($srcfrom); - $temp = $tj->tongjiSubject($temp,$subject); + $temp = $kh->srcChengjiList($srcfrom); + $temp = $tj->tongjiSubject($temp, $subject); // 循环更新或写入成绩 foreach ($temp['cj'] as $cjkey => $cj) { - $tongjiJg = $this->where('kaoshi_id',$src['kaoshi']) - ->where('banji_id',$val['id']) - ->where('subject_id',$cj['id']) - ->find(); + $tongjiJg = $this->where('kaoshi_id', $src['kaoshi']) + ->where('banji_id', $val['id']) + ->where('subject_id', $cj['id']) + ->find(); if($tongjiJg) { - $tongjiJg->kaoshi_id = $src['kaoshi']; + $tongjiJg->kaoshi_id = $src['kaoshi_id']; $tongjiJg->banji_id = $val['id']; $tongjiJg->subject_id = $cj['id']; $tongjiJg->stu_cnt = $cj['stucnt']; @@ -77,23 +76,23 @@ class TongjiBj extends BaseModel }else{ // 重新组合统计结果 $tongjiJg = [ - 'kaoshi_id'=>$src['kaoshi'], - 'banji_id'=>$val['id'], - 'subject_id'=>$cj['id'], - 'stu_cnt'=>$cj['stucnt'], - 'chengji_cnt'=>$cj['xkcnt'], - 'sum'=>$cj['sum'], - 'avg'=>$cj['avg'], - 'biaozhuncha'=>$cj['biaozhuncha'], - 'youxiu'=>$cj['youxiu'], - 'jige'=>$cj['jige'], - 'max'=>$cj['max'], - 'min'=>$cj['min'], - 'q1'=>$cj['sifenwei'][0], - 'q2'=>$cj['sifenwei'][1], - 'q3'=>$cj['sifenwei'][2], - 'zhongshu'=>$cj['zhongshu'], - 'defenlv'=>$cj['defenlv'], + 'kaoshi_id' => $src['kaoshi_id'] + ,'banji_id' => $val['id'] + ,'subject_id' => $cj['id'] + ,'stu_cnt' => $cj['stucnt'] + ,'chengji_cnt' => $cj['xkcnt'] + ,'sum' => $cj['sum'] + ,'avg' => $cj['avg'] + ,'biaozhuncha' => $cj['biaozhuncha'] + ,'youxiu' => $cj['youxiu'] + ,'jige' => $cj['jige'] + ,'max' => $cj['max'] + ,'min' => $cj['min'] + ,'q1' => $cj['sifenwei'][0] + ,'q2' => $cj['sifenwei'][1] + ,'q3' => $cj['sifenwei'][2] + ,'zhongshu' => $cj['zhongshu'] + ,'defenlv' => $cj['defenlv'] ]; $data = $this::create($tongjiJg); } @@ -105,110 +104,97 @@ class TongjiBj extends BaseModel } - - /** + /** * 统计指定个年级的各班级成绩 * 统计项目参考tongji方法 * @access public - * @param number $kaoshi 考试id + * @param number $kaoshi_id 考试id * @param number $ruxuenian 入学年 * @return array 返回类型 */ public function tjBanjiCnt($srcfrom) { - // 初始化参数 $src = array( - 'page'=>'1', - 'limit'=>'10', - 'kaoshi'=>'', - 'ruxuenian'=>'', - 'school'=>'', - 'banji'=>array(), + 'page' => '1' + ,'limit' => '10' + ,'kaoshi_id' => '' + ,'banji_id' => array() + ,'school_id' => array() + ,'ruxuenian' => '' ); - - - // 用新值替换初始值 - $src = array_cover( $srcfrom , $src ) ; + $src = array_cover($srcfrom, $src); + $src['banji_id'] = strToArray($src['banji_id']); + $src['school_id'] = strToArray($src['school_id']); // 实例化学生成绩统计类 $tj = new TJ; - $kh = new Kaohao; - // $cj = new Chengji; + $khSrc = new \app\kaohao\model\KaohaoSearch; $ksset = new \app\kaoshi\model\KaoshiSet; // 获取参加考试学科 - $subject = $ksset->srcSubject($src['kaoshi'],'',$src['ruxuenian']); - $banji =$kh->cyBanji($src); - + $subject = $ksset->srcSubject($src['kaoshi_id'], '', $src['ruxuenian']); + $banji =$khSrc->cyBanji($src); // 获取并统计各班级成绩 $data = array(); - $srcfrom['kaoshi'] = $src['kaoshi']; + $srcfrom['kaoshi_id'] = $src['kaoshi_id']; foreach ($banji as $key => $value) { - $srcfrom['banji'] = $value['id']; - $temp = $kh->srcChengji($srcfrom); - $temp = $tj->tongjiCnt($temp,$subject); + $srcfrom['banji_id'] = $value['id']; + $temp = $khSrc->srcChengjiList($srcfrom); + $temp = $tj->tongjiCnt($temp, $subject); $data[] = [ - 'banji'=>$value['banjiTitle'], - 'banjinum'=>$value['banjiTitle'], - 'school'=>$value['schJiancheng'], - 'chengji'=>$temp + 'banji_id' => $value['banjiTitle'] + ,'banjinum' => $value['banjiTitle'] + ,'school_id' => $value['schJiancheng'] + ,'chengji' => $temp ]; } - - $srcfrom['banji'] = array_column($banji, 'id'); - - // 获取年级成绩 - $temp = $kh->srcChengji($srcfrom); - $temp = $tj->tongjiCnt($temp,$subject); + $srcfrom['banji_id'] = array_column($banji, 'id'); + $temp = $khSrc->srcChengjiList($srcfrom); + $temp = $tj->tongjiCnt($temp, $subject); $data[] = [ - 'banji'=>'合计', - 'banjinum'=>'合计', - 'school'=>'合计', - 'chengji'=>$temp + 'banji_id' => '合计', + 'banjinum' => '合计', + 'school_id' => '合计', + 'chengji' => $temp ]; - return $data; } - - /** * 班级成绩统计结果查询 * 从数据库中取出数据 * @access public - * @param number $kaoshi 考试id + * @param number $kaoshi_id 考试id * @param number $ruxuenian 入学年 * @return array 返回类型 */ public function search($srcfrom) { - // 初始化参数 $src = array( - 'kaoshi'=>'', - 'banji'=>array(), + 'kaoshi' => '' + ,'banji' => array() ); // 用新值替换初始值 - $src = array_cover( $srcfrom , $src ) ; + $src = array_cover($srcfrom, $src); $src['banji'] = strToarray($src['banji']); - if(count($src['banji']) == 0){ return array(); } - $kaoshi = $src['kaoshi']; + $kaoshi_id = $src['kaoshi']; $tongjiJg = $this - ->where('kaoshi_id',$src['kaoshi']) - ->where('banji_id','in',$src['banji']) - ->field('banji_id,kaoshi_id') + ->where('kaoshi_id', $src['kaoshi']) + ->where('banji_id', 'in', $src['banji']) + ->field('banji_id, kaoshi_id') ->with([ 'bjBanji'=>function($query){ $query->field('id,school,paixu') @@ -233,52 +219,50 @@ class TongjiBj extends BaseModel ->append(['banjiTitle']) ->select(); - // 初始化数组 $data = array(); - // 重组数据 foreach ($tongjiJg as $key => $value) { - - $data[$value->banji_id]=[ - 'id'=>$value->id, - 'school'=>$value->bjBanji->glSchool->jiancheng, - 'schoolpaixu'=>$value->bjBanji->glSchool->paixu, - 'title'=>$value->banjiTitle, - 'banjipaixu'=>$value->bjBanji->paixu, - 'stuCnt'=>$value->stuCnt, + $data[$value->banji_id] = [ + 'id' => $value->id + ,'school' => $value->bjBanji->glSchool->jiancheng + ,'schoolpaixu' => $value->bjBanji->glSchool->paixu + ,'title' => $value->banjiTitle + ,'banjipaixu' => $value->bjBanji->paixu + ,'stuCnt' => $value->stuCnt ]; foreach ($value->bjJieguo as $k => $val) { - if($val->subject_id>0){ + if($val->subject_id > 0){ $data[$value->banji_id]['chengji'][$val->bjSubject->lieming] = [ - 'avg'=>$val->avg*1, - 'youxiu'=>$val->youxiu*1, - 'jige'=>$val->jige*1, - 'cjCnt'=>$val->chengji_cnt, - 'title'=>$val->bjSubject->title, - 'jiancheng'=>$val->bjSubject->jiancheng, - 'biaozhuncha'=>$val->biaozhuncha*1, - 'sifenwei'=>[ - 'min'=>$val->min, - 'q1'=>$val->q1*1, - 'q2'=>$val->q2*1, - 'q3'=>$val->q3*1, - 'max'=>$val->max, - ], + 'avg' => $val->avg * 1 + ,'youxiu' => $val->youxiu * 1 + ,'jige' => $val->jige * 1 + ,'cjCnt' => $val->chengji_cnt + ,'title' => $val->bjSubject->title + ,'jiancheng' => $val->bjSubject->jiancheng + ,'biaozhuncha' => $val->biaozhuncha * 1 + ,'sifenwei' => [ + 'min' => $val->min + ,'q1' => $val->q1 * 1 + ,'q2' => $val->q2 * 1 + ,'q3' => $val->q3 * 1 + ,'max' => $val->max + ] ]; }else{ $data[$value->banji_id]['quanke'] = [ - 'avg'=>$val->avg, - 'jige'=>$val->jige, + 'avg' => $val->avg + ,'jige' => $val->jige ]; } } } - - - $data = sortArrByManyField($data,'schoolpaixu',SORT_ASC,'banjipaixu',SORT_ASC); + if(count($data)>0) + { + $data = sortArrByManyField($data, 'schoolpaixu', SORT_ASC, 'banjipaixu', SORT_ASC); + } return $data; } @@ -296,19 +280,15 @@ class TongjiBj extends BaseModel 'xueqi' => '', 'searchval' => '' ); - - // 用新值替换初始值 $src = array_cover( $srcfrom , $src ) ; $src['xueqi'] = strToarray($src['xueqi']); $src['category_id'] = strToarray($src['category_id']); - if(isset($srcfrom['bfdate']) && strlen($srcfrom['bfdate'])>0) { $src['bfdate'] = $srcfrom['bfdate']; }else{ $src['bfdate'] = date("Y-m-d",strtotime("-1 year")); } - if(isset($srcfrom['enddate']) && strlen($srcfrom['enddate'])>0) { $src['enddate'] = $srcfrom['enddate']; @@ -316,72 +296,67 @@ class TongjiBj extends BaseModel $src['enddate'] = date("Y-m-d",strtotime("+1 day")); } - $data = $this - ->where('banji_id',$src['banji']) - ->where('kaoshi_id','in',function($query) use($src){ - $query->name('kaoshi') - ->whereTime('bfdate|enddate','between',[ $src['bfdate'],$src['enddate'] ]) - ->when(count($src['xueqi']) > 0, function($q) use($src){ - $q->where('xueqi', 'in', function($w) use($src){ - $w->name('xueqi') - ->where('category_id', 'in', $src['xueqi']) - ->field('id'); - }); - }) - ->when(count($src['category_id']) > 0, function($q) use($src){ - $q->where('category_id', 'in', $src['category_id']); - }) - ->when(strlen($src['searchval']) > 0, function($q) use($src){ - $q->where('title', 'like', '%'.$src['searchval'].'%'); - }) - ->field('id'); - }) - ->with([ - 'bjKaoshi' => function($query){ - $query->field('id,title,bfdate'); - }, - 'bjSubject' => function($query){ - $query->field('id,title,jiancheng,paixu,lieming'); - }, - 'quJieguo' => function($query){ - $query->field('id,kaoshi_id,subject_id,defenlv'); - } - ]) - ->select(); + ->where('banji_id', $src['banji']) + ->where('kaoshi_id', 'in', function($query) use($src){ + $query->name('kaoshi') + ->whereTime('bfdate|enddate', 'between', [$src['bfdate'], $src['enddate']]) + ->when(count($src['xueqi']) > 0, function($q) use($src){ + $q->where('xueqi', 'in', function($w) use($src){ + $w->name('xueqi') + ->where('category_id', 'in', $src['xueqi']) + ->field('id'); + }); + }) + ->when(count($src['category_id']) > 0, function($q) use($src){ + $q->where('category_id', 'in', $src['category_id']); + }) + ->when(strlen($src['searchval']) > 0, function($q) use($src){ + $q->where('title', 'like', '%'.$src['searchval'].'%'); + }) + ->field('id'); + }) + ->with([ + 'bjKaoshi' => function($query){ + $query->field('id, title, bfdate'); + }, + 'bjSubject' => function($query){ + $query->field('id, title, jiancheng, paixu, lieming'); + }, + 'quJieguo' => function($query){ + $query->field('id, kaoshi_id, subject_id, defenlv'); + } + ]) + ->select(); return $data; } - // 成绩排序 - public function bjOrder($kaoshi) + public function bjOrder($kaoshi_id) { - $src = array('kaoshi'=>$kaoshi); + $src = array('kaoshi' => $kaoshi_id); // 实例化学生成绩统计类 $kh = new Kaohao; $ksset = new \app\kaoshi\model\KaoshiSet; $cj = new \app\chengji\model\Chengji; - $nianji = $ksset->srcNianji($kaoshi); - $col = ['bpaixu','bweizhi']; - + $nianji = $ksset->srcNianji($kaoshi_id); + $col = ['bpaixu', 'bweizhi']; // 初始化统计结果 $data = array(); - - // 循环年级 foreach ($nianji as $njkey => $value) { // 获取参加考试班级 $src['ruxuenian'] = $value['nianji']; $banji = $kh->cyBanji($src); - $subject = $ksset->srcSubject($kaoshi,'',$value['nianji']); + $subject = $ksset->srcSubject($kaoshi_id,'',$value['nianji']); // 循环班级,获取并统计成绩 foreach ($banji as $bjkey => $val) { // 获取成绩 $srcfrom = [ - 'kaoshi'=>$kaoshi, + 'kaoshi'=>$kaoshi_id, 'banji'=>$val['id'], ]; $temp = $kh->srcChengjiSubject($srcfrom); diff --git a/app/chengji/route/chengji.php b/app/chengji/route/chengji.php index e1bbd8a9..4554b51f 100644 --- a/app/chengji/route/chengji.php +++ b/app/chengji/route/chengji.php @@ -13,16 +13,16 @@ use think\facade\Route; // 成绩管理 Route::group('index', function () { - Route::rule('list/','Index/index','get'); # 成绩列表 + Route::rule('list/','Index/index','get'); # 成绩列表 Route::rule('data','Index/ajaxData','post'); # 成绩获取 Route::rule('readcjadd/','Index/readAdd','get'); # 成绩录入列表 Route::rule('dataadd','Index/ajaxaddinfo','post'); # 成绩录入列表数据 Route::rule('delete/','Index/delete','delete'); # 成绩删除 - Route::rule('deletecjs/','Index/deletecjs','get'); # 成绩删除 + Route::rule('deletecjs/','Index/deletecjs','get'); # 成绩删除 Route::rule('deletecjmore','Index/deletecjmore','post'); # 成绩删除 - Route::rule('dwchengji/','Index/dwChengji','get'); # 成绩删除 + Route::rule('dwchengji/','Index/dwChengji','get'); # 成绩删除 Route::rule('dwxlsx','Index/dwchengjixlsx','post'); # 成绩删除 - Route::rule('dwchengjitiao/','Index/dwChengjitiao','get'); # 成绩删除 + Route::rule('dwchengjitiao/','Index/dwChengjitiao','get'); # 成绩删除 Route::rule('dwcjtiaoxlsx','Index/dwchengjitiaoxlsx','post'); # 成绩删除 Route::rule('status','Index/setStatus','post'); # 删除信息 }); @@ -30,16 +30,16 @@ Route::group('index', function () { // 成绩统计 Route::group('tongji', function () { - Route::rule('yilucnt/','Tongji/yiluCnt'); # 更新信息 + Route::rule('yilucnt/','Tongji/yiluCnt'); # 更新信息 Route::rule('data','Tongji/ajaxData','post'); # 扫码界面 }); // 班级统计 Route::group('bjtj', function () { - Route::rule('biaoge/','Bjtongji/biaoge','get'); # 班级表格 + Route::rule('biaoge/','Bjtongji/biaoge','get'); # 班级表格 Route::rule('data','Bjtongji/ajaxData','post'); # 扫码界面 - Route::rule('dwbiaoge/','Bjtongji/dwBiaoge','get'); # 扫码保存 + Route::rule('dwbiaoge/','Bjtongji/dwBiaoge','get'); # 扫码保存 Route::rule('dwxlsx','Bjtongji/dwBanjixls','post'); # 扫码保存 Route::rule('tongji','Bjtongji/tongji','post'); # 统计各班级成绩 Route::rule('myavg','Bjtongji/myAvg','post'); # 扫码界面 @@ -51,9 +51,9 @@ Route::group('bjtj', function () { // 学校年级统计 Route::group('njtj', function () { - Route::rule('biaoge/','Njtongji/biaoge','get'); # 班级表格 + Route::rule('biaoge/','Njtongji/biaoge','get'); # 班级表格 Route::rule('data','Njtongji/ajaxData','post'); # 扫码界面 - Route::rule('dwbiaoge/','Njtongji/dwBiaoge','get'); # 扫码保存 + Route::rule('dwbiaoge/','Njtongji/dwBiaoge','get'); # 扫码保存 Route::rule('dwxlsx','Njtongji/dwNianjixlsx','post'); # 扫码保存 Route::rule('tongji','Njtongji/tongji','post'); # 统计各年级成绩 Route::rule('myavg','Njtongji/myAvg','post'); # 扫码界面 @@ -63,7 +63,7 @@ Route::group('njtj', function () { // 全年级统计 Route::group('schtj', function () { - Route::rule('biaoge/','Schtongji/biaoge','get'); # 班级表格 + Route::rule('biaoge/','Schtongji/biaoge','get'); # 班级表格 Route::rule('data','Schtongji/ajaxData','post'); # 扫码界面 Route::rule('tongji','Schtongji/tongji','post'); # 统计各年级成绩 Route::rule('schorder','Schtongji/schOrder','post'); # 统计各班级成绩 diff --git a/app/chengji/view/tongji/yilu_cnt.html b/app/chengji/view/tongji/yilu_cnt.html index a050042c..8b1a9a90 100644 --- a/app/chengji/view/tongji/yilu_cnt.html +++ b/app/chengji/view/tongji/yilu_cnt.html @@ -14,11 +14,10 @@ {/block} {block name="search"}
- +
- - {foreach $list.school as $key=>$vo} - + {foreach $list.school_id as $key=>$vo} + {/foreach}
@@ -32,11 +31,11 @@
- -
+ +
- + {/block} {block name="table"}
@@ -62,9 +61,9 @@ -{/block} \ No newline at end of file +{/block} diff --git a/app/kaohao/common.php b/app/kaohao/common.php new file mode 100644 index 00000000..0705b1d3 --- /dev/null +++ b/app/kaohao/common.php @@ -0,0 +1,5 @@ +srcNianji($kaoshi_id); + $list['data']['nianjiNum'] = array_column($list['data']['nianji'], 'nianji'); + + // 设置页面标题 + $list['set'] = array( + 'webtitle' => '生成考号' + ,'butname' => '生成' + ,'formpost' => 'POST' + ,'url' => '/kaohao/index/saveall' + ,'kaoshi_id' => $kaoshi_id + ); + + // 模板赋值 + $this->view->assign('list', $list); + // 渲染 + return $this->view->fetch(); + } + + + // 保存考号 + public function saveAll() + { + // 获取表单数据 + $list = request()->only([ + 'school_id' + ,'kaoshi_id' + ,'banji_id' + ], 'POST'); + + event('kslu', $list['kaoshi_id']); + // 验证表单数据 + $validate = new \app\kaoshi\validate\Kaohao; + $result = $validate->check($list); + $msg = $validate->getError(); + if(!$result){ + return ['msg' => $msg, 'val' => 0]; + } + + // 获取参加考试学生名单 + $stu = new \app\renshi\model\Student; + $src = [ + 'banji_id' => $list['banji_id'] + ,'kaoshi' => 1 + ,'status' => 1 + ]; + $stulist = $stu->search($src) + ->visible([ + 'id' + ,'school_id' + ,'banji_id' + ,'stuBanji' => [ + 'id' + ,'ruxuenian' + ,'paixu' + ] + ]); + + // 获取参加考试年级数组 + $bfdate = KS::where('id', $list['kaoshi_id'])->value('bfdate'); + $njlist = nianJiNameList($bfdate); + // 重新组合学生信息 + $kaohao = array(); + foreach ($stulist as $key => $value) { + $check = KH::withTrashed() + ->where('kaoshi_id', $list['kaoshi_id']) + ->where('student_id', $value->id) + ->find(); + if($check) + { + if($check->delete_time > 0) + { + $check->restore(); + } + if($check->status == 0) + { + $check->status = 1; + $check->save(); + } + continue; + } + $kaohao[$key]['student_id'] = $value->id; + $kaohao[$key]['school_id'] = $list['school_id']; + $kaohao[$key]['ruxuenian'] = $value->stuBanji->ruxuenian; + $kaohao[$key]['nianji'] = $njlist[$kaohao[$key]['ruxuenian']]; + $kaohao[$key]['banji_id'] = $value->stuBanji->id; + $kaohao[$key]['paixu'] = $value->stuBanji->paixu; + $kaohao[$key]['kaoshi_id'] = $list['kaoshi_id']; + } + + // 保存考号 + $kh = new KH; + $data = $kh + ->allowField([ # 不是最佳实践 + 'id' + ,'kaoshi_id' + ,'student_id' + ,'school_id' + ,'ruxuenian' + ,'nianji' + ,'banji_id' + ,'paixu' + ,'create_time' + ,'update_time' + ]) + ->saveAll($kaohao); + + // 根据更新结果设置返回提示信息 + $data ? $data = ['msg' => '生成成功', 'val' => 1] + : $data = ['msg' => '数据处理错误', 'val' => 0]; + + // 返回信息 + return json($data); + } + + + // 添加单条考号 + public function create($kaoshi_id) + { + // 获取参考年级、学科 + $ksset = new ksset; + $list['data']['nianji'] = $ksset->srcNianji($kaoshi_id); + $kh = new KH; + $src['kaoshi_id'] = $kaoshi_id; + if(count($list['data']['nianji']) > 0){ + $src['ruxuenian'] = $list['data']['nianji'][0]; + } else { + $src['ruxuenian'] = array(); + } + + // 设置页面标题 + $list['set'] = array( + 'webtitle' => '添加考号' + ,'butname' => '添加' + ,'formpost' => 'POST' + ,'url' => '/kaohao/index/saveOne' + ,'kaoshi' => $kaoshi_id + ); + + // 模板赋值 + $this->view->assign('list', $list); + // 渲染 + return $this->view->fetch(); + } + + + // 保存单条考号 + public function save() + { + // 获取表单数据 + $list = request()->only([ + 'kaoshi_id' + ,'banji' + ,'student_id' + ], 'POST'); + $list['student_id'] = explode(' ', $list['student_id']); + $list['student_id'] = $list['student_id'][1]; + + event('kslu', $list['kaoshi_id']); + + // 查询考号是否存在 + $ks = KH::withTrashed() + ->where('kaoshi_id', $list['kaoshi_id']) + ->where('student_id', $list['student_id']) + ->find(); + + // 如果存在成绩则更新,不存在则添加 + if($ks) + { + // 判断记录是否被删除 + if($ks->delete_time > 0) + { + $ks->restore(); + } + $data = ['msg' => '生成成功', 'val' => 1]; + }else{ + // 获取参加考试年级数组 + $bfdate = KS::where('id', $list['kaoshi_id'])->value('bfdate'); + $njlist = nianjiList($bfdate); + + // 获取班级信息 + $bj = new \app\teach\model\Banji; + $bjinfo = $bj->where('id', $list['banji_id'])->find(); + $list['school_id'] = $bjinfo->school; + $list['ruxuenian'] = $bjinfo->ruxuenian; + $list['nianji'] = $njlist[$bjinfo->ruxuenian]; + $list['paixu'] = $bjinfo->paixu; + $data = KH::create($list); + } + + // 根据更新结果设置返回提示信息 + $data ? $data = ['msg' => '生成成功', 'val' => 1] + : $data = ['msg' => '数据处理错误', 'val' => 0]; + + // 返回信息 + return json($data); + } + + + // 学生信息 + public function read($id) + { + $list['webtitle'] ='成绩'; + $list['dataurl'] = '/renshi/studentcj/chengjilist'; + $list['id'] = $id; + + $stucj = new KH; + $defen = $stucj->khSrcChengji($id); + $color = [ + 'layui-bg-red' + ,'layui-bg-orange' + ,'layui-bg-green' + ,'layui-bg-cyan' + ,'layui-bg-blue' + ,'layui-bg-black' + ]; + + foreach ($defen->ksChengji as $key => $value) { + $list['cj'][$value->subject_id]['defen'] = $value->defen * 1; + $list['cj'][$value->subject_id]['defenlv'] = $value->defenlv * 1; + $list['cj'][$value->subject_id]['title'] = $value->subjectName->title; + $list['cj'][$value->subject_id]['color'] = $color[$key % 5]; + } + + // // 模板赋值 + $this->view->assign('list', $list); + // 渲染模板 + return $this->view->fetch(); + } + + + // 删除考号 + public function delete($id) + { + // 整理数据 + $id = request()->delete('id'); + $id = explode(',', $id); + + // 判断考试结束时间是否已过 + $ksid = KH::where('id', $id[0])->value('kaoshi'); + event('kslu',$ksid); + + $data = KH::destroy($id); + // 根据更新结果设置返回提示信息 + $data ? $data = ['msg' => '删除成功', 'val' => 1] + : $data = ['msg' => '数据处理错误', 'val' => 0]; + // 返回信息 + return json($data); + } +} diff --git a/app/kaohao/controller/KaohaoExcel.php b/app/kaohao/controller/KaohaoExcel.php new file mode 100644 index 00000000..416c7a85 --- /dev/null +++ b/app/kaohao/controller/KaohaoExcel.php @@ -0,0 +1,315 @@ +srcNianji($kaoshi_id); + $khSrc = new khSrc; + $src['kaoshi_id'] = $kaoshi_id; + if(count($list['data']['nianji']) > 0){ + $src['ruxuenian'] = $list['data']['nianji'][0]; + } else { + $src['ruxuenian'] = array(); + } + $list['data']['school'] = $khSrc->cySchool($src); + // 设置页面标题 + $list['set'] = array( + 'webtitle' => '下载考号' + ,'butname' => '下载' + ,'formpost' => 'POST' + ,'url' => '/kaoshi/kaohao/biaoqianxls' + ,'kaoshi_id' => $kaoshi_id + ); + + // 模板赋值 + $this->view->assign('list', $list); + // 渲染 + return $this->view->fetch(); + } + + + //生成标签信息 + public function biaoqianXls() + { + // 获取表单数据 + $list = request()->only([ + 'banji_id'=>array() + ,'kaoshi_id' + ,'subject_id'=>array() + ], 'POST'); + event('kslu', $list['kaoshi_id']); + $kaoshi_id = $list['kaoshi_id']; + $banji_id = $list['banji_id']; + $subject = $list['subject_id']; + + // 实例化验证模型 + $validate = new \app\kaoshi\validate\Biaoqian; + $result = $validate->scene('biaoqian')->check($list); + $msg = $validate->getError(); + if(!$result){ + $this->error($msg); + } + + $ks = new KS(); + $kslist = $ks::where('id', $kaoshi_id) + ->field('id, title') + ->find(); + // 获取参考学科 + $ksset = new ksset(); + $ksSubject = $ksset->srcSubject($kaoshi_id, $list['subject_id'], ''); + + // 查询考号 + $khSrc = new khSrc(); + $src = [ + 'kaoshi_id' => $kaoshi_id + ,'banji_id' => $banji_id + ]; + $kaohao = $khSrc->srcBanjiKaohao($src); + + $thistime = date("Y-m-d h:i:sa"); + // 创建表格 + $spreadsheet = new Spreadsheet(); + $sheet = $spreadsheet->getActiveSheet(); + $thistime = date("Y-m-d h:i:sa"); + // 设置文档属性 + $spreadsheet->getProperties() + ->setCreator("尚码成绩管理系统") //作者 + ->setTitle("尚码成绩管理") //标题 + ->setLastModifiedBy(session('username')) //最后修改者 + ->setDescription("该表格由" . session('username') . session('id') . "于" . $thistime . "在尚码成绩管理系统中下载,只作为内部交流材料,不允许外泄。") //描述 + ->setKeywords("尚码 成绩管理") //关键字 + ->setCategory("成绩管理"); //分类 + + // 设置表头信息 + $sheet->setCellValue('A1', '序号'); + $sheet->setCellValue('B1', '考号'); + $sheet->setCellValue('C1', '学校'); + $sheet->setCellValue('D1', '班级'); + $sheet->setCellValue('E1', '学科'); + $sheet->setCellValue('F1', '姓名'); + + // 实例化系统设置类 + $md5 = new \app\system\controller\Encrypt; + + // 循环写出信息 + $i = 2; + foreach ($kaohao as $key=>$bj) + { + foreach ($ksSubject as $ksbj => $sbj) + { + foreach ($bj->banjiKaohao as $kkh => $kh) + { + // 表格赋值 + $sheet->setCellValue('A' . $i, $i-1); + $stuKaohao = ''; + $stuKaohao = $md5->encrypt($kh->id . '|' . $sbj['id'], 'dlbz'); + $sheet->setCellValue('C' . $i, $bj->cjSchool->jiancheng); + $sheet->setCellValue('B' . $i, $stuKaohao); + $sheet->setCellValue('D' . $i, $bj->cjBanji->numTitle); + $sheet->setCellValue('E' . $i, $sbj['jiancheng']); + $sheet->setCellValue('F' . $i, $kh->cjStudent['xingming']); + $i++; + } + } + } + + // 保存文件 + $filename = $kslist->title . ' 标签数据' . date('ymdHis') . '.xls'; + header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); + header('Content-Disposition: attachment;filename="' . $filename . '"'); + header('Cache-Control: max-age=0'); + $writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Xls'); + $writer->save('php://output'); + + // 保存文件 + $filename = $kslist->title . ' 标签数据' . date('ymdHis') . '.xlsx'; + header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); + header('Content-Disposition: attachment;filename="' . $filename . '"'); + header('Cache-Control: max-age=0'); + $writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Xlsx'); + $writer->save('php://output'); + ob_flush(); + flush(); + } + + + // 下载考试成绩采集表 + public function caiji($kaoshi_id) + { + // 获取参考年级、学科 + $ksset = new ksset; + $list['data']['nianji'] = $ksset->srcNianji($kaoshi_id); + $khSrc = new khSrc; + $src['kaoshi_id'] = $kaoshi_id; + if(count($list['data']['nianji']) > 0){ + $src['ruxuenian'] = $list['data']['nianji'][0]; + } else { + $src['ruxuenian'] = array(); + } + $list['data']['school'] = $khSrc->cySchool($src); + + // 设置页面标题 + $list['set'] = array( + 'webtitle'=>'下载成绩采集表' + ,'butname'=>'下载' + ,'formpost'=>'POST' + ,'url'=>'/kaoshi/kaohao/dwcaiji' + ,'kaoshi_id'=>$kaoshi_id + ); + + // 模板赋值 + $this->view->assign('list', $list); + // 渲染 + return $this->view->fetch('biaoqian'); + } + + + // 获取参考名单 + public function dwcaiji() + { + // 获取表单数据 + $list = request()->only([ + 'banji_id' => array() + ,'ruxuenian' + ,'kaoshi_id' + ,'subject_id' => array() + ], 'POST'); + event('kslu', $list['kaoshi_id']); + + $kaoshi_id = $list['kaoshi_id']; + $banji_id = $list['banji_id']; + $subject_id = $list['subject_id']; + + // 验证表单数据 + $validate = new \app\kaoshi\validate\Biaoqian; + $result = $validate->scene('caiji')->check($list); + $msg = $validate->getError(); + if(!$result){ + $this->error($msg); + } + + $ks = new KS(); + $kslist = $ks::where('id', $kaoshi_id) + ->field('id, title') + ->find(); + // 获取参加考试学科 + $ksset = new ksset(); + $ksSubject = $ksset->srcSubject($kaoshi_id, $list['subject_id']); + + // 查询考号 + $khSrc = new khSrc(); + $src = [ + 'kaoshi_id' => $kaoshi_id + ,'banji_id' => $banji_id + ]; + $kaohao = $khSrc->srcBanjiKaohao($src); + + // 获取电子表格列名 + $lieming = excelColumnName(); + // 创建表格 + $spreadsheet = new Spreadsheet(); + $sheet = $spreadsheet->getActiveSheet(); + $thistime = date("Y-m-d h:i:sa"); + // 设置文档属性 + $spreadsheet->getProperties() + ->setCreator("尚码成绩管理系统") //作者 + ->setTitle("尚码成绩管理") //标题 + ->setLastModifiedBy(session('username')) //最后修改者 + ->setDescription("该表格由" . session('username') . session('id') . "于" . $thistime . "在尚码成绩管理系统中下载,只作为内部交流材料,不允许外泄。") //描述 + ->setKeywords("尚码 成绩管理") //关键字 + ->setCategory("成绩管理"); //分类 + + // 设置表格标题与表头信息 + $sheet->setCellValue('A1',$kslist->title . ' 成绩采集表'); + + $sheet->setCellValue('A2', $kaoshi_id); + $sheet->setCellValue('B2', $list['ruxuenian']); + $sheet->setCellValue('A3', '序号'); + $sheet->setCellValue('B3', '编号'); + $sheet->setCellValue('C3', '班级'); + $sheet->setCellValue('D3', '姓名'); + // 获取列数并合并和一行 + $col = $lieming[count($ksSubject) + 3]; + $sheet->mergeCells('A1:' . $col . '1'); + + // 写入列名 + foreach ($ksSubject as $key => $value) { + $sheet->setCellValue($lieming[$key + 4] . '3', $value['title']); + $sheet->setCellValue($lieming[$key + 4] . '2', $value['id']); + } + // 隐藏第二行和第二列 + $sheet->getRowDimension('2')->setRowHeight('0'); + $sheet->getColumnDimension('B')->setWidth('0'); + $sheet->getColumnDimension('C')->setWidth('13'); + + // 将学生信息循环写入表中 + $i = 4; + foreach ($kaohao as $key=>$bj) + { + foreach ($bj->banjiKaohao as $k => $kh) { + $sheet->setCellValue('A' . $i, $i - 3); + $sheet->setCellValue('B' . $i, $kh->id); + $sheet->setCellValue('C' . $i, $bj->cjBanji->banjiTitle); + $sheet->setCellValue('D' . $i, $kh->cjStudent->xingming); + $i ++; + } + } + + // 居中 + $styleArray = [ + 'alignment' => [ + 'horizontal' => \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER, + 'vertical' => \PhpOffice\PhpSpreadsheet\Style\Alignment::VERTICAL_CENTER, //垂直居中 + ], + ]; + $sheet->getStyle('A1:' . $col . ($i - 1))->applyFromArray($styleArray); + + // 加边框 + $styleArray = [ + 'borders' => [ + 'allBorders' => [ + 'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THIN, + 'color' => ['argb' => '00000000'], + ], + ], + ]; + $sheet->getStyle('A3:' . $col . ($i - 1))->applyFromArray($styleArray); + // 修改标题字号 + $spreadsheet->getActiveSheet()->getStyle('A1')->getFont()->setBold(true)->setName('宋体')->setSize(11); + // 设置行高 + $spreadsheet->getActiveSheet()->getDefaultRowDimension()->setRowHeight(20); + $spreadsheet->getActiveSheet()->getRowDimension('1')->setRowHeight(25); + // 设置筛选 + $sheet->setAutoFilter('A3:' . $col . ($i - 1)); + + + // 保存文件 + $filename = $kslist->title . '成绩采集表' . date('ymdHis') . '.xlsx'; + header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); + header('Content-Disposition: attachment;filename="' . $filename . '"'); + header('Cache-Control: max-age=0'); + $writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Xlsx'); + $writer->save('php://output'); + ob_flush(); + flush(); + } +} diff --git a/app/kaohao/model/Kaohao.php b/app/kaohao/model/Kaohao.php new file mode 100644 index 00000000..e9bab3cc --- /dev/null +++ b/app/kaohao/model/Kaohao.php @@ -0,0 +1,126 @@ + '0' + ,'banji_id' => array() + ,'searchval' => '' + ); + + // 用新值替换初始值 + $src = array_cover($srcfrom, $src) ; + $src['banji_id'] = strToarray($src['banji_id']); + + // 查询成绩 + $data = $this->where('kaoshi_id', $src['kaoshi_id']) + ->field('id, school_id, student_id, ruxuenian, paixu, kaoshi_id') + ->where('banji_id', 'in', $src['banji_id']) + ->when(strlen($src['searchval']) > 0, function($query) use($src){ + $query->where(function($w) use ($src){ + $w + ->whereOr('student_id', 'in', function($q)use($src){ + $q->name('student') + ->where('xingming', 'like', '%' . $src['searchval'] . '%') + ->field('id'); + }); + }); + }) + ->with([ + 'ksChengji' => function($query){ + $query->field('id, kaohao_id, subject_id, defen'); + } + ,'cjSchool' => function($query){ + $query->field('id, jiancheng'); + } + ,'cjStudent' => function($query){ + $query->field('id, xingming, sex'); + } + ]) + ->append(['banjiTitle']) + ->select(); + + return $data; + } + + + // 班级成绩关联 + public function banjiKaohao() + { + return $this->hasMany('\app\kaoshi\model\Kaohao', 'banji_id', 'banji_id'); + } + + + // 学校信息关联表 + public function cjSchool() + { + return $this->belongsTo('\app\system\model\School', 'school_id', 'id'); + } + + + // 班级信息关联表 + public function cjBanji() + { + return $this->belongsTo('\app\teach\model\Banji', 'banji_id', 'id'); + } + + + // 学生信息关联 + public function cjStudent() + { + return $this->belongsTo('\app\renshi\model\Student', 'student_id', 'id'); + } + + + // 考试关联 + public function cjKaoshi() + { + return $this->belongsTo('\app\kaoshi\model\Kaoshi', 'kaoshi_id', 'id'); + } + + + // 考试成绩 + public function ksChengji() + { + return $this->hasMany('\app\chengji\model\Chengji', 'kaohao_id', 'id'); + } + + + // 获取参加考试的班级全名 + public function getBanjiTitleAttr() + { + $bj = banJiNamelist(); + $title = $this->getAttr('nianji') . $bj[$this->getAttr('paixu')]; + return $title; + } + + + /** + * 获取参加考试的班级全名 + * @access public + * @param number $kaoshi 考试id + * @param number $ruxuenian 入学年 + * @return array 返回类型 + */ + public function getBanTitleAttr() + { + $bj = banJiNamelist(); + $title = $bj[$this->getAttr('paixu')]; + return $title; + } + +} + + + + + diff --git a/app/kaohao/model/KaohaoSearch.php b/app/kaohao/model/KaohaoSearch.php new file mode 100644 index 00000000..b74b6223 --- /dev/null +++ b/app/kaohao/model/KaohaoSearch.php @@ -0,0 +1,443 @@ + '0' + ,'banji_id' => array() + ,'searchval' => '' + ); + // 用新值替换初始值 + $src = array_cover($srcfrom, $src); + + $kh = new kh; + $khlist = $kh->search($src); + if($khlist->isEmpty()) + { + return $data = array(); + } + + // 获取参考学科 + $ksset = new \app\kaoshi\model\KaoshiSet; + $ksSubject = $ksset->srcSubject($src['kaoshi_id'], '', ''); + if(count($ksSubject)==0) + { + return $data = array(); + } + $xk = array(); + foreach ($ksSubject as $key => $value) { + $xk[$value['id']] = $value['lieming']; + } + + // 实例化学生数据模型 + $stu = new \app\renshi\model\Student; + $data = array(); + foreach ($khlist as $key => $value) { + $data[$key]['id'] = $value->id; + $data[$key]['school_id'] = $value->cjSchool->jiancheng; + if($value->cjStudent != Null){ + $data[$key]['student_id'] = $value->cjStudent->xingming; + $data[$key]['sex'] = $value->cjStudent->sex; + }else{ + $stuinfo = $stu::withTrashed() + ->where('id', $value->student) + ->field('id, xingming, sex') + ->find(); + $data[$key]['student_id'] = $stuinfo->xingming; + $data[$key]['sex'] = $stuinfo->sex; + } + $data[$key]['banji'] = $value->banjiTitle; + $dfsum = 0; + $sbjcnt = 0; + + // 整理当前学生成绩 + $cjarr = $this->zzcj($value->ksChengji); + + // 初始化参数 + $sbjcnt = 0; #记录拥有成绩的学科数 + + foreach ($xk as $k => $val) { + if(array_key_exists($k,$cjarr)) + { + $data[$key][$val]=$cjarr[$k] * 1; + $sbjcnt++; + }else{ + $data[$key][$val]= null; + } + } + + if($sbjcnt>0){ + $data[$key]['sum'] = array_sum($cjarr); + $data[$key]['avg'] = round($data[$key]['sum']/$sbjcnt,1); + }else{ + $data[$key]['sum'] = null; + $data[$key]['avg'] = null; + } + } + + return $data; + } + + + // 查询各班级考号,并以班级进行分组 + public function srcBanjiKaohao($srcfrom) + { + // 初始化参数 + $src = array( + 'kaoshi_id' => '0' + ,'banji_id' => array() + ); + // 用新值替换初始值 + $src = array_cover($srcfrom, $src); + $src['banji_id'] = strToArray($src['banji_id']); + + // 获取考试标签 + $kh = new kh; + $data = $kh->where('kaoshi_id', $src['kaoshi_id']) + ->where('banji_id', 'in', $src['banji_id']) + ->field('banji_id, school_id') + ->order(['banji_id']) + ->group('banji_id, school_id') + ->with([ + 'cjBanji' => function($query){ + $query->field('id, school_id, ruxuenian, paixu') + ->append(['banjiTitle', 'numTitle']); + } + , + 'cjSchool' => function($query){ + $query->field('id, jiancheng'); + } + , + 'banjiKaohao' => function($query) use($src){ + $query->field('id, student_id, banji_id') + ->where('kaoshi_id', $src['kaoshi_id']) + ->order(['banji_id', 'id']) + ->with([ + 'cjStudent' => function($q){ + $q->field('id, xingming, sex'); + } + ]); + } + ]) + ->select(); + + $stu = new \app\renshi\model\Student; + // 找出已经被删除学生,并添加该学生信息 + foreach ($data as $key => $value) { + foreach ($value->banjiKaohao as $k => $val) { + if($val->cjStudent == Null) + { + $stuinof = $stu::withTrashed() + ->where('id', $val->student) + ->field('id, xingming') + ->find(); + $data[$key]->banjiKaohao[$key]->cjStudent = array('id' => $stuinof->id, 'xingming' => $stuinof->xingming); + } + } + } + return $data; + } + + + // 查询各学科成绩精简版 + public function srcChengjiSubject($srcfrom) + { + // 初始化参数 + $src = array( + 'kaoshi_id' => '0' + ,'banji_id' => array() + ,'searchval' => '' + ); + $src = array_cover($srcfrom ,$src); + + $kh = new kh; + $khlist = $kh->search($src); + + // 成绩整理 + if($khlist->isEmpty()) + { + return $data = array(); + } + $data = array(); + foreach ($khlist as $kh_k => $kh_val) { + foreach ($kh_val->ksChengji as $cj_k => $cj_val) { + $data[$cj_val->subject_id][$cj_val->id] = $cj_val->defen; + } + } + + return $data; + } + + + // 获取单个学生历次考试成绩 + public function srcOneStudentChengji($srcfrom) + { + // 初始化参数 + $src = array( + 'student_id' => '', + 'category_id' => '', + 'xueqi_id' => '', + 'kaoshi_id' => '', + ); + $src = array_cover($srcfrom, $src); + $src['category_id'] = strToArray($src['category_id']); + $src['xueqi_id'] = strToArray($src['xueqi_id']); + $src['kaoshi_id'] = strToArray($src['kaoshi_id']); + + if(isset($srcfrom['bfdate']) && strlen($srcfrom['bfdate'])>0) + { + $src['bfdate'] = $srcfrom['bfdate']; + }else{ + $src['bfdate'] = date("Y-m-d",strtotime("-1 year")); + } + + if(isset($srcfrom['enddate']) && strlen($srcfrom['enddate'])>0) + { + $src['enddate'] = $srcfrom['enddate']; + }else{ + $src['enddate'] = date("Y-m-d",strtotime("+1 day")); + } + + $kh = new kh; + $stuCj = $kh->where('student_id',$src['student_id']) + ->when(count($src['category_id'])>0, function($query) use($src){ + $query->where('kaoshi_id','in',function($q) use($src){ + $q->name('kaoshi') + ->where('category_id','in',$src['category_id']) + ->field('id'); + }); + }) + ->when(count($src['xueqi_id'])>0, function($query) use($src){ + $query->where('kaoshi_id','in',function($q) use($src){ + $q->name('kaoshi') + ->where('xueqi_id','in',function($w) use($src){ + $w->name('xueqi') + ->where('category_id','in',$src['xueqi_id']) + ->field('id'); + }) + ->field('id'); + }); + }) + ->when(count($src['kaoshi_id'])>0, function($query) use($src){ + $query->where('kaoshi_id', 'in', $src['kaoshi_id']); + }) + ->where('kaoshi_id', 'in', function($query) use($src){ + $query->name('kaoshi') + ->whereTime('bfdate|enddate', 'between', [ $src['bfdate'],$src['enddate'] ]) + ->field('id'); + }) + ->with([ + 'ksChengji'=>function($query){ + $query->field('id, kaohao_id, subject_id, defen, defenlv, bweizhi, xweizhi, qweizhi'); + } + ,'cjSchool' => function($query){ + $query->field('id, jiancheng'); + } + ,'cjKaoshi' => function($query){ + $query->field('id, title, zuzhi_id, xueqi_id, category_id, bfdate, enddate') + ->with([ + 'ksCategory' => function($q){ + $q->field('id, title'); + } + ,'ksZuzhi' => function($q) + { + $q->field('id, title, jiancheng'); + } + ]); + } + ]) + ->field('id ,kaoshi_id, student_id, ruxuenian, nianji, banji_id, paixu') + ->append(['banjiTitle']) + ->select(); + + return $stuCj; + } + + + // // 根据考号查询成绩 + // public function khSrcChengji($id) + // { + // $kh = new kh; + // $stuCj = $kh::where('id', $id) + // ->with([ + // 'ksChengji'=>function($query){ + // $query + // ->with([ + // 'subjectName'=>function($q){ + // $q->field('id, title'); + // } + // ]) + // ->field('id, kaohao_id, subject_id, defen, defenlv, bweizhi, xweizhi, qweizhi'); + // } + // ]) + // ->field('id, kaoshi_id, student_id, ruxuenian, nianji, banji_id, paixu') + // ->append(['banjiTitle']) + // ->find(); + + // return $stuCj; + // } + + + // // 获取考试成绩最后更新时间 + // public function lastUpdateTime($kaoshi_id) + // { + // // 获取考号 + // $kh = new kh; + // $kaohaoids = $kh->where('kaoshi', $kaoshi_id) + // ->cache(true) + // ->column('id'); + + // $cj = new \app\chengji\model\Chengji; + // $lastcj = $cj->where('kaohao_id', 'in', $kaohaoids) + // ->order(['update_time' => 'desc']) + // ->find(); + + // return $lastcj; + // } + + + // 获取参加考试学校 + public function cySchool($srcfrom) + { + // 初始化参数 + $src = array( + 'kaoshi_id' => '' + ,'ruxuenian' => '' + ); + $src = array_cover($srcfrom, $src); + $src['ruxuenian'] = strToarray($src['ruxuenian']); + + $kh = new kh; + $schoolList = $kh->where('kaoshi_id', $src['kaoshi_id']) + ->when(count($src['ruxuenian']) > 0, function($query) use($src){ + $query->where('ruxuenian', 'in', $src['ruxuenian']); + }) + ->with(['cjSchool' => function($query){ + $query->field('id, jiancheng, paixu, title') + ->order(['paixu' => 'asc']); + } + ]) + ->group('school_id') + ->field('school_id') + ->select() + ->toArray(); + + // 重新整理参加学校信息 + $data = array(); + foreach ($schoolList as $key => $value) { + $data[] = [ + 'paixu' => $value['cjSchool']['paixu'], + 'id' => $value['cjSchool']['id'], + 'title' => $value['cjSchool']['title'], + 'jiancheng' => $value['cjSchool']['jiancheng'], + ]; + } + + if(count($data) > 0) + { + $data = sortArrByManyField($data, 'paixu', SORT_ASC); + } + + return $data; + } + + + /** + * 获取参加考试的班级 + * @access public + * @param number $kaoshi 考试id + * @param number $ruxuenian 入学年 + * @return array 返回班级数据模型 + */ + public function cyBanji($srcfrom) + { + // 初始化参数 + $src = array( + 'kaoshi_id' => '' + ,'ruxuenian' => array() + ,'school_id' => array() + ,'banji_id' => array() + ); + $src = array_cover($srcfrom, $src); + $src['school_id'] = strToarray($src['school_id']); + $src['banji_id'] = strToarray($src['banji_id']); + $src['ruxuenian'] = strToarray($src['ruxuenian']); + + // 通过给定参数,从考号表中获取参加考试的班级 + $kh = new kh; + $bjids = $kh + ->where('kaoshi_id', $src['kaoshi_id']) + ->when(count($src['ruxuenian'] ) > 0, function($query) use($src){ + $query->where('ruxuenian', 'in', $src['ruxuenian'] ); + }) + ->when(count($src['school_id']) > 0, function($query) use($src){ + $query->where('school_id', 'in', $src['school_id']); + }) + ->when(count($src['banji_id']) > 0, function($query) use($src){ + $query->where('banji_id', 'in', $src['banji_id']); + }) + ->with([ + 'cjSchool' => function($query){ + $query->field('id, jiancheng, title, paixu'); + } + ]) + ->field('banji_id + ,any_value(id) as id + ,any_value(nianji) as nianji + ,any_value(paixu) as paixu + ,any_value(school_id) as school_id') + ->group('banji_id') + ->append(['banjiTitle', 'banTitle']) + ->select(); + + $bj = new \app\teach\model\Banji; + $data = array(); + foreach ($bjids as $key => $value) { + $data[] = [ + 'id'=>$value->banji_id, + 'paixu'=>$value->paixu, + 'schTitle'=>$value->cjSchool->title, + 'schJiancheng'=>$value->cjSchool->jiancheng, + 'schPaixu'=>$value->cjSchool->paixu, + 'banTitle'=>$value->banTitle, + 'banjiTitle'=>$value->banjiTitle, + // 'numTitle'=>$value->numTitle, + ]; + } + if(count($data) > 0) + { + $data = sortArrByManyField($data, 'schPaixu', SORT_ASC, 'paixu', SORT_ASC); + } + + return $data; + } + + + // 转置成绩数组 + private function zzcj($array = array()) + { + $arr = array(); + foreach ($array as $key => $value) { + $arr[$value['subject_id']] = $value['defen']; + } + return $arr; + } + +} + + + + + diff --git a/app/kaohao/route/kaohao.php b/app/kaohao/route/kaohao.php new file mode 100644 index 00000000..be0e9e8f --- /dev/null +++ b/app/kaohao/route/kaohao.php @@ -0,0 +1,30 @@ + +// +---------------------------------------------------------------------- +use think\facade\Route; + +// 考号管理 +Route::group('index', function () { + Route::rule('create/', 'Index/create', 'get'); # 信息列表 + Route::rule('save', 'Index/save', 'post'); # 保存信息 + Route::rule('delete/', 'Index/delete', 'delete'); # 成绩采集下载 + Route::rule('createall/', 'Index/createAll', 'get'); # 信息列表 + Route::rule('saveall', 'Index/saveAll', 'post'); # 保存信息 + Route::rule('read/', 'Index/read', 'get'); # 读取信息 +}); + + +// 考号管理 +Route::group('excel', function () { + Route::rule('biaoqian/', 'KaohaoExcel/biaoqian', 'get'); # 信息列表 + Route::rule('biaoqianxls', 'KaohaoExcel/biaoqianXls', 'post'); # 信息列表 + Route::rule('caiji/', 'KaohaoExcel/caiji', 'get'); # 成绩采集下载页面 + Route::rule('dwcaiji', 'KaohaoExcel/dwcaiji', 'post'); # 成绩采集下载 +}); diff --git a/app/kaohao/validate/Kaohao.php b/app/kaohao/validate/Kaohao.php new file mode 100644 index 00000000..65cfe38d --- /dev/null +++ b/app/kaohao/validate/Kaohao.php @@ -0,0 +1,34 @@ + ['规则1','规则2'...] + * + * @var array + */ + protected $rule = [ + 'kaoshi_id|考试号' => 'require|number', + 'banji_id|参考班级' => 'require|array', + ]; + + /** + * 定义错误信息 + * 格式:'字段名.规则名' => '错误信息' + * + * @var array + */ + protected $message = []; + + protected $scene = [ + 'create' => [ + 'kaoshi_id' + ,'banji_id' + ] + ]; +} diff --git a/app/kaohao/view/index/create.html b/app/kaohao/view/index/create.html new file mode 100644 index 00000000..711324be --- /dev/null +++ b/app/kaohao/view/index/create.html @@ -0,0 +1,151 @@ +{extend name=".././view/create.html" /} + +{block name="form"} +
+
+ +
+
+ +
+
+
+
+ +
+ {php}$schoolList = schlist('校级','校级',array('小学','中小学')){/php} + +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+
+ +
+
+
+ +
+ +
+
+{/block} + +{block name="myjs"} + +{/block} + diff --git a/app/kaohao/view/index/create_all.html b/app/kaohao/view/index/create_all.html new file mode 100644 index 00000000..e5f49ea9 --- /dev/null +++ b/app/kaohao/view/index/create_all.html @@ -0,0 +1,74 @@ +{extend name=".././view/create.html" /} + +{block name="form"} +
+
+ +
+ {php}$schoolList = schoolList('校级','校级'){/php} + +
+
+
+ {foreach $list.data.nianji as $key=>$vo } + +
+ +
+ {/foreach} +
+ +
+ +
+
+{/block} + +{block name="myjs"} + +{/block} + diff --git a/app/kaohao/view/index/read.html b/app/kaohao/view/index/read.html new file mode 100644 index 00000000..e0dfba40 --- /dev/null +++ b/app/kaohao/view/index/read.html @@ -0,0 +1,168 @@ + + + + + {$list.webtitle} + + + + {load href="__XADMIN__/css/font.css" /} + {load href="__XADMIN__/css/xadmin.css" /} + {load href="__XADMIN__/js/jquery.min.js" /} + {load href="__XADMIN__/lib/layui/layui.js" /} + {load href="__XADMIN__/js/xadmin.js" /} + {load href="__XADMIN__/js/cookie.js" /} + {load href="__XADMIN__/js/md5.min.js" /} + {load href="__STATIC__/echarts/echarts.js" /} + {$list.webtitle} + + +
+
+
+
+
+ 成绩列表 + + + + + + + + + + + + + + + {present name="list.cj"} + {volist name="list.cj" id="vo"} + + + + + + {/volist} + {else /} + + + + + + {/present} + +
学科得分得分率
{$vo.title}{$vo.defen}{$vo.defenlv}
+
+
+
+
+ 得分率 + {present name="list.cj"} + {volist name="list.cj" id="vo"} +
+ +
+
+
+
+
+
+
+ {/volist} + {/present} +
+
+
+
+ 雷达图 +
+
+
+
+
+
+ + + diff --git a/app/kaohao/view/kaohao_excel/biaoqian.html b/app/kaohao/view/kaohao_excel/biaoqian.html new file mode 100644 index 00000000..4c2d9f63 --- /dev/null +++ b/app/kaohao/view/kaohao_excel/biaoqian.html @@ -0,0 +1,93 @@ +{extend name=".././view/createhref.html" /} + +{block name="form"} +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+ +
+ +
+
+ + + +
+ +
+
+{/block} + +{block name="myjs"} + +{/block} + diff --git a/app/kaoshi/model/Kaohao.php b/app/kaoshi/model/Kaohao.php index 92bf5842..3aab46c9 100644 --- a/app/kaoshi/model/Kaohao.php +++ b/app/kaoshi/model/Kaohao.php @@ -66,83 +66,83 @@ class Kaohao extends BaseModel } - // // 查询学生成绩信息 - // public function srcChengji($srcfrom) - // { - // // 初始化参数 - // $src = array( - // 'kaoshi_id' => '0' - // ,'banji_id' => array() - // ,'searchval' => '' - // ); - // // 用新值替换初始值 - // $src = array_cover($srcfrom, $src); - // $khlist = self::search($src); - // if($khlist->isEmpty()) - // { - // return $data = array(); - // } + // 查询学生成绩信息 + public function srcChengjiList($srcfrom) + { + // 初始化参数 + $src = array( + 'kaoshi_id' => '0' + ,'banji_id' => array() + ,'searchval' => '' + ); + // 用新值替换初始值 + $src = array_cover($srcfrom, $src); + $khlist = self::search($src); + if($khlist->isEmpty()) + { + return $data = array(); + } - // // 获取参考学科 - // $ksset = new \app\kaoshi\model\KaoshiSet; - // $ksSubject = $ksset->srcSubject($src['kaoshi_id'], '', ''); - // if(count($ksSubject)==0) - // { - // return $data = array(); - // } - // $xk = array(); - // foreach ($ksSubject as $key => $value) { - // $xk[$value['id']] = $value['lieming']; - // } + // 获取参考学科 + $ksset = new \app\kaoshi\model\KaoshiSet; + $ksSubject = $ksset->srcSubject($src['kaoshi_id'], '', ''); + if(count($ksSubject)==0) + { + return $data = array(); + } + $xk = array(); + foreach ($ksSubject as $key => $value) { + $xk[$value['id']] = $value['lieming']; + } - // // 实例化学生数据模型 - // $stu = new \app\renshi\model\Student; - // $data = array(); - // foreach ($khlist as $key => $value) { - // $data[$key]['id'] = $value->id; - // $data[$key]['school_id'] = $value->cjSchool->jiancheng; - // if($value->cjStudent != Null){ - // $data[$key]['student_id'] = $value->cjStudent->xingming; - // $data[$key]['sex'] = $value->cjStudent->sex; - // }else{ - // $stuinfo = $stu::withTrashed() - // ->where('id', $value->student) - // ->field('id, xingming, sex') - // ->find(); - // $data[$key]['student_id'] = $stuinfo->xingming; - // $data[$key]['sex'] = $stuinfo->sex; - // } - // $data[$key]['banji'] = $value->banjiTitle; - // $dfsum = 0; - // $sbjcnt = 0; + // 实例化学生数据模型 + $stu = new \app\renshi\model\Student; + $data = array(); + foreach ($khlist as $key => $value) { + $data[$key]['id'] = $value->id; + $data[$key]['school_id'] = $value->cjSchool->jiancheng; + if($value->cjStudent != Null){ + $data[$key]['student_id'] = $value->cjStudent->xingming; + $data[$key]['sex'] = $value->cjStudent->sex; + }else{ + $stuinfo = $stu::withTrashed() + ->where('id', $value->student) + ->field('id, xingming, sex') + ->find(); + $data[$key]['student_id'] = $stuinfo->xingming; + $data[$key]['sex'] = $stuinfo->sex; + } + $data[$key]['banji'] = $value->banjiTitle; + $dfsum = 0; + $sbjcnt = 0; - // // 整理当前学生成绩 - // $cjarr = $this->zzcj($value->ksChengji); + // 整理当前学生成绩 + $cjarr = $this->zzcj($value->ksChengji); - // // 初始化参数 - // $sbjcnt = 0; #记录拥有成绩的学科数 + // 初始化参数 + $sbjcnt = 0; #记录拥有成绩的学科数 - // foreach ($xk as $k => $val) { - // if(array_key_exists($k,$cjarr)) - // { - // $data[$key][$val]=$cjarr[$k] * 1; - // $sbjcnt++; - // }else{ - // $data[$key][$val]= null; - // } - // } + foreach ($xk as $k => $val) { + if(array_key_exists($k,$cjarr)) + { + $data[$key][$val]=$cjarr[$k] * 1; + $sbjcnt++; + }else{ + $data[$key][$val]= null; + } + } - // if($sbjcnt>0){ - // $data[$key]['sum'] = array_sum($cjarr); - // $data[$key]['avg'] = round($data[$key]['sum']/$sbjcnt,1); - // }else{ - // $data[$key]['sum'] = null; - // $data[$key]['avg'] = null; - // } - // } + if($sbjcnt>0){ + $data[$key]['sum'] = array_sum($cjarr); + $data[$key]['avg'] = round($data[$key]['sum']/$sbjcnt,1); + }else{ + $data[$key]['sum'] = null; + $data[$key]['avg'] = null; + } + } - // return $data; - // } + return $data; + } // 查询学生各学科成绩 diff --git a/app/kaoshi/model/KaoshiSet.php b/app/kaoshi/model/KaoshiSet.php index 313772af..66158464 100644 --- a/app/kaoshi/model/KaoshiSet.php +++ b/app/kaoshi/model/KaoshiSet.php @@ -47,7 +47,6 @@ class KaoshiSet extends BaseModel } - /** * 查询参加考试学科 * diff --git a/app/kaoshi/view/index/more_action.html b/app/kaoshi/view/index/more_action.html index 7521ec29..203ab691 100644 --- a/app/kaoshi/view/index/more_action.html +++ b/app/kaoshi/view/index/more_action.html @@ -55,13 +55,13 @@
+ onclick="addlayer('生成考号','/kaohao/index/createall/{$kaoshi_id}','800','400')" class="x-admin-backlog-body">
生成考号
- +