|
@@ -394,12 +394,11 @@ public class ExamStudentService {
|
|
+ "t1.student_code student_code,"
|
|
+ "t1.student_code student_code,"
|
|
+ "t1.identity_number identity_number"
|
|
+ "t1.identity_number identity_number"
|
|
+ " from ecs_exam_student t1 "
|
|
+ " from ecs_exam_student t1 "
|
|
- + " where t1.normal_exam_times >= ( "+
|
|
|
|
- " select t2.exam_times from ecs_exam t2 where t2.id = t1.exam_id "+
|
|
|
|
- ")");
|
|
|
|
- sql.append(" and t1.exam_id="+examCriteria.getExamId());
|
|
|
|
|
|
+ + " where t1.exam_id="+examCriteria.getExamId());
|
|
|
|
+ sql.append(" and t1.normal_exam_times >= ( select t2.exam_times from ecs_exam t2 where t2.id = t1.exam_id ) ");
|
|
//没设置重考的或者设置了重考,重考已完成的
|
|
//没设置重考的或者设置了重考,重考已完成的
|
|
sql.append(" and ((t1.is_reexamine is null OR t1.is_reexamine = 0) OR (t1.is_reexamine = 1 and t1.reexamine_completed = 1)) ");
|
|
sql.append(" and ((t1.is_reexamine is null OR t1.is_reexamine = 0) OR (t1.is_reexamine = 1 and t1.reexamine_completed = 1)) ");
|
|
|
|
+ sql.append(" and NOT EXISTS ( select * from oe_exam_record t3 where t3.exam_student_id = t1.id and t3.status = 'EXAM_ING') ");
|
|
sql.append(getSqlSpecification(examCriteria));
|
|
sql.append(getSqlSpecification(examCriteria));
|
|
sql.append(" limit "+(curPage-1)*pageSize+","+pageSize);
|
|
sql.append(" limit "+(curPage-1)*pageSize+","+pageSize);
|
|
|
|
|
|
@@ -433,6 +432,7 @@ public class ExamStudentService {
|
|
sql.append(" and t1.exam_id="+examCriteria.getExamId());
|
|
sql.append(" and t1.exam_id="+examCriteria.getExamId());
|
|
//没设置重考的或者设置了重考,重考已完成的
|
|
//没设置重考的或者设置了重考,重考已完成的
|
|
sql.append(" and ((t1.is_reexamine is null OR t1.is_reexamine = 0) OR (t1.is_reexamine = 1 and t1.reexamine_completed = 1)) ");
|
|
sql.append(" and ((t1.is_reexamine is null OR t1.is_reexamine = 0) OR (t1.is_reexamine = 1 and t1.reexamine_completed = 1)) ");
|
|
|
|
+ sql.append(" and NOT EXISTS ( select * from oe_exam_record t3 where t3.exam_student_id = t1.id and t3.status = 'EXAM_ING') ");
|
|
sql.append(getSqlSpecification(examCriteria));
|
|
sql.append(getSqlSpecification(examCriteria));
|
|
return this.jdbcTemplate.queryForObject(sql.toString(), Integer.class);
|
|
return this.jdbcTemplate.queryForObject(sql.toString(), Integer.class);
|
|
}
|
|
}
|