From c3b2d900c48f7f56cdf44fbd521c11030d8077d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Thu, 21 Jan 2021 12:17:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=B2=E5=BD=95?= =?UTF-8?q?=E6=88=90=E7=BB=A9=E6=95=B0=E5=85=A8=E6=98=AF0=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chengji/model/Tongji.php | 3 ++- public/.htaccess | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/chengji/model/Tongji.php b/app/chengji/model/Tongji.php index 69df7929..941259b3 100755 --- a/app/chengji/model/Tongji.php +++ b/app/chengji/model/Tongji.php @@ -10,10 +10,11 @@ class Tongji extends BaseModel // 统计成绩 public function tongjiCnt($cj = array(), $subject_id) { + // halt($cj); $data = array(); // 循环统计各学科成绩 foreach ($subject_id as $key => $value) { - $cjcol = array_column($cj, $value['lieming']); + $cjcol = array_column($cj, $value['lieming'] . 'defen'); $cjcol = array_filter($cjcol, function($item){ return $item != null; diff --git a/public/.htaccess b/public/.htaccess index 3916a08b..85c6cc94 100755 --- a/public/.htaccess +++ b/public/.htaccess @@ -1,7 +1,6 @@ Options +FollowSymlinks -Multiviews RewriteEngine On - RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L] From f99567af83d3853b95b6139795ebe4d77a6f02f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Tue, 26 Jan 2021 09:40:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E5=8D=95=E6=AC=A1=E8=80=83=E8=AF=95=E6=88=90=E7=BB=A9=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E9=94=99=E8=AF=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/tools/model/OneStudentChengji.php | 28 ++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/app/tools/model/OneStudentChengji.php b/app/tools/model/OneStudentChengji.php index 9176430b..e439c257 100755 --- a/app/tools/model/OneStudentChengji.php +++ b/app/tools/model/OneStudentChengji.php @@ -820,7 +820,7 @@ class OneStudentChengji extends BaseModel { if($zhengfu['fu'] == $cjCnt) { - $fu = $fu . '所有学科成绩低于班级平均分,'; + $fu = $fu . '所有学科成绩低于班级平均分'; }else{ $xk = ''; foreach ($avgCha as $key => $value) { @@ -841,9 +841,9 @@ class OneStudentChengji extends BaseModel $xk = $src['cj'][$key]['subjectName']['title']; if($zhengfu['fu'] == 1) { - $fu = $fu . abs(end($avgCha)) .'分。'; + $fu = $fu . abs(end($avgCha)) .'分'; }else{ - $fu = $fu . ',其中' . $xk .'成绩低与班级平均' . abs(end($avgCha)) .'分。'; + $fu = $fu . ',其中' . $xk .'成绩低与班级平均' . abs(end($avgCha)) .'分'; } } @@ -852,9 +852,9 @@ class OneStudentChengji extends BaseModel { if(strlen($ling)>0 || strlen($fu)>0) { - $py = $bjdbpy . $zheng . ','; + $py = $zheng . ','; }else{ - $py = $bjdbpy . $zheng . '。'; + $py = $zheng . '。'; } } @@ -862,13 +862,18 @@ class OneStudentChengji extends BaseModel { if(strlen($fu) > 0) { - $py = $py . $ling . ',' . $fu; + $py = $py . $ling . ','; }else{ $py = $py . $ling . '。'; } } - return $py; + if(strlen($fu) > 0) + { + $py = $py . $fu . '。'; + } + + return $bjdbpy . $py; } @@ -1038,9 +1043,9 @@ class OneStudentChengji extends BaseModel { if(strlen($ling)>0 || strlen($fu)>0) { - $py = $bjdbpy . $zheng . ','; + $py = $zheng . ','; }else{ - $py = $bjdbpy . $zheng . '。'; + $py = $zheng . '。'; } } @@ -1048,7 +1053,7 @@ class OneStudentChengji extends BaseModel { if(strlen($fu) > 0) { - $py = $py . $ling . ',' . $fu; + $py = $py . $ling . ','; }else{ $py = $py . $ling . '。'; } @@ -1059,7 +1064,8 @@ class OneStudentChengji extends BaseModel $py = $py . $fu . '。'; } - return $py; + + return $bjdbpy . $py; }