Bläddra i källkod

修改ExamStudentDao的findUnLibraryStudent方法SQL,增加breach=false判断条件

luoshi 6 år sedan
förälder
incheckning
3bad610702

+ 2 - 2
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/dao/ExamStudentDao.java

@@ -96,12 +96,12 @@ public interface ExamStudentDao
 
     public List<ExamStudent> findByExamIdAndSubjectCodeAndUploadTimeNotNull(int examId, String code);
 
-    @Query("select s from ExamStudent s where s.examId=?1 and s.subjectCode=?2 and s.absent=false and s.uploadTime!=null "
+    @Query("select s from ExamStudent s where s.examId=?1 and s.subjectCode=?2 and s.absent=false and s.breach=false and s.uploadTime!=null "
             + "and not exists (select l.id from MarkLibrary l where l.studentId=s.id and l.groupNumber=?3)")
     public List<ExamStudent> findUnLibraryStudent(Integer examId, String subjectCode, Integer groupNumber,
             Pageable page);
 
-    @Query("select s from ExamStudent s where s.examId=?1 and s.subjectCode=?2 and s.absent=false and s.uploadTime!=null and s.uploadTime>=?4 "
+    @Query("select s from ExamStudent s where s.examId=?1 and s.subjectCode=?2 and s.absent=false and s.breach=false and s.uploadTime!=null and s.uploadTime>=?4 "
             + "and not exists (select l.id from MarkLibrary l where l.studentId=s.id and l.groupNumber=?3)")
     public List<ExamStudent> findUnLibraryStudent(Integer examId, String subjectCode, Integer groupNumber,
             Date minUploadTime, Pageable page);