diff --git a/application/chengji/controller/Index.php b/application/chengji/controller/Index.php
index 46797cef..136fb1ff 100644
--- a/application/chengji/controller/Index.php
+++ b/application/chengji/controller/Index.php
@@ -6,7 +6,7 @@ use app\common\controller\Base;
// 引用成绩数据模型
use app\chengji\model\Chengji;
// 引用考号数据模型
-use app\kaoshi\model\Kaohao;
+use \app\kaoshi\model\Kaohao;
// // 引用学科数据模型
use \app\teach\model\Subject;
@@ -216,14 +216,14 @@ class Index extends Base
// 成绩列表
- public function index($id)
+ public function index($kaoshi)
{
// 设置要给模板赋值的信息
$list['webtitle'] = '成绩列表';
// 实例化考试数据模型
- $kaoshi = new \app\kaoshi\model\Kaoshi;
- $ksinfo = $kaoshi->where('id',$id)
+ $ks = new \app\kaoshi\model\Kaoshi;
+ $ksinfo = $ks->where('id',$kaoshi)
->field('id')
->with([
'ksSubject'=>function($query){
@@ -237,6 +237,7 @@ class Index extends Base
->find();
$list['subject'] = $ksinfo->ks_subject;
+ $list['kaoshi'] = $kaoshi;
// 模板赋值
diff --git a/application/chengji/controller/Tongji.php b/application/chengji/controller/Tongji.php
index 1eb4fe71..922e0a4b 100644
--- a/application/chengji/controller/Tongji.php
+++ b/application/chengji/controller/Tongji.php
@@ -4,19 +4,42 @@ namespace app\chengji\controller;
// 引用控制器基类
use app\common\controller\Base;
+// 引用成绩统计数据模型
+use app\chengji\model\Tongji as TJ;
class Tongji extends Base
{
// 年级成绩汇总
- public function tjBanji($id)
+ public function tjBanji($kaoshi)
{
+ $ks = new \app\kaoshi\model\Kaoshi;
+ $ksinfo = $ks->where('id',$kaoshi)
+ ->with([
+ 'KsNianji'
+ ,'ksSubject'=>function($query){
+ $query->field('kaoshiid,subjectid')
+ ->with(['subjectName'=>function($q){
+ $q->field('id,jiancheng,lieming');
+ }]
+ );
+ }
+ ])
+ ->field('id')
+ ->find();
+ if($ksinfo->ks_nianji[0])
+ {
- // 设置页面标题
- $list['title'] = '班级成绩统计';
- $list['kaoshi'] = $id;
+ $list['nianji'] = $ksinfo->ks_nianji[0]->nianjiname;
+ }else{
+ $list['nianji'] ='一年级';
+ }
+ $list['subject'] = $ksinfo->ks_subject;
+ // 设置要给模板赋值的信息
+ $list['webtitle'] = '各年级的班级成绩列表';
+ $list['kaoshi'] = $kaoshi;
// 模板赋值
- $this->assign('list', $list);
+ $this->assign('list',$list);
// 渲染模板
return $this->fetch();
@@ -26,32 +49,95 @@ class Tongji extends Base
// 获取年级成绩统计结果
public function ajaxBianji()
{
- // 获取表单参数
- $getParam = request()->param();
+ // 获取参数
+ $src = $this->request
+ ->only([
+ 'page'=>'1',
+ 'limit'=>'10',
+ 'kaoshi'=>'',
+ 'nianji'=>'一年级',
+ 'school'=>array(),
+ 'paixu'=>array(),
+ ],'POST');
+
+ // 查询要统计成绩的班级
+ $kh = new \app\kaoshi\model\Kaohao;
+ $school = $src['school'];
+ $paixu = $src['paixu'];
+
+ $bj = $kh->where('nianji',$src['nianji'])
+ ->where('kaoshi',$src['kaoshi'])
+ ->when(count($school)>0,function($query) use($school){
+ $query->where('school','in',$school);
+ })
+ ->when(count($paixu)>0,function($query) use($paixu){
+ $query->where('banji','in',function($q)use($paixu){
+ $q->name('banji')->where('paixu','in',$paixu)->field('id');
+ });
+ })
+ ->with([
+ 'cjBanji'=>function($query){
+ $query->field('id,paixu,ruxuenian')
+ ->append(['numTitle','banjiTitle']);
+ }
+ ,'cjSchool'=>function($query){
+ $query->field('id,jiancheng');
+ }
+ ])
+ ->group('banji')
+ ->field('id,banji,school')
+ ->select();
+
+ if($bj->isEmpty()){
+ // 重组返回内容
+ $data = [
+ 'code'=> 0 , // ajax请求次数,作为标识符
+ 'msg'=>"", // 获取到的结果数(每页显示数量)
+ 'count'=>0, // 符合条件的总数据量
+ 'data'=>array(), //获取到的数据结果
+ ];
+
+
+ return json($data);
+ }
+
+
+
+ // 获取并统计各班级成绩
+ $tj = new TJ;
+ $data = array();
+ foreach ($bj as $key => $value) {
+ $banji=[$value->banji];
+ $nianji = array();
+ $temp = $tj->srcChengji($src['kaoshi'],$banji,$nianji);
+ $temp = $tj->tongji($temp,$src['kaoshi']);
+ $data[] = [
+ 'banji'=>$value->cj_banji->banjiTitle,
+ 'school'=>$value->cj_school->jiancheng,
+ 'chengji'=>$temp
+ ];
+ }
- // 实例化统计成绩数据模型
- $tj = new \app\chengji\model\Tongji;
- $data = $tj->tjnianji($getParam['kaoshiid'],$getParam['school'],$getParam['ruxuenian']);
$cnt = count($data);
-
// 重组返回内容
$data = [
- 'draw'=> $getParam["draw"] , // ajax请求次数,作为标识符
- 'recordsTotal'=>$cnt, // 获取到的结果数(每页显示数量)
- 'recordsFiltered'=>$cnt, // 符合条件的总数据量
+ 'code'=> 0 , // ajax请求次数,作为标识符
+ 'msg'=>"", // 获取到的结果数(每页显示数量)
+ 'count'=>$cnt, // 符合条件的总数据量
'data'=>$data, //获取到的数据结果
];
+
return json($data);
}
// 年级、班级学生成绩统计结果下载界面
- public function dwBanji($id)
+ public function dwBanji($kaoshi)
{
// 模板赋值
- $this->assign('id',$id);
+ $this->assign('id',$kaoshi);
// 渲染模板
return $this->fetch();
@@ -59,7 +145,7 @@ class Tongji extends Base
// 年级、班级学生成绩统计下载表格
- public function dwBanjixls($id)
+ public function dwBanjixls($kaoshi)
{
// 获取表单参数
$getParam = request()->param();
@@ -146,11 +232,11 @@ class Tongji extends Base
// 获取各学校、各年级考试成绩
- public function tjNianji($id)
+ public function tjNianji($kaoshi)
{
// 设置页面标题
- $list['title'] = '学校成绩统计';
- $list['kaoshi'] = $id;
+ $list['title'] = '各学校的年级成绩统计表';
+ $list['kaoshi'] = $kaoshi;
// 模板赋值
$this->assign('list', $list);
@@ -186,10 +272,10 @@ class Tongji extends Base
// 年级、班级学生成绩统计结果下载界面
- public function dwNianji($id)
+ public function dwNianji($kaoshi)
{
// 模板赋值
- $this->assign('id',$id);
+ $this->assign('id',$kaoshi);
// 渲染模板
return $this->fetch();
@@ -197,7 +283,7 @@ class Tongji extends Base
// 年级、班级学生成绩统计下载表格
- public function dwNianjixls($id)
+ public function dwNianjixls($kaoshi)
{
// 获取表单参数
diff --git a/application/chengji/model/Tongji.php b/application/chengji/model/Tongji.php
index 01b744be..bdbe0740 100644
--- a/application/chengji/model/Tongji.php
+++ b/application/chengji/model/Tongji.php
@@ -6,199 +6,230 @@ use think\Model;
class Tongji extends Model
{
- //统计成绩
- public function tongji($cjlist,$fenshuxian)
- {
- // 循环计算各科成绩
- foreach ($fenshuxian as $key => $value) {
- // 获取列名
- $lieming = $value['lieming'];
- // 获取学科成绩
- $xkchengji = $cjlist->column($value['lieming']);
+ // //统计成绩
+ // public function tongji($cjlist,$fenshuxian)
+ // {
+ // // 循环计算各科成绩
+ // foreach ($fenshuxian as $key => $value) {
+ // // 获取列名
+ // $lieming = $value['lieming'];
+ // // 获取学科成绩
+ // $xkchengji = $cjlist->column($value['lieming']);
- // 过滤空元素
- $xkchengji = array_filter($xkchengji);
- // 获取成绩个数
- $cnt = count($xkchengji);
+ // // 过滤空元素
+ // $xkchengji = array_filter($xkchengji);
+ // // 获取成绩个数
+ // $cnt = count($xkchengji);
- // 获取优秀人数
- $yx = $value['youxiu'];
- $youxiu = array_filter($xkchengji,function($var) use($yx){
- if( $var<$yx )
- {
- return false;
- }else{
- return true;
- };
- });
- $youxiu = count($youxiu);
+ // // 获取优秀人数
+ // $yx = $value['youxiu'];
+ // $youxiu = array_filter($xkchengji,function($var) use($yx){
+ // if( $var<$yx )
+ // {
+ // return false;
+ // }else{
+ // return true;
+ // };
+ // });
+ // $youxiu = count($youxiu);
- // 获取及格人数
- $jg = $value['jige'];
- $jg = array_filter($xkchengji,function($var) use($jg){
- if( $var<$jg )
- {
- return false;
- }else{
- return true;
- }
- });
- $jige = count($jg);
+ // // 获取及格人数
+ // $jg = $value['jige'];
+ // $jg = array_filter($xkchengji,function($var) use($jg){
+ // if( $var<$jg )
+ // {
+ // return false;
+ // }else{
+ // return true;
+ // }
+ // });
+ // $jige = count($jg);
- // 计算成绩
- $data[$value['lieming']] = $this->tjxueke($xkchengji,$cnt,$youxiu,$jige);
- }
+ // // 计算成绩
+ // $data[$value['lieming']] = $this->tjxueke($xkchengji,$cnt,$youxiu,$jige);
+ // }
- return $data;
- }
+ // return $data;
+ // }
- public function tjnianji($kaoshiid,$school,$ruxuenian)
+ // 查询学生成绩
+ public function srcChengji($kaoshi,$banji=array(),$nianji=array())
{
- // 实例化成绩数据模型
- $cj = new \app\chengji\model\Chengji;
+ $kh = new \app\kaoshi\model\Kaohao;
- // 根据考试号和年级获取考试成绩
- $cjlist = $cj->searchNianji($kaoshiid,$school,$ruxuenian);
-
- // 根据年级获取一个有多少个班级
- $bj = new \app\teach\model\Banji;
- $bjids = $bj->where('ruxuenian',$ruxuenian)
- ->when(!empty($school),function($query) use($school){
- $query->where('school','in',$school);
+ $khlist = $kh->where('kaoshi',$kaoshi)
+ ->field('id,nianji,banji')
+ ->when(count($nianji)>0,function($query) use($nianji){
+ $query->where('nianji','in',$nianji);
})
- ->append(['title'])
- ->select();
+ ->when(count($banji)>0,function($query) use($banji){
+ $query->where('banji','in',$banji);
+ })
+ ->with([
+ 'ksChengji'=>function($query){
+ $query->field('kaohao_id,subject_id,defen');
+ }
+ ])
+ ->select();
-
- // 获取统计成绩参数
- $canshu = $this->getCanshu($kaoshiid);
-
-
-
- // 循环获取各班级成绩
- $i = 0;
- foreach ($bjids as $key => $value) {
- $data[$i]['id'] = $i+1;
- $data[$i]['title'] = $value['title'];
- $bjlist = $cjlist->where('banji',$value['id']);
- $data[$i]['data'] = $this->tongji($bjlist,$canshu);
-
- $i++;
+ // 获取参考学科
+ $ks = new \app\kaoshi\model\Kaoshi;
+ $ksinfo = $ks->where('id',$kaoshi)
+ ->with([
+ 'ksSubject'=>function($query){
+ $query->field('kaoshiid,subjectid,lieming');
+ }
+ ])
+ ->find();
+ $xk = array();
+ foreach ($ksinfo->ks_subject as $key => $value) {
+ $xk[$value->subjectid] = $value->lieming;
}
- $data[$i]['id'] = $i+1;
- $data[$i]['title'] = '合计';
- $data[$i]['data'] = $this->tongji($cjlist,$canshu);
-
-
- return $data;
-
- }
-
-
-
- // 统计全区各学校的年级成绩
- public function tjschool($kaoshiid,$ruxuenian)
- {
- // 实例化成绩数据模型
- $cj = new \app\chengji\model\Chengji;
- // 根据考试号和年级获取考试成绩
- $cjlist = $cj->searchNianji($kaoshiid,'',$ruxuenian);
-
- // 获取学校列表
- $sch = schlist($low='校级',$high='校级');
-
-
- // 获取统计成绩参数
- $canshu = $this->getCanshu($kaoshiid);
-
-
-
- // 循环获取各班级成绩
- $i = 0;
- foreach ($sch as $key => $value) {
- $data[$i]['id'] = $i+1;
- $data[$i]['title'] = $value['jiancheng'];
- $bjlist = $cjlist->where('school',$value['id']);
- $data[$i]['data'] = $this->tongji($bjlist,$canshu);
- $i++;
+ // 整理数据
+ $data = array();
+ foreach ($khlist as $key => $value) {
+ foreach ($value->ks_chengji as $k => $val) {
+ $data[$key][$xk[$val->subject_id]] = $val->defen*1;
+ }
}
- $data[$i]['id'] = $i+1;
- $data[$i]['title'] = '合计';
- $data[$i]['data'] = $this->tongji($cjlist,$canshu);
-
return $data;
}
- // 统计学科成绩
- public function tjxueke($xkchengji,$cnt,$youxiu,$jige)
- {
+ // 统计成绩
+ public function tongji($cj=array(),$kaoshi)
+ {
+
+ $ks = new \app\kaoshi\model\Kaoshi;
+ $ksinfo = $ks->where('id',$kaoshi)
+ ->field('id')
+ ->with('ksSubject')
+ ->find();
+ $data = array();
+ foreach ($ksinfo->ks_subject as $key => $value) {
+ $cjcol = array_column($cj,$value->lieming);
+ $temp = array();
+ $temp['cnt'] = count($cjcol);
+ $temp['sum'] = array_sum($cjcol);
+ $temp['cnt']>0 ? $temp['avg'] = $temp['sum']/$temp['cnt'] : $temp['avg']=0;
+ $temp['biaozhuncha'] = round($this->getVariance($temp['avg'], $cjcol,true),2);
+ $temp['avg'] = round($temp['avg'],1);
+ $temp['sifenwei'] = $this->quartile($cjcol);
+ $data[$value->lieming] = $temp;
+ }
+ return $data;
+ }
+
+
+
+
+
+
+ // // 统计全区各学校的年级成绩
+ // public function tjschool($kaoshiid,$ruxuenian)
+ // {
+ // // 实例化成绩数据模型
+ // $cj = new \app\chengji\model\Chengji;
+ // // 根据考试号和年级获取考试成绩
+ // $cjlist = $cj->searchNianji($kaoshiid,'',$ruxuenian);
+
+ // // 获取学校列表
+ // $sch = schlist($low='校级',$high='校级');
+
+
+ // // 获取统计成绩参数
+ // $canshu = $this->getCanshu($kaoshiid);
+
+
+
+ // // 循环获取各班级成绩
+ // $i = 0;
+ // foreach ($sch as $key => $value) {
+ // $data[$i]['id'] = $i+1;
+ // $data[$i]['title'] = $value['jiancheng'];
+ // $bjlist = $cjlist->where('school',$value['id']);
+ // $data[$i]['data'] = $this->tongji($bjlist,$canshu);
+ // $i++;
+ // }
+
+ // $data[$i]['id'] = $i+1;
+ // $data[$i]['title'] = '合计';
+ // $data[$i]['data'] = $this->tongji($cjlist,$canshu);
+
+ // return $data;
+ // }
+
+
+
+ // // 统计学科成绩
+ // public function tjxueke($xkchengji,$cnt,$youxiu,$jige)
+ // {
- // 如果没有数据则返回空数组
- if($cnt == 0)
- {
- $data = ['cnt'=>0,'sum'=>'-','avg'=>'-','youxiu'=>'-','jige'=>'-','max'=>'-','min'=>'-','biaozhuncha'=>'-','sifenwei'=>array()];
- return $data;
- }
+ // // 如果没有数据则返回空数组
+ // if($cnt == 0)
+ // {
+ // $data = ['cnt'=>0,'sum'=>'-','avg'=>'-','youxiu'=>'-','jige'=>'-','max'=>'-','min'=>'-','biaozhuncha'=>'-','sifenwei'=>array()];
+ // return $data;
+ // }
- // 计算数据
- $sum = array_sum($xkchengji);
- $avg = round($sum/$cnt,1);
- $youxiulv = round($youxiu/$cnt*100,1);
- $jigelv = round($jige/$cnt*100,1);
- $max = max($xkchengji);
- $min = min($xkchengji);
- $biaozhuncha = round($this->getVariance($avg,$xkchengji,true),1);
- $sifenwei = $this->quartile($xkchengji);
- // 数组赋值
- $data = [
- 'cnt'=>$cnt,
- 'sum'=>$sum,
- 'avg'=>$avg,
- 'youxiu'=>$youxiulv,
- 'jige'=>$jigelv,
- 'max'=>$max,
- 'min'=>$min,
- 'biaozhuncha'=>$biaozhuncha,
- 'sifenwei'=>$sifenwei,
- ];
+ // // 计算数据
+ // $sum = array_sum($xkchengji);
+ // $avg = round($sum/$cnt,1);
+ // $youxiulv = round($youxiu/$cnt*100,1);
+ // $jigelv = round($jige/$cnt*100,1);
+ // $max = max($xkchengji);
+ // $min = min($xkchengji);
+ // $biaozhuncha = round($this->getVariance($avg,$xkchengji,true),1);
+ // $sifenwei = $this->quartile($xkchengji);
+ // // 数组赋值
+ // $data = [
+ // 'cnt'=>$cnt,
+ // 'sum'=>$sum,
+ // 'avg'=>$avg,
+ // 'youxiu'=>$youxiulv,
+ // 'jige'=>$jigelv,
+ // 'max'=>$max,
+ // 'min'=>$min,
+ // 'biaozhuncha'=>$biaozhuncha,
+ // 'sifenwei'=>$sifenwei,
+ // ];
- // 返回计算结果
- return $data;
- }
+ // // 返回计算结果
+ // return $data;
+ // }
- // 获取统计成绩需要的参数
- public function getCanshu($kaoshiid)
- {
- // 获取学科信息
- $xk = new \app\teach\model\Subject;
- $xk = $xk->where('id','<',4)->select();
- $xkTitle = $xk->column('title','id');
- $xkLieming = $xk->column('lieming','id');
+ // // 获取统计成绩需要的参数
+ // public function getCanshu($kaoshiid)
+ // {
+ // // 获取学科信息
+ // $xk = new \app\teach\model\Subject;
+ // $xk = $xk->where('id','<',4)->select();
+ // $xkTitle = $xk->column('title','id');
+ // $xkLieming = $xk->column('lieming','id');
- // 获取参加考试学科满分
- $kssub = new \app\kaoshi\model\KaoshiSubject;
+ // // 获取参加考试学科满分
+ // $kssub = new \app\kaoshi\model\KaoshiSubject;
- $fenshuxian = $kssub ->where('kaoshiid',$kaoshiid)->append(['subject.title','subject.lieming'])->select();
+ // $fenshuxian = $kssub ->where('kaoshiid',$kaoshiid)->append(['subject.title','subject.lieming'])->select();
- // 循环取出优秀和及格分数线
- foreach ($fenshuxian as $key => $value) {
- $fsx[$value['subjectid']]['youxiu']=$value['youxiu'];
- $fsx[$value['subjectid']]['jige']=$value['jige'];
- $fsx[$value['subjectid']]['title']=$value['subject']['title'];
- $fsx[$value['subjectid']]['lieming']=$value['subject']['lieming'];
- $fsx[$value['subjectid']]['manfen']=$value['manfen'];
- }
+ // // 循环取出优秀和及格分数线
+ // foreach ($fenshuxian as $key => $value) {
+ // $fsx[$value['subjectid']]['youxiu']=$value['youxiu'];
+ // $fsx[$value['subjectid']]['jige']=$value['jige'];
+ // $fsx[$value['subjectid']]['title']=$value['subject']['title'];
+ // $fsx[$value['subjectid']]['lieming']=$value['subject']['lieming'];
+ // $fsx[$value['subjectid']]['manfen']=$value['manfen'];
+ // }
- // 返回数据
- return $fsx;
- }
+ // // 返回数据
+ // return $fsx;
+ // }
/**
diff --git a/application/chengji/view/index/index.html b/application/chengji/view/index/index.html
index 2681bbdb..aea3504d 100644
--- a/application/chengji/view/index/index.html
+++ b/application/chengji/view/index/index.html
@@ -54,6 +54,7 @@
{/for}
+
{/block}
{block name="table"}
diff --git a/application/chengji/view/tongji/tj_banji.html b/application/chengji/view/tongji/tj_banji.html
index b438a99b..aa1401ac 100644
--- a/application/chengji/view/tongji/tj_banji.html
+++ b/application/chengji/view/tongji/tj_banji.html
@@ -1,161 +1,154 @@
+
{extend name="common@list" /}
-{block name="topnav"}
-
-{/block}
-{block name="bouttons"}
-
-
-
-
- {php}
- $school = schlist('校级','校级');
- {/php}
-
-
-
- {foreach $school as $key=>$vo }
-
- {/foreach}
-
-
-
-
- {php}
- $njlist = nianjiList();
- {/php}
-
- {foreach $njlist as $key=>$vo }
-
-
-
-
- {/foreach}
+{block name="jsset"}
-
-
+{/block}
+{block name="nav"}
+
+ 考试管理
+ 成绩管理
+ 各年级成绩统计表
+
+{/block}
+{block name="search"}
+
-
+
+
+
{/block}
-{block name="tables"}
-
-
-
- | 序号 |
- 班级 |
- 语文 |
- 数学 |
- 英语 |
-
-
- | 人数 |
- 平均分 |
- 优秀率% |
- 及格率% |
-
- 人数 |
- 平均分 |
- 优秀率% |
- 及格率% |
-
- 人数 |
- 平均分 |
- 优秀率% |
- 及格率% |
-
-
-
-
-
-
-
+{block name="table"}
+
{/block}
{block name="myjs"}
-
+
+
+
+
{/block}
\ No newline at end of file
diff --git a/application/chengji/view/tongji/tj_banji1.html b/application/chengji/view/tongji/tj_banji1.html
new file mode 100644
index 00000000..b438a99b
--- /dev/null
+++ b/application/chengji/view/tongji/tj_banji1.html
@@ -0,0 +1,161 @@
+{extend name="common@list" /}
+{block name="topnav"}
+
+{/block}
+{block name="bouttons"}
+
+
+
+
+ {php}
+ $school = schlist('校级','校级');
+ {/php}
+
+
+
+ {foreach $school as $key=>$vo }
+
+ {/foreach}
+
+
+
+
+ {php}
+ $njlist = nianjiList();
+ {/php}
+
+ {foreach $njlist as $key=>$vo }
+
+
+
+
+ {/foreach}
+
+
+
+
+
+{/block}
+{block name="tables"}
+
+
+
+ | 序号 |
+ 班级 |
+ 语文 |
+ 数学 |
+ 英语 |
+
+
+ | 人数 |
+ 平均分 |
+ 优秀率% |
+ 及格率% |
+
+ 人数 |
+ 平均分 |
+ 优秀率% |
+ 及格率% |
+
+ 人数 |
+ 平均分 |
+ 优秀率% |
+ 及格率% |
+
+
+
+
+
+
+
+{/block}
+{block name="myjs"}
+
+{/block}
\ No newline at end of file
diff --git a/application/common.php b/application/common.php
index b9f9d70b..7515613f 100644
--- a/application/common.php
+++ b/application/common.php
@@ -268,26 +268,6 @@ function upload($list,$file,$isSave=false)
* */
function arraySequence($array, $field = 'id', $sort = 'desc') {
- // $arr = array_column($array,$field);
-
- // // 获取数组大小
- // $arraycnt = count($array);
- // $arrcnt = count($arr);
- // while($arrcnt<$arraycnt) {
- // $arr[$arrcnt] = null;
- // $arrcnt++;
- // }
-
- // foreach ($array as $key => $value) {
- // if($value[$field]){
- // foreach ($variable as $key => $value) {
- // # code...
- // }
- // }
- // }
-
-
-
$len = count($array)-1;
if($sort == 'asc')
{
diff --git a/application/common/view/list.html b/application/common/view/list.html
index 22b84db4..18452efd 100644
--- a/application/common/view/list.html
+++ b/application/common/view/list.html
@@ -67,6 +67,7 @@
autoSort:false,
id:'mytable',
defaultToolbar:'',
+ where:{}
};
{block name="myjs"}{/block}
diff --git a/application/kaoshi/model/Kaohao.php b/application/kaoshi/model/Kaohao.php
index bb8a52e4..b360f962 100644
--- a/application/kaoshi/model/Kaohao.php
+++ b/application/kaoshi/model/Kaohao.php
@@ -149,10 +149,6 @@ class Kaohao extends Base
}
}
- // dump($data);
-
- // $src['type'] == 'asc' ? $sort='SORT_ASC' : $sort='SORT_DESC';
-
// 按条件排序
if(count($data)>0){
$data = arraySequence($data,$src['field'],$src['type']); //排序
@@ -160,6 +156,8 @@ class Kaohao extends Base
return $data;
}
+
+
// 满分
public function banjiKaohao()
{
diff --git a/application/kaoshi/view/index/more_action.html b/application/kaoshi/view/index/more_action.html
index fcd0e532..e79f0b7c 100644
--- a/application/kaoshi/view/index/more_action.html
+++ b/application/kaoshi/view/index/more_action.html
@@ -78,13 +78,13 @@
diff --git a/route/chengji.php b/route/chengji.php
index d4eeed96..b615de8b 100644
--- a/route/chengji.php
+++ b/route/chengji.php
@@ -21,23 +21,23 @@ Route::post('chengji/read','chengji/Index/read');
Route::get('chengji/biaolu','chengji/Index/biaolu');
Route::post('chengji/biaolu','chengji/Index/saveAll');
// 获取学生成绩列表
-Route::get('chengji/:id/stuChengjilist','chengji/Index/index');
-Route::delete('chengji/:id/cj','chengji/Index/deletecj'); #只清空成绩
+Route::get('chengji/:kaoshi/stuChengjilist','chengji/Index/index');
+Route::delete('chengji/:kaoshi/cj','chengji/Index/deletecj'); #只清空成绩
// 成绩统计表
-Route::get('cjtongji/:id/banji','chengji/Tongji/tjBanji'); # 班级成绩统计列表
+Route::get('cjtongji/:kaoshi/banji','chengji/Tongji/tjBanji'); # 班级成绩统计列表
Route::get('cjtongji/:id/nianji','chengji/Tongji/tjNianji'); # 年级成绩统计列表
// 下载学生成绩
-Route::get('chengji/:id/dwChengji','chengji/Index/dwChengji');
+Route::get('chengji/:kaoshi/dwChengji','chengji/Index/dwChengji');
Route::post('chengji/dwChengji','chengji/Index/dwchengjixls');
// 下载班级成绩统计表
-Route::get('cjtongji/:id/dwBanji','chengji/Tongji/dwBanji');
-Route::post('cjtongji/:id/dwBanji','chengji/Tongji/dwBanjixls');
+Route::get('cjtongji/:kaoshi/dwBanji','chengji/Tongji/dwBanji');
+Route::post('cjtongji/:kaoshi/dwBanji','chengji/Tongji/dwBanjixls');
// 下载年级成绩统计表
-Route::get('cjtongji/:id/dwNianji','chengji/Tongji/dwNianji');
-Route::post('cjtongji/:id/dwNanji','chengji/Tongji/dwNianjixls');
+Route::get('cjtongji/:kaoshi/dwNianji','chengji/Tongji/dwNianji');
+Route::post('cjtongji/:kaoshi/dwNanji','chengji/Tongji/dwNianjixls');