| | |
| | | SELECT |
| | | es.id,es.theory_grade theoryGrade,ifnull(learn_grade,-1) learnGrade,es.user_id userId,es.exam_id examId, |
| | | es.exam_time examTime,all_grade allGrade,exam_end_time examEndTime,qualified,es.candidate_no candidateNo, |
| | | ke.exam_name examName, |
| | | ke.exam_name examName,date_format(ke.start_time,'%Y-%m-%d') startTime,date_format(ke.end_time,'%Y-%m-%d') endTime, |
| | | str.is_exam isExam, |
| | | bu.real_name securityName,company,bu.account,bu.sex,bu.paper_time paperTime,bu.securitynumber securityNumber,bu.avatar, |
| | | bd.dept_name companyName,bu.user_type isPaper |
| | |
| | | <if test="examScore.examType!=null and examScore.examType!=''"> |
| | | and ke.exam_type = #{examScore.examType} |
| | | </if> |
| | | <if test="examScore.examType!=null and examScore.examType!=''"> |
| | | and ke.exam_type = #{examScore.examType} |
| | | <if test="examScore.examId!=null"> |
| | | and es.exam_id = #{examScore.examId} |
| | | </if> |
| | | <if test="examScore.isPaper==6"> |
| | | and bu.user_type = #{examScore.isPaper} |
| | |
| | | <if test="examScore.examDate!=null and examScore.examDate!=''"> |
| | | and date_format(ke.start_time,'%Y-%m-%d') = #{examScore.examDate} |
| | | </if> |
| | | <if test="examScore.sortName!=null and examScore.sortName!=''"> |
| | | <if test="examScore.sortName!=null and examScore.sortName!='' and examScore.sortName!='companyName'"> |
| | | ORDER BY es.${examScore.sortName} ${examScore.sort},es.id desc |
| | | </if> |
| | | <if test="examScore.sortName=='companyName'"> |
| | | ORDER BY bd.dept_name ${examScore.sort},es.id desc |
| | | </if> |
| | | <if test="examScore.sortName==null or examScore.sortName==''"> |
| | | order by es.id desc |
| | |
| | | where |
| | | 1=1 |
| | | and (str.is_exam = 2 or str.is_exam = 3 or str.is_exam = 4) |
| | | <if test="examScore.examName!=null and examScore.examName!=''"> |
| | | <if test="examScore.examName!=null and examScore.examName!='' and examScore.examName!='undefined'"> |
| | | and ke.exam_name like concat('%', #{examScore.examName},'%') |
| | | </if> |
| | | <if test="examScore.companyName!=null and examScore.companyName!=''"> |
| | |
| | | </if> |
| | | <if test="examScore.userId!=null and examScore.userId!=''"> |
| | | and es.user_id = #{examScore.userId} |
| | | </if> |
| | | <if test="examScore.examId!=null and examScore.examId!='undefined'"> |
| | | and es.exam_id = #{examScore.examId} |
| | | </if> |
| | | <if test="examScore.deptId!=null and examScore.deptId!=''"> |
| | | and bd.id = #{examScore.deptId} |
| | |
| | | <if test="examScore.examDate!=null and examScore.examDate!=''"> |
| | | and date_format(ke.start_time,'%Y-%m-%d') = #{examScore.examDate} |
| | | </if> |
| | | <if test="examScore.sortName!=null and examScore.sortName!='' and examScore.sortName!='companyName'"> |
| | | ORDER BY es.${examScore.sortName} ${examScore.sort},es.id desc |
| | | </if> |
| | | <if test="examScore.sortName=='companyName'"> |
| | | ORDER BY bd.dept_name ${examScore.sort},es.id desc |
| | | </if> |
| | | <if test="examScore.sortName==null or examScore.sortName==''"> |
| | | order by es.id desc |
| | | </if> |
| | | </select> |
| | | |
| | | <!--导出-按条件查询成绩数据-模拟考试--> |