合并master

This commit is contained in:
东宝书记 committed 2021-04-23 18:34:29 +08:00
commit a88c8eaf77
4 files changed
+17 -8

No files matched your search

+1 -1
View File
@@ -85,7 +85,7 @@ class Index extends AdminBase
->where('kaoshi_id', $list['kaoshi_id'])
->where('student_id', $value->id)
->find();
if($check)
if($check) # 恢复后学生还是原来的班级,删除后重新添加可能会出错
{
if($check->delete_time > 0)
{
+3 -2
View File
@@ -243,7 +243,7 @@ class SearchMore extends BaseModel
->order(['banji_id', 'id'])
->with([
'cjStudent' => function($q){
$q->field('id, xingming, sex');
$q->field('id, xingming, sex, shoupin');
}
]);
}
@@ -261,8 +261,9 @@ class SearchMore extends BaseModel
->where('id', $val->student_id)
->field('id, xingming')
->find();
$data[$key]->banjiKaohao[$key]->cjStudent = array('id' => $stuinof->id, 'xingming' => $stuinof->xingming);
$data[$key]->banjiKaohao[$key]->cjStudent = array('id' => $stuinof->id, 'shoupin' => $stuinof->shoupin);
}
$data[$key]['banjiKaohao'][$k]['shoupin'] = $val['cjStudent']['shoupin'];
}
}
return $data;
+6 -4
View File
@@ -481,11 +481,10 @@ class Index extends AdminBase
$i = 4;
foreach ($kaohao as $key=>$bj)
{
foreach ($bj->banjiKaohao as $k => $kh) {
$bjkh = $bj->banjiKaohao->toArray();
$bjkh = sortArrByManyField($bjkh, 'shoupin', SORT_ASC);
foreach ($bjkh as $k => $kh) {
$sheet->setCellValue('A' . $i, $i - 3);
$sheet->setCellValue('B' . $i, $md5::encrypt((string)$kh->id, 'dlbz'));
$sheet->setCellValue('C' . $i, $bj->banjiTitle);
$sheet->setCellValue('D' . $i, $kh->cjStudent['xingming']);
// if(isset($kh->cjStudent->xingming))
// {
// $sheet->setCellValue('D' . $i, $kh->cjStudent->xingming);
@@ -493,6 +492,9 @@ class Index extends AdminBase
// halt($kh->toArray());
// $sheet->setCellValue('D' . $i, '学生已经被删除');
// }
$sheet->setCellValue('B' . $i, $md5::encrypt((string)$kh['id'], 'dlbz'));
$sheet->setCellValue('C' . $i, $bj['banjiTitle']);
$sheet->setCellValue('D' . $i, $kh['cjStudent']['xingming']);
$i ++;
}
Loaded 3 of 4 files, more files were not shown because too many files have changed in this diff. Show more