Browse Source

优化评卷员一览中的总数

nikang 6 years ago
parent
commit
fd32007b4a

+ 1 - 1
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/dao/ExamSubjectDao.java

@@ -25,7 +25,7 @@ public interface ExamSubjectDao extends PagingAndSortingRepository<ExamSubject,
     @Query("select s.category from ExamSubject s where s.pk.examId=?1 and s.category is not null group by s.category")
     public List<String> findDistinctCategory(int examId);
 
-    @Query("select count(s) from ExamSubject s where s.pk.examId=?1")
+    @Query("select count(s) from ExamSubject s where s.pk.examId=?1 and s.subjectiveScore <> 0 and s.libraryCount >0")
     public long countByExamId(int examId);
 
     @Query("select s from ExamSubject s where s.pk.examId=?1 and s.pk.code=?2")