Jelajahi Sumber

奥鹏特定excel导出样式开发

nikang 7 tahun lalu
induk
melakukan
8ef37354a0

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

@@ -90,5 +90,11 @@ public interface ExamStudentDao
 
 	public ExamStudent findByExamIdAndSubjectCodeStartingWithAndStudentCode(Integer examId,
 			String subjectCode, String studentCode);
+	
+	@Query(value="select s.id from eb_exam_student s where 1=1 and s.id in (select m.student_id from m_library m where 1=1 and m.marker_id in (select m.id from eb_marker m where 1=1 and m.login_name = ?1 ))",nativeQuery=true)
+    public List<String[]> findIdsByMarkLogin(String markLogin);
+        
+    @Query(value="select s.id from eb_exam_student s where 1=1 and s.id in (select m.student_id from m_library m where 1=1 and m.marker_id in (select m.id from eb_marker m where 1=1 and m.name = ?1))",nativeQuery=true)
+    public List<String[]> findIdsByMarkName(String markName);
 
 }

+ 3 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/dao/MarkerDao.java

@@ -37,4 +37,7 @@ public interface MarkerDao extends PagingAndSortingRepository<Marker, Integer>,
     @Modifying
     @Query("delete from Marker m where m.examId=?1")
     public void deleteByExamId(int examId);
+    
+    @Query(value="select e.* from eb_marker e,m_library m where 1=1 and e.id = m.marker_id and m.student_id =?1",nativeQuery=true)
+    public Marker findByStudentId(int studentId);
 }