diff --git a/app/kaohao/model/SearchOne.php b/app/kaohao/model/SearchOne.php index c31585a2..db7122db 100755 --- a/app/kaohao/model/SearchOne.php +++ b/app/kaohao/model/SearchOne.php @@ -154,17 +154,24 @@ class SearchOne extends BaseModel ]) ->find(); - if($stuCj->cjStudent->isEmpty()) + if(!$stuCj->cjStudent) { $stu = new \app\student\model\Student; $stuinfo = $stu::withTrashed() - ->where('id', $cjlist->student) + ->where('id', $stuCj->student) ->field('id, xingming, sex') ->find(); - $stuCj->cjStudent = array( - 'id' => $stuinfo->id - ,'xingming' => $stuinfo->xingming - ); + if(!$stuinfo){ + $stuCj->cjStudent = array( + 'id' => $stuCj->student + ,'xingming' => "真删除" + ); + } else { + $stuCj->cjStudent = array( + 'id' => $stuinfo->id + ,'xingming' => $stuinfo->xingming + ); + } } $sbj = new \app\teach\model\Subject; diff --git a/app/luru/controller/Index.php b/app/luru/controller/Index.php index 043b3e1e..7040bd37 100755 --- a/app/luru/controller/Index.php +++ b/app/luru/controller/Index.php @@ -99,10 +99,12 @@ class Index extends AdminBase $khInfo = $kh->where('id', $list['kaohao_id'])->find(); event('kslu', $khInfo->kaoshi_id); + // halt($list, $khInfo->toArray()); + $src = [ 'kaoshi_id' => $khInfo->kaoshi_id ,'banji_id' => $khInfo->banji_id - ,'subject_id' => $subject_id + ,'subject_id' => $list['subject_id'] ]; $auth = event('lrfg', $src); $auth = $auth[0]; @@ -115,7 +117,7 @@ class Index extends AdminBase // 获取本学科满分 $list['ruxuenian'] = $list['nianji']; - $list['kaoshi_id'] = $kaoshi_id; + $list['kaoshi_id'] = $khInfo->kaoshi_id; $ksset = new \app\kaoshi\model\KaoshiSet; $subject = $ksset->srcSubject($list);