wangliang 4 жил өмнө
parent
commit
603166b968

+ 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 {