diff --git a/application/chengji/controller/Tongji.php b/application/chengji/controller/Tongji.php index 7fa4406c..75f1740d 100644 --- a/application/chengji/controller/Tongji.php +++ b/application/chengji/controller/Tongji.php @@ -119,21 +119,22 @@ class Tongji extends Base public function ajaxSchool() { // 获取年级和班级列表名 - $njnames = nianjiList(); + // $njnames = nianjiList(); // 获取表单参数 $getParam = request()->param(); - $school = $getParam['school']; + $nianji = $getParam['nianji']; // 实例化成绩数据模型 - $cj = new \app\chengji\model\Chengji; + $cj = new \app\system\model\Chengji; // 根据考试号和年级获取考试成绩 - $cjlist = $cj->searchNianji($getParam['kaoshiid'],$school,$getParam['ruxuenian']); + $cjlist = $cj->searchNianji($kaoshi=$getParam['kaoshiid'],$nianji=$getParam['ruxuenian']); - // 根据年级获取一个有多少个班级 - $bj = new \app\teach\model\Banji; - $bjids = $bj->where('ruxuenian',$getParam['ruxuenian']) + // 获取学校列表 + + $sch = new \app\teach\model\School; + $schids = $sch->where('ruxuenian',$getParam['ruxuenian']) ->when(!empty($school),function($query) use($school){ $query->where('school','in',$school); }) @@ -174,4 +175,12 @@ class Tongji extends Base return json($data); } + + + public function test() + { + $aa = schlist('区级','区级'); + dump($aa); + } + } diff --git a/application/chengji/model/Chengji.php b/application/chengji/model/Chengji.php index 77f73e48..e54c6ab4 100644 --- a/application/chengji/model/Chengji.php +++ b/application/chengji/model/Chengji.php @@ -138,6 +138,8 @@ class Chengji extends Base + + // 根据考试ID查询所有考试成绩 public function searchAll($kaoshiid) { @@ -162,6 +164,8 @@ class Chengji extends Base } + + // 考试项目查询范围 public function scopeKaoshi($query,$kaoshiid) { diff --git a/application/chengji/view/index/chengjilist.html b/application/chengji/view/index/chengjilist.html index f1d48ea3..796f463f 100644 --- a/application/chengji/view/index/chengjilist.html +++ b/application/chengji/view/index/chengjilist.html @@ -35,8 +35,7 @@