model = new \app\admin\model\teacher\Collection; $this->exam_model = new \app\admin\model\teacher\Exams; $this->assignConfig('sim_sim_type', ConfigModel::getSimTypeList()); $this->assignConfig('sim_question_setting_method', ConfigModel::getSimQuestionList()); $this->whereExtend['exam_collection_type'] = 3; $this->whereExtend['exam_collection_state'] = 2; $this->assignConfig('sim_sim_type', ConfigModel::getSimTypeList()); $groupIds = $this->auth->getGroupIds(); //学员查看自己区队的考试集合 if(in_array(8, $groupIds)){ $departid = $this->auth->depart_id; $this->whereExtend[] = ['exp',Db::raw("FIND_IN_SET($departid,depart_ids)")]; } } /** * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 */ /** * 查看 * * @return string|Json * @throws \think\Exception * @throws DbException */ public function index() { $isset = $this->model->alias('z') ->join('real_exam r','z.exam_collection_id=r.exam_collection_id','left') ->where('z.exam_collection_type=3 and z.exam_collection_state=2 and r.endtime=0 and r.user_id='.$this->auth->id)->find(); if(empty($isset)){ //提示页面,没有开始的考试 return $this->view->fetch('tishi'); }else{ //// $this->redirect('/ZQOtIMLKud.php/student/collection/examing/ids/'.$isset['exam_id'].'?ref=addtabs'); // echo ""; // //$this->redirect('/hotelmanage/room/displayindex/ids/1'); // exit(); echo ""; } die(); //设置过滤方法 $this->request->filter(['strip_tags', 'trim']); if (false === $this->request->isAjax()) { return $this->view->fetch(); } //如果发送的来源是 Selectpage,则转发到 Selectpage if ($this->request->request('keyField')) { return $this->selectpage(); } [$where, $sort, $order, $offset, $limit] = $this->buildparams(); $list = $this->model ->where($where)->where($this->whereExtend) ->order($sort, $order) ->paginate($limit); foreach ($list as $k => $v){ $exam_isset = $this->exam_model->where(['user_id'=>$this->auth->id,'exam_collection_id'=>$v['exam_collection_id'],'exam_collection_type'=>3,'endtime'=>['>',0]])->find(); if(isset($exam_isset)){ $v->is_user_examed = 1; }else{ $v->is_user_examed = 0; } } unset($v); $result = ['total' => $list->total(), 'rows' => $list->items()]; return json($result); } //进入考试 public function into($ids = null) { $row = $this->model->get($ids); if(!$row){ $this->error('未找到记录'); } $info = $this->exam_model->where(['user_id'=>$this->auth->id,'exam_collection_id'=>$ids,'exam_collection_type'=>3,'endtime'=>0])->find(); if(!empty($info)){ if($info['seat_id']>0 && $this->auth->seat_id!=$info['seat_id']){ $this->error('已在其他座号有开始的考试,不允许换座号'); } $this->exam_model->where('exam_id',$info['exam_id'])->update(['seat_id'=>$this->auth->seat_id]); $info['seat_id'] = $this->auth->seat_id; // $sim = Db::name('sim')->where('seat_id',$this->auth->seat_id)->find(); $sim = Db::name('sim')->where('sim_type',$info['sim_type'])->find(); $sim_text = ''; if(!empty($sim)){ if($sim['sim_state']==1){ $sim_text = '在线'; }else if($sim['sim_state']==2){ $sim_text = '模拟器离线'; }else if($sim['sim_state']==3){ $sim_text = '网关离线'; }else if($sim['sim_state']==4){ $sim_text = '硬件故障异常'; }else if($sim['sim_state']==5){ $sim_text = '手动禁用'; } } // 模拟器状态 0:可用初始化 1:在线 2:模拟器离线 3:网关离线 4:硬件故障异常 5:手动禁用 $info['sim_text'] = $sim_text; } if(!empty($info['starttime'])) { echo ""; die(); } $this->view->assign('info', $info); $this->view->assign('row', $row); $this->assignConfig('exam_id', $info['exam_id']); $this->assignConfig('url_type', config('site.url_type')); $this->assignConfig('is_fault', Env::get('app.is_fault')); return $this->view->fetch(); } public function examing($ids = null) { $row = $this->exam_model->get($ids); if(!$row){ $this->error('未找到记录'); } if ($this->request->isPost()) { //先请求接口判断,再进行处理 if(Env::get('app.is_fault')){ $url = config('site.url_type').'/sim/real-exam/student/exam/submit/'.$ids; // /dev-api/sim/real-exam/student/exam/submit/{examId} $ret = json_decode(send_get($url),true); // halt($ret); if($ret['code']!=200){ $this->error($ret['msg']); } } //计算分数,保存记录 $params = $this->request->post('row/a'); $result = false; $score = 100; $fault_one_score = 25; $fault_two_score = 25; $fault_three_score = 25; //故障现象 $xianxian_score = 0; $xianxian_arr = []; $xianxian_content = []; //故障部位 $buwei_score= 0; $buwei_arr = []; $buwei_content = []; //可能原因 $yuanyin_socre= 0; $yuanyin_arr = []; $yuanyin_content = []; //排除方法 $fangfa_score= 0; $fangfa_arr = []; $fangfa_content = []; Db::startTrans(); try { //更新考试结束时间 $row->end_time = date('Y-m-d H:i:s'); $row->endtime = time(); $row->exam_status = 5; $row->other_report = $params['other_report']; $result = $row->save(); $info = $this->exam_model->where(['exam_id'=>$ids])->find(); //更新故障是否正确 $fault_list = Db::name('real_exam_fault')->where(['exam_id'=>$ids,'flag'=>1])->select(); if(!empty($fault_list)){ foreach ($fault_list as $k =>$t){ $answer_right = 2; if(!empty($t['sim_fault_question_value']) && !empty($t['sim_fault_answer_value'])){ if($t['sim_fault_question_value']!=$t['sim_fault_answer_value'] ){ //真实故障id 000200010001 if($t['sim_fault_answer_value']=='00000000' && $t['fault_id'] !='000200010001'){ $answer_right=2; } $answer_right=1; } } Db::name('real_exam_fault')->where(['ref_id'=>$t['ref_id']])->update(['answer_right'=>$answer_right]); } } //计算得分,故障是否有扣分 扣分制 $fault_right_list = Db::name('real_exam_fault')->where(['exam_id'=>$ids,'flag'=>1,'answer_right'=>['>',0]])->select(); if(!empty($fault_right_list)){ if($fault_right_list[0]['answer_right']==1){ $fault_one_score = 0; } if($fault_right_list[1]['answer_right']==1){ $fault_two_score = 0; } if($fault_right_list[2]['answer_right']==1){ $fault_three_score = 0; } //根据故障部位 数组 $fault_arr = [$fault_right_list[0]['fault_id'],$fault_right_list[1]['fault_id'],$fault_right_list[2]['fault_id']]; //查找故障现象 数组 $partent_fault_id = Fault::where(['fault_id'=>['in',$fault_arr]])->column('parent_fault_id'); $issetValue = ''; $issetValue_count = 0; //出题的 判断故障现象 是否有重复的,拿出重复的fault_id 和重复次数 $countedValues = array_count_values($partent_fault_id); foreach ($countedValues as $value => $count) { if ($count > 1) { $issetValue = $value; $issetValue_count = $count; } } $other_report = json_decode($params['other_report'],true); if(!empty($other_report)){ foreach ($other_report as $key => $em){ //故障现象 $xianxian_arr[] = $em['xx_id']; //故障部位 $buwei_arr[] = $em['bw_id']; } //可能原因 //排除方法 } echo "
";
print_r($fault_arr);
echo "";
print_r($buwei_arr);
$xxValue = '';
$xxValue_count = 0;
//维修报告 判断故障现象 是否有重复的,拿出重复的fault_id 和重复次数
$xxcountedValues = array_count_values($xianxian_arr);
foreach ($xxcountedValues as $v => $t) {
if ($t > 1) {
$xxValue = $v;
$xxValue_count = $t;
}
}
//故障现象 判断数量是否一致,
if(count($partent_fault_id)!=count($xianxian_arr)){
//少写
$xianxian_arr_count = count($xianxian_arr) ;
$xianxian_score = (3-1*$xianxian_arr_count)+$xianxian_score;
//计算故障现象分数
if($xianxian_arr_count==1){
$count = count(array_keys($partent_fault_id, $xianxian_arr[0])); // 更准确的方法是使用下面
$xianxian_score = $count>1? 1*$count+$xianxian_score:(3-1*$count)+$xianxian_score;
}
if($xianxian_arr_count==2){
foreach ($partent_fault_id as $k1 =>$t){
if(!in_array($t,$xianxian_arr)){
//错写
$xianxian_score = 1+$xianxian_score;
echo "错写:".$t."@@@@".$xianxian_score."
";
}
}
foreach ($xianxian_arr as $k2 =>$t2){
if(!in_array($t2,$partent_fault_id)){
//多写
$xianxian_score = 1+$xianxian_score;
echo "多写:".$t2."@@@@".$xianxian_score."
";
}
}
}
echo "";
echo $xianxian_score;
die('asdfasdf');
}else{ //数量相同
//计算故障现象分数
foreach ($partent_fault_id as $k1 =>$t){
if(!in_array($t,$xianxian_arr)){
//少写
$xianxian_score = 1+$xianxian_score;
$xianxian_content[] = [
'cx_id'=>$t,
'cx_type'=>'少写',
'cx_name'=>Fault::where(['fault_id'=>$t])->value('name'),
];
}
}
foreach ($xianxian_arr as $k2 =>$t2){
if(!in_array($t2,$partent_fault_id)){
//错写
$xianxian_score = 1+$xianxian_score;
$xianxian_content[] = [
'cx_id'=>$t2,
'cx_type'=>'错写',
'cx_name'=>Fault::where(['fault_id'=>$t2])->value('name'),
];
//多写
$xianxian_score = 1+$xianxian_score;
// echo "多写:".$t2."@@@@".$xianxian_score."
";
$xianxian_content[] = [
'cx_id'=>$t2,
'cx_type'=>'多写',
'cx_name'=>Fault::where(['fault_id'=>$t2])->value('name'),
];
}
}
if($xxValue_count!=$issetValue_count){
//错写
$xianxian_score = 1+$xianxian_score;
$xianxian_content[] = [
'cx_id'=>$xxValue,
'cx_type'=>'错写',
'cx_name'=>Fault::where(['fault_id'=>$xxValue])->value('name'),
];
//多写
$xianxian_score = 1+$xianxian_score;
$xianxian_content[] = [
'cx_id'=>$xxValue,
'cx_type'=>'多写',
'cx_name'=>Fault::where(['fault_id'=>$xxValue])->value('name'),
];
// echo "多写:".$xxValue."####".$xianxian_score."
";
}
}
//故障部位 数量不相同
if(count($fault_arr)!=count($buwei_arr)){
}else{ //数量相同
halt('数量相同');
}
// echo "";
// echo $xianxian_score;
// die();
// if(count($other_report)<3){
// $xianxian_score = 15-5*count($other_report)+$xianxian_score;
// $buwei_score = 3-1*count($other_report)+$buwei_score;
// $yuanyin_socre = 3-1*count($other_report)+$yuanyin_socre;
// $fangfa_score = 3-1*count($other_report)+$fangfa_score;
// }
// foreach ($other_report as $key => $em){
// //故障现象
// if(!in_array($em['xx_id'],$partent_fault_id)){
// $xianxian_score = 5+$xianxian_score;
// $xianxian_arr[] = $em['xx_id'];
// }
//
// //故障部位
// if(!empty($em['bw_id'])){
// $report_xx_id = Report::where(['bw_id'=>['in',$em['bw_id']]])->column('xx_id');
// if(!in_array($em['xx_id'],$report_xx_id)){ //现象不对,直接扣分
// $buwei_score = 1+$buwei_score;
// $buwei_arr[] = $em['bw_id'];
// }else{
// //现象正确,判断是不是正确的选项
// foreach (explode(',',$em['bw_id']) as $s => $bs){
// if(!in_array($bs,$fault_arr)){
// $buwei_score = 1+$buwei_score;
// $buwei_arr[] = $bs;
// }
// }
// }
// }else{
// //部位为空 +1
// $buwei_score = 1+ $buwei_score;
// }
//
//
// //可能原因
// if(!empty($em['yy_id'])){
// $report_bw_id = Report::where(['yy_id'=>['in',$em['yy_id']]])->column('bw_id');
// if(!in_array($em['bw_id'],$report_bw_id)){ //现象不对,直接扣分
// $yuanyin_socre = 1+$yuanyin_socre;
// $yuanyin_arr[] = $em['yy_id'];
// }else{
//
// }
// }else{
// //部位为空 +1
// $yuanyin_socre = 1+$yuanyin_socre;
// }
//
// //排除方法
// if(!empty($em['pc_id'])){
// $report_pc_id = Report::where(['pc_id'=>['in',$em['pc_id']]])->column('bw_id');
// if(!in_array($em['bw_id'],$report_pc_id)){ //现象不对,直接扣分
// $fangfa_score = 1+$fangfa_score;
// $fangfa_arr[] = $em['pc_id'];
// }else{
//
// }
// }else{
// $fangfa_score = 1+$fangfa_score;
// }
// }
}
// echo "";
// print_r($buwei_arr);
// echo '原因:'.$yuanyin_socre.'
';
// echo '部位:'.$buwei_score.'
';
// echo '现象:'.$xianxian_score;
// die();
$weixiu_score = $xianxian_score+$yuanyin_socre+$buwei_score+$fangfa_score;
if($weixiu_score>15){
$weixiu_score = 15;
}
//是否超时
$overtime_fen = intval((time()-$info['endtime']) / 60);
if($overtime_fen>=10){
$overtime_score = 10;
}else if($overtime_fen>0 && $overtime_fen<10){
$overtime_score = $overtime_fen ;
}else{
$overtime_score =0;
}
$fault_score = $score-$fault_one_score-$fault_two_score-$fault_three_score-$weixiu_score-$overtime_score;
//更新考试结果表
$params['exam_id'] = $ids;
$params['total'] = $fault_score;//得分;
$params['fault_one_score'] = $fault_one_score;//得分;
$params['fault_two_score'] = $fault_two_score;//得分;
$params['fault_three_score'] = $fault_three_score;//得分;
$params['xianxian_score'] = $xianxian_score;//得分;
$params['xianxian_content'] = json_encode($xianxian_content);//错题;
// $params['yuanyin_socre'] = $yuanyin_socre;//得分;
// $params['yuanyin_content'] = !empty($yuanyin_arr) ? json_encode($yuanyin_arr) : '';//错题;
// $params['buwei_score'] = $buwei_score;//得分;
// $params['buwei_content'] = !empty($buwei_arr) ? json_encode($buwei_arr) :'';//错题;
// $params['fangfa_score'] = $fangfa_score;//得分;
// $params['fangfa_content'] = !empty($fangfa_arr) ? json_encode($fangfa_arr):'';//错题;
// $params['jielun_score'] = $jielun_score;//得分;
$params['overtime_score'] = $overtime_score;//得分;
Db::name('real_exam_score')->insert($params);
$this->exam_model->where(['exam_id'=>$ids])->update(['total_score'=>$fault_score]);
Db::commit();
} catch (ValidateException|PDOException|Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
if ($result === false) {
$this->error(__('No rows were inserted'));
}
$this->success('交卷成功,待老师确认成绩','/ZQOtIMLKud.php/student/exam/index');
}
if(empty($row->starttime)){
$row->start_time = date('Y-m-d H:i:s');
$row->starttime = time();
$row->exam_status = 4;
$row->save();
}
$isloading =1;
if(empty($row->other_replace)){
$isloading = 0;
$row->other_replace = '[{"fault_id":"","request_status":"0"}]';
}
$row->other_report_text = !empty($row->other_report) ? json_decode($row->other_report,true) : [];
$other_report_count = !empty($row->other_report) ? count(json_decode($row->other_report,true)) :0;
//还未开始考试
$row->limit_duration = $this->model->where(['exam_collection_id'=>$row['exam_collection_id']])->value('limit_duration');
if(empty($row->starttime)){
$timer = 60*$row->limit_duration;
}else{
$timer = $row->limit_duration*60 - abs(time() - $row->starttime);
}
$row->replace_list =Db::name('real_exam_comp_request')->where(['exam_id'=>$ids])->select();
$this->assignConfig('ids',$ids);
$this->assignConfig('timer',$timer);
$this->assignConfig('isloading',$isloading);
$this->assignConfig('other_report_count',$other_report_count);
$this->view->assign('row', $row);
$departmentdata = [];
$departmentdata = Fault::where(['replace_part'=>1,'sim_type'=>$row->sim_type])->order('fault_id asc')->select();
//更换件数据
$this->view->assign('departmentdata', $departmentdata);
//故障现象
$xianxiang = Fault::where(['fault_type'=>1,'sim_type'=>$row->sim_type])->select();
$this->view->assign('xianxiang', $xianxiang);
//可能原因
$yuanyin = Fault::where(['fault_type'=>2,'sim_type'=>$row->sim_type])->select();
$this->view->assign('yuanyin', $yuanyin);
//故障部位
$buwei = Fault::where(['fault_type'=>3,'sim_type'=>$row->sim_type])->select();
$this->view->assign('buwei', $buwei);
//排除方法
$paichu = Fault::where(['fault_type'=>4,'sim_type'=>$row->sim_type])->select();
$this->view->assign('paichu', $paichu);
return $this->view->fetch();
}
public function replace($ids = null)
{
if ($this->request->isPost()) {
$params = $this->request->post('other_replace','');
$other_report = $this->request->post('other_report','');
$param = json_decode($params,true);
if(!empty($param)){
$faultid_arr = [];
foreach ($param as $key=>$item){
if(!empty($item['fault_id'])){
$isreplace = Db::name('real_exam_comp_request')->where(['exam_id'=>$ids,'fault_id'=>$item['fault_id']])->find();
if(empty($isreplace)){
$add = [
'exam_id'=>$ids,
'fault_id'=>$item['fault_id'],
'request_status'=>1,
'fault_name'=>Db::name('fault')->where('fault_id',$item['fault_id'])->value('replace_name'),
'create_by_user_id'=>$this->auth->id,
'create_by'=>$this->auth->nickname,
'createtime'=>time(),
'updatetime'=>time(),
'create_time'=>date('Y-m-d H:i:s'),
'update_time'=>date('Y-m-d H:i:s'),
];
Db::name('real_exam_comp_request')->insert($add);
$status = 1;
}else{
$status = $isreplace['request_status'];
}
$faultid_arr[] = [
'fault_id'=>$item['fault_id'],
'request_status'=>$status,
];
}
}
unset($item);
$row = $this->exam_model->get($ids);
$row-> other_replace = $faultid_arr ? json_encode($faultid_arr):'';
$row-> other_report = $other_report;
$result = $row->save();
}
$this->success('申请成功,待老师审批');
}
}
/**
* @Notes:添加维修报告
* @Author: jxb
* @Date: 2025/1/21
* @Time: 10:29
*/
public function addreport($ids = null){
$row = $this->exam_model->get($ids);
if(!$row){
$this->error('未找到记录');
}
if ($this->request->isPost()) {
$unwin = $this->request->post('unwin/a');
$arr = [];
if(!empty($unwin)){
$xx_name = Fault::where('fault_id',$unwin['xx_id'])->value('name');
$yy_name = Fault::where('fault_id','in',$unwin['yy_id'])->column('name');
$bw_name = Fault::where('fault_id','in',$unwin['bw_id'])->column('name');
$pc_name = Fault::where('fault_id','in',$unwin['pc_id'])->column('name');
$arr = [
'xh_id' => $unwin['xh_id'],
'xx_id' => $unwin['xx_id'],
'xx_name'=>$xx_name,
'yy_id' => implode(',',$unwin['yy_id']),
'yy_name' => implode(',',$yy_name),
'bw_id' => implode(',',$unwin['bw_id']),
'bw_name' => implode(',',$bw_name),
'pc_id' => implode(',',$unwin['pc_id']),
'pc_name' => implode(',',$pc_name),
];
}
$other_report = !empty($row->other_report) ? json_decode($row->other_report,true) : [];
array_push($other_report,$arr);
$row->other_report = json_encode($other_report);
$row->save();
$this->success();
}
//故障现象
$xianxiang = Fault::where(['fault_type'=>1,'sim_type'=>$row->sim_type])->select();
$this->view->assign('xianxiang', $xianxiang);
//可能原因
$yuanyin = Fault::where(['fault_type'=>2,'sim_type'=>$row->sim_type])->column('fault_id,name');
$this->view->assign('yuanyin', $yuanyin);
//故障部位
$buwei = Fault::where(['fault_type'=>3,'sim_type'=>$row->sim_type])->column('fault_id,name');
$this->view->assign('buwei', $buwei);
//排除方法
$paichu = Fault::where(['fault_type'=>4,'sim_type'=>$row->sim_type])->column('fault_id,name');
$this->view->assign('paichu', $paichu);
$row->other_report_count = 0;
if(!empty($row->other_report)){
$row->other_report_count = count(json_decode($row->other_report,true));
}
$this->view->assign('row', $row);
return $this->view->fetch();
}
/**
* @Notes:编辑报告
* @Author: jxb
* @Date: 2025/1/21
* @Time: 15:04
*/
public function editreport($ids = null,$xh_id = null){
$row = $this->exam_model->get($ids);
if(!$row){
$this->error('未找到记录');
}
if ($this->request->isPost()) {
$unwin = $this->request->post('unwin/a');
if(!empty($unwin)){
$xx_name = Fault::where('fault_id',$unwin['xx_id'])->value('name');
$yy_name = Fault::where('fault_id','in',$unwin['yy_id'])->column('name');
$bw_name = Fault::where('fault_id','in',$unwin['bw_id'])->column('name');
$pc_name = Fault::where('fault_id','in',$unwin['pc_id'])->column('name');
$other_report = !empty($row->other_report) ? json_decode($row->other_report,true) : [];
foreach ($other_report as $k =>$item){
if($k==$xh_id){
$other_report[$k]['xx_id'] =$unwin['xx_id'];
$other_report[$k]['xx_name'] =$xx_name;
$other_report[$k]['yy_id'] = implode(',',$unwin['yy_id']);
$other_report[$k]['yy_name'] =implode(',',$yy_name);
$other_report[$k]['bw_id'] = implode(',',$unwin['bw_id']);
$other_report[$k]['bw_name'] =implode(',',$bw_name);
$other_report[$k]['pc_id'] =implode(',',$unwin['pc_id']);
$other_report[$k]['pc_name'] =implode(',',$pc_name);
}
}
$row->other_report = json_encode($other_report);
$row->save();
}
$this->success();
}
//故障现象
$xianxiang = Fault::where(['fault_type'=>1,'sim_type'=>$row->sim_type])->select();
$this->view->assign('xianxiang', $xianxiang);
//可能原因
$yuanyin = Fault::where(['fault_type'=>2,'sim_type'=>$row->sim_type])->column('fault_id,name');
$this->view->assign('yuanyin', $yuanyin);
//故障部位
$buwei = Fault::where(['fault_type'=>3,'sim_type'=>$row->sim_type])->column('fault_id,name');
$this->view->assign('buwei', $buwei);
//排除方法
$paichu = Fault::where(['fault_type'=>4,'sim_type'=>$row->sim_type])->column('fault_id,name');
$this->view->assign('paichu', $paichu);
$row->other_report_text = [];
if(!empty($row->other_report)){
$other_report = json_decode($row->other_report,true);
foreach ($other_report as $k =>$item){
if($k==$xh_id){
$row->other_report_text = [
'xx_id'=>$item['xx_id'],
'yy_id'=>explode(',',$item['yy_id']),
'bw_id'=>explode(',',$item['bw_id']),
'pc_id'=>explode(',',$item['pc_id']),
'xh_id'=>$item['xh_id']
];
}
}
}
$this->view->assign('row', $row);
return $this->view->fetch();
}
/**
* @Notes:移除 维修报告
* @Author: jxb
* @Date: 2025/1/21
* @Time: 14:45
*/
public function delreport($ids = null){
$row = $this->exam_model->get($ids);
if(!$row){
$this->error('未找到记录');
}
if ($this->request->isPost()) {
$xh_id = $this->request->post('xh_id');
if(!empty($row->other_report)){
$other_report = json_decode($row->other_report,true);
unset($other_report[$xh_id]);
$row->other_report = json_encode($other_report);
$row->save();
}
$this->success();
}
}
public function analysis($ids = null)
{
$row = $this->exam_model->get($ids);
if(!$row){
$this->error('未找到记录');
}
if ($this->request->isPost()) {
$params = $this->request->post('row/a');
//计算总分到学员考试表
$this->success('操作成功','/ZQOtIMLKud.php/student/collection/index');
}
return $this->view->fetch();
}
}