|
@@ -1,6 +1,7 @@
|
|
|
package cn.com.qmth.examcloud.core.oe.student.dao;
|
|
|
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.dao.entity.ExamRecordDataEntity;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
|
import org.springframework.data.jpa.repository.Modifying;
|
|
@@ -8,7 +9,7 @@ import org.springframework.data.jpa.repository.Query;
|
|
|
import org.springframework.stereotype.Repository;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
-import java.util.List;
|
|
|
+import cn.com.qmth.examcloud.core.oe.student.dao.entity.ExamRecordDataEntity;
|
|
|
|
|
|
/**
|
|
|
* @Description 考试记录
|
|
@@ -22,7 +23,7 @@ public interface ExamRecordDataRepo extends JpaRepository<ExamRecordDataEntity,
|
|
|
public List<ExamRecordDataEntity> findByExamStudentId(Long examStudentId);
|
|
|
|
|
|
@Query(value = "select erd.* " +
|
|
|
- "from ec_oe_exam_record_data erd " +
|
|
|
+ "from ec_oes_exam_record_data erd " +
|
|
|
"where erd.exam_record_status in('EXAM_END','EXAM_OVERDUE') " +
|
|
|
"and erd.is_illegality=0 and (is_warn=0 or is_warn=1 and erd.is_audit=1) and erd.exam_student_id in ?1", nativeQuery = true)
|
|
|
public List<ExamRecordDataEntity> findByExamStudentIdList(List<Long> examStudentIdList);
|
|
@@ -40,17 +41,17 @@ public interface ExamRecordDataRepo extends JpaRepository<ExamRecordDataEntity,
|
|
|
*/
|
|
|
@javax.transaction.Transactional
|
|
|
@Modifying
|
|
|
- @Query(nativeQuery = true, value = "update ec_oe_exam_record_data set student_name = ?2,student_code = ?3,info_collector=?4 where exam_student_id = ?1")
|
|
|
+ @Query(nativeQuery = true, value = "update ec_oes_exam_record_data set student_name = ?2,student_code = ?3,info_collector=?4 where exam_student_id = ?1")
|
|
|
public void syncUpdateExamStudentInfo(Long examStudentId, String studentName, String studentCode, String infoCollector);
|
|
|
|
|
|
@javax.transaction.Transactional
|
|
|
@Modifying
|
|
|
- @Query(nativeQuery = true, value = "update ec_oe_exam_record_data set student_name = ?2 where student_id = ?1")
|
|
|
+ @Query(nativeQuery = true, value = "update ec_oes_exam_record_data set student_name = ?2 where student_id = ?1")
|
|
|
public void updateStudentName(Long studentId, String studentName);
|
|
|
|
|
|
@javax.transaction.Transactional
|
|
|
@Modifying
|
|
|
- @Query(nativeQuery = true, value = "update ec_oe_exam_record_data set course_level = ?2 where course_id = ?1")
|
|
|
+ @Query(nativeQuery = true, value = "update ec_oes_exam_record_data set course_level = ?2 where course_id = ?1")
|
|
|
public void updateCourse(Long courseId, String courseLevel);
|
|
|
|
|
|
/**
|
|
@@ -59,7 +60,7 @@ public interface ExamRecordDataRepo extends JpaRepository<ExamRecordDataEntity,
|
|
|
* @param studentId
|
|
|
* @return
|
|
|
*/
|
|
|
- @Query(value = " select * from ec_oe_exam_record_data t1 " +
|
|
|
+ @Query(value = " select * from ec_oes_exam_record_data t1 " +
|
|
|
" where t1.student_id = ?1 " +
|
|
|
" and t1.exam_record_status = 'EXAM_ING' " +
|
|
|
" and t1.exam_type = 'ONLINE'", nativeQuery = true)
|
|
@@ -74,7 +75,7 @@ public interface ExamRecordDataRepo extends JpaRepository<ExamRecordDataEntity,
|
|
|
*/
|
|
|
@Transactional
|
|
|
@Modifying
|
|
|
- @Query(value = "update ec_oe_exam_record_data set exam_record_questions_id=?1 where id=?2", nativeQuery = true)
|
|
|
+ @Query(value = "update ec_oes_exam_record_data set exam_record_questions_id=?1 where id=?2", nativeQuery = true)
|
|
|
int updateExamRecordDataQuestionIdById(String examRecordQuestionId, Long id);
|
|
|
|
|
|
/**
|
|
@@ -86,11 +87,19 @@ public interface ExamRecordDataRepo extends JpaRepository<ExamRecordDataEntity,
|
|
|
*/
|
|
|
@Transactional
|
|
|
@Modifying
|
|
|
- @Query(value = "update ec_oe_exam_record_data set face_verify_result = ?1 where student_id = ?2", nativeQuery = true)
|
|
|
+ @Query(value = "update ec_oes_exam_record_data set face_verify_result = ?1 where student_id = ?2", nativeQuery = true)
|
|
|
int updateFaceVerifyResult(String faceVerifyResult, Long id);
|
|
|
|
|
|
- @Query(value = "select * from ec_oe_exam_record_data " +
|
|
|
+ @Query(value = "select * from ec_oes_exam_record_data " +
|
|
|
"where exam_record_status in('EXAM_END','EXAM_OVERDUE') and is_illegality=0 and (is_warn=0 or is_warn=1 and is_audit=1) " +
|
|
|
"and exam_id=?1 and id>=?2 order by id asc limit ?3", nativeQuery = true)
|
|
|
List<ExamRecordDataEntity> findLimitedDataByExamIdAndIdMoreThan(Long examId, Long startExamRecordId, int rowCount);
|
|
|
+
|
|
|
+
|
|
|
+ @Query(value = "select * from ec_oes_exam_record_data where batch_num!=?1 and id>?2 order by id limit ?3",nativeQuery = true)
|
|
|
+ List<ExamRecordDataEntity> getLimitExamRecordDataList(Long batchNum, Long startId, Integer size);
|
|
|
+
|
|
|
+ @Modifying
|
|
|
+ @Query(value = "update ec_oes_exam_record_data set batch_num=?1 where id=?2", nativeQuery = true)
|
|
|
+ int updateBatchNumById(Long batchNum, Long id);
|
|
|
}
|