From 75164017952af0bb32e8c5249ad0ebbba37e286b Mon Sep 17 00:00:00 2001 From: cxdbz Date: Wed, 1 Jan 2020 20:51:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B9=B4=E7=BA=A7=E8=AE=A1?= =?UTF-8?q?=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common.php | 4 +++- app/kaoshi/controller/Kaohao.php | 5 ++--- app/kaoshi/model/Kaohao.php | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/common.php b/app/common.php index 58b4b365..70f13292 100644 --- a/app/common.php +++ b/app/common.php @@ -51,9 +51,11 @@ function nianjiList($riqi=0) { $jiedian = strtotime(date('Y').'-8-1'); $thisday = time(); + $nian = date('Y'); }else{ $jiedian = strtotime(date('Y',$riqi).'-8-1'); $thisday = $riqi; + $nian = date('Y',$riqi); } @@ -65,7 +67,7 @@ function nianjiList($riqi=0) } - $nian = date('Y') - $str; + $nian = $nian - $str; $njlist = array(); diff --git a/app/kaoshi/controller/Kaohao.php b/app/kaoshi/controller/Kaohao.php index 445c1de0..a6a2c89b 100644 --- a/app/kaoshi/controller/Kaohao.php +++ b/app/kaoshi/controller/Kaohao.php @@ -383,7 +383,6 @@ class Kaohao extends BaseController $md5 = new \app\system\controller\Encrypt; - // 循环写出信息 $i = 2; foreach ($kaohao as $key=>$bj) @@ -399,7 +398,7 @@ class Kaohao extends BaseController $sheet->setCellValue('C'.$i, $bj->cjSchool->jiancheng); $sheet->setCellValue('B'.$i, $stuKaohao); $sheet->setCellValue('D'.$i, $bj->cjBanji->numTitle); - $sheet->setCellValue('E'.$i, $sbj->subject_name->jiancheng); + $sheet->setCellValue('E'.$i, $sbj->subjectName->jiancheng); $sheet->setCellValue('F'.$i, $kh->cjStudent['xingming']); $i++; } @@ -455,7 +454,7 @@ class Kaohao extends BaseController { foreach ($kaoshilist->ks_subject as $key => $value) { $list['data']['subject'][$key]['id']=$value->subjectid; - $list['data']['subject'][$key]['title']=$value->subject_name->title; + $list['data']['subject'][$key]['title']=$value->subjectName->title; } }else{ $list['data']['subject']= array(); diff --git a/app/kaoshi/model/Kaohao.php b/app/kaoshi/model/Kaohao.php index ce6f0660..f53dfd2c 100644 --- a/app/kaoshi/model/Kaohao.php +++ b/app/kaoshi/model/Kaohao.php @@ -399,6 +399,8 @@ class Kaohao extends Base $nj = nianjiList($bfdate); $bj = banjinamelist(); + + $title = $nj[$this->getAttr('ruxuenian')] . $bj[$this->getAttr('paixu')];