独立考号模块
This commit is contained in:
1 parent
6a2dea2a10
commit
b4e50f1734
22 files changed
+1993
-331
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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');
|
||||
|
||||
// 实例化考号
|
||||
|
||||
@@ -151,7 +151,7 @@ class Chengji extends BaseModel
|
||||
$kh = new \app\kaoshi\model\Kaohao;
|
||||
|
||||
// 以考号为基础查询成绩
|
||||
$chengjilist = $kh->srcChengji($src);
|
||||
$chengjilist = $kh->srcChengjiList($src);
|
||||
|
||||
|
||||
// 按条件排序
|
||||
|
||||
Loaded 3 of 22 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user