wangliang 4 年之前
父节点
当前提交
603166b968
共有 1 个文件被更改,包括 3 次插入5 次删除
  1. 3 5
      themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateController.java

+ 3 - 5
themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateController.java

@@ -501,11 +501,9 @@ public class TIeInvigilateController {
                 List<TEExamBreachLog> finalTeExamBreachLogList = teExamBreachLogList;
                 for (int i = 0; i < recordIdList.size(); i++) {
                     Long l = Long.parseLong(String.valueOf(recordIdList.get(i)));
-                    Long examId = ExamRecordCacheUtil.getExamId(l);
-                    Long examStudentId = null;
-                    Long examActivityId = null;
+                    Long examId = null, examStudentId = null, examActivityId = null;
                     TOeExamRecord tOeExamRecord = null;
-                    if (Objects.isNull(examId)) {
+                    if (Objects.isNull(ExamRecordCacheUtil.getId(l))) {
                         tOeExamRecord = tOeExamRecordService.getById(l);
                         examId = tOeExamRecord.getExamId();
                         examStudentId = tOeExamRecord.getExamStudentId();
@@ -518,7 +516,7 @@ public class TIeInvigilateController {
                     TEExamBreachLog teExamBreachLog = new TEExamBreachLog(examId, examActivityId, l, examStudentId, type.name(), description, status);
                     teExamBreachLog.setCreateId(tbUser.getId());
                     finalTeExamBreachLogList.add(teExamBreachLog);
-                    if (Objects.nonNull(ExamRecordCacheUtil.getId(l)) && Objects.nonNull(tOeExamRecord)) {
+                    if (Objects.nonNull(ExamRecordCacheUtil.getId(l))) {
                         ExamRecordCacheUtil.setBreachStatus(l, status);
                         tOeExamRecordService.sendExamRecordDataSaveMq(l, System.currentTimeMillis());
                     } else {