|
@@ -33,9 +33,9 @@ public interface ExamStudentRepo extends JpaRepository<ExamStudent, Long>, Query
|
|
|
@Query("select s from ExamStudent s where s.exam.id = ?1 and s.courseCode = ?2 and (s.studentCode = ?3 or s.identityNumber = ?3)")
|
|
|
ExamStudent findFirstByExamId(Long examId,String courseCode,String stuNumber);
|
|
|
|
|
|
- @Query("select count(s) from ExamStudent s where s.rootOrgId=?1 and s.identityNumber = ?2 and s.id != ?3")
|
|
|
- int checkExamStuById(Long rootOrgId,String identityNumber,Long id);
|
|
|
+ @Query("select count(s) from ExamStudent s where s.rootOrgId=?1 and s.identityNumber=?2 and s.courseCode=?3 and s.id <> ?4")
|
|
|
+ int checkExamStuById(Long rootOrgId,String identityNumber,String courseCode,Long id);
|
|
|
|
|
|
- @Query("select count(s) from ExamStudent s where s.rootOrgId=?1 and s.identityNumber = ?2")
|
|
|
- int checkExamStu(Long rootOrgId,String identityNumber);
|
|
|
+ @Query("select count(s) from ExamStudent s where s.rootOrgId=?1 and s.identityNumber=?2 and s.courseCode=?3")
|
|
|
+ int checkExamStu(Long rootOrgId,String identityNumber,String courseCode);
|
|
|
}
|