chenken 7 gadi atpakaļ
vecāks
revīzija
1902847faa

+ 2 - 2
exam-work-api/src/main/java/cn/com/qmth/examcloud/service/examwork/service/ExamStudentService.java

@@ -360,7 +360,7 @@ public class ExamStudentService {
 				")");
     	sql.append(" and t1.exam_id="+examCriteria.getExamId());
     	//没设置重考的或者设置了重考,重考已完成的
-    	sql.append(" and (t1.is_reexamine is null 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(getSqlSpecification(examCriteria));
     	sql.append(" limit "+(curPage-1)*pageSize+","+pageSize);
     	
@@ -393,7 +393,7 @@ public class ExamStudentService {
     			")");
     	sql.append(" and t1.exam_id="+examCriteria.getExamId());
     	//没设置重考的或者设置了重考,重考已完成的
-    	sql.append(" and (t1.is_reexamine is null 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(getSqlSpecification(examCriteria));
 		return this.jdbcTemplate.queryForObject(sql.toString(), Integer.class);
 	}