浏览代码

优化评卷员一览中的总数

nikang 6 年之前
父节点
当前提交
fd32007b4a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/dao/ExamSubjectDao.java

+ 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")