0) { $class_data = $this->schoolManager->getSchoolByGrade($grade,$this->semesterId); if($class_data) { foreach($class_data as $v) { $class_ids[$v['class_id']] = $v['class_id']; } $exam_class_data = $this->schoolManager->getClassIdByExam($class_ids); if($exam_class_data) { foreach($exam_class_data as $v) { $s_exam_ids[$v['exam_id']] = $v['exam_id']; } } unset($exam_class_data); } unset($class_data); } if($s_exam_ids) { $condition[] = "e.exam_id in (".implode(',',$s_exam_ids).")"; } $condition[] = "e.subject_id in (".implode(',',$this->mathSubjectId).")"; // 考试名称条件 if($exam_name) { $condition[] = "e.name like '%{$exam_name}%'"; } $condition[] = "eg.create_type in (0,1,2,3,5,6) "; $condition[] = "eg.status = 2 "; //获取考试列表 $exam_list = $this->schoolManager->getExamGroupList($condition,array('e.create_time desc'),10); //mark_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0:线下阅卷、1:按题阅卷、2:按人阅卷、3:班级混合阅卷、4:班级单独阅卷', //获取打印班级 $exam_group_ids = array(); $exam_ids = array(); if($exam_list) { $StudentPaperRelation=new SStudentPaperRelation(); $ExamModel=new Exam(); foreach($exam_list['rs'] as $key=>$v) { $exam_group_ids[] = $v['exam_group_id']; $teacher_name = ''; $exam_time = ''; if(isset($v['tpl_data']) && $v['tpl_data']){ $tpl_data = json_decode($v['tpl_data'],1); $exam_time = isset($tpl_data['examDate'])?$tpl_data['examDate']:''; $teacher_name = isset($tpl_data['author'])?$tpl_data['author']:''; } unset($v['tpl_data']); $v['teacher_name'] = $teacher_name; $v['exam_time'] = $exam_time; $examIds=$ExamModel->getExamIds($v['exam_group_id']); $v['stu_num']=0; $v['isp_loaded_num']=0; $v['class_count']=count($examIds); $v['upload_count']=0; if($examIds){ $v['upload_count']=$this->schoolManager->getSuperviseStudentByExamId($examIds); $studentList=$StudentPaperRelation->getStudentExamInfo($examIds); foreach ($studentList as $value){ if($value['is_three_isp_download'] == 1 || $value['is_two_isp_download'] == 1){ $v['isp_loaded_num']++; } $v['stu_num']++; } } $exam_list['rs'][$key] = $v; } } // 获取多学科状态 $data['pages'] = $exam_list['pager']; $data['page_total'] = $exam_list['pager']->rowsCount; $data['exam_group_list'] = $exam_list['rs']; $data['exam_class'] = $_exam_group_ids; $data["grade"] = $grade; $data["exam_name"] = $exam_name; $data["paper"] = $paper_arr; $data["class_grade"] = $class_grade_arr; $this->render('list',$data); } }