Selaa lähdekoodia

考试统计修改

wangliang 1 vuosi sitten
vanhempi
commit
ccb01a0852

+ 4 - 4
themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamController.java

@@ -480,11 +480,11 @@ public class TEExamController {
         }
 
         List<TEExamSummary> teExamSummaryAllList = new ArrayList<>();
-        for (String s : roomCodeSet) {
-            teExamSummaryAllList.addAll(themisCacheService.addExamSummaryCache(examId, examActivityId, s));
+        if (Objects.nonNull(examActivityId)) {
+            for (String s : roomCodeSet) {
+                teExamSummaryAllList.addAll(themisCacheService.addExamSummaryCache(examId, examActivityId, s));
+            }
         }
-//        themisCacheService.addExamSummaryCache(444861201752002560L, 444861202175627264L, "01");
-//        themisCacheService.updateExamSummaryCache(444861201752002560L, 444861202175627264L, "01");
         ExamPropCountDto examPropCountDto = new ExamPropCountDto(examId, 0, 0, 0, 0, 0, new BigDecimal(0));
         if (!CollectionUtils.isEmpty(teExamSummaryAllList)) {
             Integer allCount = 0, prepareCount = 0, examCount = 0, alreadyComplete = 0, notComplete = 0;