wangliang 1 년 전
부모
커밋
d037d47677
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TIeReportServiceImpl.java

+ 8 - 1
themis-business/src/main/java/com/qmth/themis/business/service/impl/TIeReportServiceImpl.java

@@ -90,7 +90,14 @@ public class TIeReportServiceImpl implements TIeReportService {
         // 缺考人数
         Integer examTotal = 0, actualExamTotal = 0, absentNum = 0;
         ExamCacheBean exam = examService.getExamCacheBean(examId);
-        List<TEExamSummary> teExamSummaryList = themisCacheService.getExamSummaryCache(examId, examActivityId, roomCode);
+        List<TEExamSummary> teExamSummaryList = null;
+        if (Objects.nonNull(examId)) {
+            teExamSummaryList = themisCacheService.getExamSummaryCache(examId);
+        } else if (Objects.nonNull(examId) && Objects.nonNull(examActivityId)) {
+            teExamSummaryList = themisCacheService.getExamSummaryCache(examId, examActivityId);
+        } else if (Objects.nonNull(examId) && Objects.nonNull(examActivityId) && Objects.nonNull(roomCode)) {
+            teExamSummaryList = themisCacheService.getExamSummaryCache(examId, examActivityId, roomCode);
+        }
         for (TEExamSummary t : teExamSummaryList) {
             examTotal = examTotal + t.getTotalCount();
             absentNum = absentNum + t.getAbsentCount();