|
@@ -1,15 +1,17 @@
|
|
|
package cn.com.qmth.stmms.biz.exam.dao;
|
|
|
|
|
|
-import cn.com.qmth.stmms.biz.exam.model.ExamStudent;
|
|
|
-import cn.com.qmth.stmms.common.enums.SubjectiveStatus;
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
|
import org.springframework.data.jpa.repository.Modifying;
|
|
|
import org.springframework.data.jpa.repository.Query;
|
|
|
import org.springframework.data.repository.PagingAndSortingRepository;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
+import cn.com.qmth.stmms.biz.exam.model.ExamStudent;
|
|
|
+import cn.com.qmth.stmms.common.enums.SubjectiveStatus;
|
|
|
|
|
|
public interface ExamStudentDao extends PagingAndSortingRepository<ExamStudent, Integer>,
|
|
|
JpaSpecificationExecutor<ExamStudent> {
|
|
@@ -170,18 +172,20 @@ public interface ExamStudentDao extends PagingAndSortingRepository<ExamStudent,
|
|
|
@Query("select s.className from ExamStudent s where s.examId=?1 and s.subjectCode=?2 group by s.className")
|
|
|
public List<String> findDistinctClassName(Integer examId, String subjectCode);
|
|
|
|
|
|
- @Query(value = "select cast(s.objective_score as decimal(10,3))+cast(s.subjective_score as decimal(10,3)) from eb_exam_student s where s.exam_id=?1 and s.subject_code=?2 and s.is_upload =true and s.is_absent=false and s.is_breach=false order by cast(s.objective_score as decimal)+cast(s.subjective_score as decimal) desc limit ?3 ", nativeQuery = true)
|
|
|
- public List<Double> findHighCountTotalSocreByExamIdAndSubjectCode(Integer examId, String subjectCode, int highCount);
|
|
|
+ @Query(value = "select cast(s.objective_score as decimal(10,3))+cast(s.subjective_score as decimal(10,3)) from eb_exam_student s where s.exam_id=?1 and s.subject_code=?2 and s.is_upload =true and s.is_absent=false and s.is_breach=false order by cast(s.objective_score as decimal(10,3))+cast(s.subjective_score as decimal(10,3)) desc limit ?3 ", nativeQuery = true)
|
|
|
+ public List<BigDecimal> findHighCountTotalSocreByExamIdAndSubjectCode(Integer examId, String subjectCode,
|
|
|
+ int highCount);
|
|
|
|
|
|
- @Query(value = "select cast(s.objective_score as decimal(10,3))+cast(s.subjective_score as decimal(10,3)) from eb_exam_student s where s.exam_id=?1 and s.subject_code=?2 and s.is_upload =true and s.is_absent=false and s.is_breach=false order by cast(s.objective_score as decimal)+cast(s.subjective_score as decimal) asc limit ?3 ", nativeQuery = true)
|
|
|
- public List<Double> findLowCountTotalSocreByExamIdAndSubjectCode(Integer examId, String subjectCode, int lowCount);
|
|
|
+ @Query(value = "select cast(s.objective_score as decimal(10,3))+cast(s.subjective_score as decimal(10,3)) from eb_exam_student s where s.exam_id=?1 and s.subject_code=?2 and s.is_upload =true and s.is_absent=false and s.is_breach=false order by cast(s.objective_score as decimal(10,3))+cast(s.subjective_score as decimal(10,3)) asc limit ?3 ", nativeQuery = true)
|
|
|
+ public List<BigDecimal> findLowCountTotalSocreByExamIdAndSubjectCode(Integer examId, String subjectCode,
|
|
|
+ int lowCount);
|
|
|
|
|
|
- @Query(value = "select cast(s.objective_score as decimal(10,3))+cast(s.subjective_score as decimal(10,3)) from eb_exam_student s where s.exam_id=?1 and s.subject_code=?2 and s.class_name=?3 and s.is_upload =true and s.is_absent=false and s.is_breach=false order by cast(s.objective_score as decimal)+cast(s.subjective_score as decimal) desc limit ?4 ", nativeQuery = true)
|
|
|
- public List<Double> findHighCountTotalSocreByExamIdAndSubjectCodeAndClass(Integer examId, String subjectCode,
|
|
|
+ @Query(value = "select cast(s.objective_score as decimal(10,3))+cast(s.subjective_score as decimal(10,3)) from eb_exam_student s where s.exam_id=?1 and s.subject_code=?2 and s.class_name=?3 and s.is_upload =true and s.is_absent=false and s.is_breach=false order by cast(s.objective_score as decimal(10,3))+cast(s.subjective_score as decimal(10,3)) desc limit ?4 ", nativeQuery = true)
|
|
|
+ public List<BigDecimal> findHighCountTotalSocreByExamIdAndSubjectCodeAndClass(Integer examId, String subjectCode,
|
|
|
String className, int highCount);
|
|
|
|
|
|
- @Query(value = "select cast(s.objective_score as decimal(10,3))+cast(s.subjective_score as decimal(10,3)) from eb_exam_student s where s.exam_id=?1 and s.subject_code=?2 and s.class_name=?3 and s.is_upload =true and s.is_absent=false and s.is_breach=false order by cast(s.objective_score as decimal)+cast(s.subjective_score as decimal) asc limit ?4 ", nativeQuery = true)
|
|
|
- public List<Double> findLowCountTotalSocreByExamIdAndSubjectCodeAndClass(Integer examId, String subjectCode,
|
|
|
+ @Query(value = "select cast(s.objective_score as decimal(10,3))+cast(s.subjective_score as decimal(10,3)) from eb_exam_student s where s.exam_id=?1 and s.subject_code=?2 and s.class_name=?3 and s.is_upload =true and s.is_absent=false and s.is_breach=false order by cast(s.objective_score as decimal(10,3))+cast(s.subjective_score as decimal(10,3)) asc limit ?4 ", nativeQuery = true)
|
|
|
+ public List<BigDecimal> findLowCountTotalSocreByExamIdAndSubjectCodeAndClass(Integer examId, String subjectCode,
|
|
|
String className, int lowCount);
|
|
|
|
|
|
@Query("select s.className from ExamStudent s where s.examId=?1 group by s.className")
|