修复成绩条数据错位
This commit is contained in:
1 parent
f0a35a4f9f
commit
e656b433ea
3 files changed
+3897
-6
No files matched your search
@@ -558,9 +558,9 @@ class Index extends AdminBase
|
||||
$sheet->setCellValue('D' . ($row + $k), $val['title']);
|
||||
$sheet->setCellValue('E' . ($row + $k), $value[$val['lieming']]); # 得分
|
||||
$sheet->setCellValue('F' . ($row + $k), $njtj['cj'][$val['lieming']]['avg']);
|
||||
$sheet->setCellValue('G' . ($row + $k), $njtj['cj'][$val['lieming']]['max']);
|
||||
$sheet->setCellValue('H' . ($row + $k), $njtj['cj'][$val['lieming']]['youxiu']);
|
||||
$sheet->setCellValue('I' . ($row + $k), $njtj['cj'][$val['lieming']]['jige']);
|
||||
$sheet->setCellValue('G' . ($row + $k), $njtj['cj'][$val['lieming']]['youxiu']);
|
||||
$sheet->setCellValue('H' . ($row + $k), $njtj['cj'][$val['lieming']]['jige']);
|
||||
$sheet->setCellValue('I' . ($row + $k), $njtj['cj'][$val['lieming']]['max']);
|
||||
$sheet->setCellValue('J' . ($row + $k), $njtj['cj'][$val['lieming']]['sifenwei'][0]);
|
||||
$sheet->setCellValue('K' . ($row + $k), $njtj['cj'][$val['lieming']]['sifenwei'][1]);
|
||||
$sheet->setCellValue('L' . ($row + $k), $njtj['cj'][$val['lieming']]['sifenwei'][2]);
|
||||
|
||||
@@ -246,15 +246,15 @@ class Tongji extends BaseModel
|
||||
$zws = 0;
|
||||
|
||||
$cnt = count($arr);
|
||||
if ($cnt === 1) {
|
||||
if ($cnt = 1) {
|
||||
$zws = $arr[0];
|
||||
}elseif ($cnt > 1) {
|
||||
$mod = $cnt % 2;
|
||||
if ($mod == 0) {
|
||||
$i = $cnt / 2;
|
||||
$zws = ($arr[$i - 1] + $arr[$i]) / 2;
|
||||
$zws = ($arr[$i] + $arr[$i + 1]) / 2;
|
||||
}else{
|
||||
$i = ($cnt - 1) / 2;
|
||||
$i = ($cnt + 1) / 2;
|
||||
$zws = $arr[$i];
|
||||
}
|
||||
}else{
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user