|
@@ -6,6 +6,7 @@ import cn.com.qmth.examcloud.core.oe.student.dao.ExamRecordDataRepo;
|
|
import cn.com.qmth.examcloud.core.oe.student.dao.entity.ExamRecordDataEntity;
|
|
import cn.com.qmth.examcloud.core.oe.student.dao.entity.ExamRecordDataEntity;
|
|
import cn.com.qmth.examcloud.core.oe.task.service.ExamRecordDataService;
|
|
import cn.com.qmth.examcloud.core.oe.task.service.ExamRecordDataService;
|
|
import cn.com.qmth.examcloud.core.oe.task.service.ExamingSessionService;
|
|
import cn.com.qmth.examcloud.core.oe.task.service.ExamingSessionService;
|
|
|
|
+import cn.com.qmth.examcloud.support.CacheConstants;
|
|
import cn.com.qmth.examcloud.support.Constants;
|
|
import cn.com.qmth.examcloud.support.Constants;
|
|
import cn.com.qmth.examcloud.support.enums.ExamRecordStatus;
|
|
import cn.com.qmth.examcloud.support.enums.ExamRecordStatus;
|
|
import cn.com.qmth.examcloud.support.enums.HandInExamType;
|
|
import cn.com.qmth.examcloud.support.enums.HandInExamType;
|
|
@@ -100,7 +101,7 @@ public class BeforeHandInExamJobHandler {
|
|
private void handler(Long examRecordDataId) throws Exception {
|
|
private void handler(Long examRecordDataId) throws Exception {
|
|
ExamRecordData examRecordDataCache = examRecordDataService.getExamRecordDataCache(examRecordDataId);
|
|
ExamRecordData examRecordDataCache = examRecordDataService.getExamRecordDataCache(examRecordDataId);
|
|
if (examRecordDataCache == null) {
|
|
if (examRecordDataCache == null) {
|
|
- log.warn("redisKey OE_ERD:{} value not exist, Set examRecordStatus=EXAM_ERROR", examRecordDataId);
|
|
|
|
|
|
+ log.warn("redisKey {}{} value not exist, Set examRecordStatus=EXAM_ERROR", CacheConstants.CACHE_OE_RECORD, examRecordDataId);
|
|
examRecordDataRepo.updateExamRecordStatusById(ExamRecordStatus.EXAM_ERROR, new Date(), examRecordDataId);
|
|
examRecordDataRepo.updateExamRecordStatusById(ExamRecordStatus.EXAM_ERROR, new Date(), examRecordDataId);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -123,7 +124,8 @@ public class BeforeHandInExamJobHandler {
|
|
ExamingSession examingSession = examingSessionService.getExamingSession(examRecordDataCache.getStudentId());
|
|
ExamingSession examingSession = examingSessionService.getExamingSession(examRecordDataCache.getStudentId());
|
|
if (examingSession == null) {
|
|
if (examingSession == null) {
|
|
// 考试会话不存在,则自动交卷
|
|
// 考试会话不存在,则自动交卷
|
|
- log.warn("redisKey OE_SESSION:{} value not exist, do autoHandInExam, examRecordDataId:{}", examRecordDataCache.getStudentId(), examRecordDataId);
|
|
|
|
|
|
+ log.warn("redisKey {}{} value not exist, do autoHandInExam, examRecordDataId:{}",
|
|
|
|
+ CacheConstants.CACHE_OE_SESSION, examRecordDataCache.getStudentId(), examRecordDataId);
|
|
this.autoHandInExam(examRecordDataCache);
|
|
this.autoHandInExam(examRecordDataCache);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -153,7 +155,7 @@ public class BeforeHandInExamJobHandler {
|
|
|
|
|
|
long activeTime;
|
|
long activeTime;
|
|
if (activeTimeCache == null) {
|
|
if (activeTimeCache == null) {
|
|
- log.warn("redisKey OE_ACTIVE:{} value not exist, examReconnectTime:{} minutes",
|
|
|
|
|
|
+ log.warn("redisKey {}{} value not exist, examReconnectTime:{} minutes", CacheConstants.CACHE_OE_ACTIVE,
|
|
examingSession.getExamRecordDataId(), examingSession.getExamReconnectTime());
|
|
examingSession.getExamRecordDataId(), examingSession.getExamReconnectTime());
|
|
activeTime = System.currentTimeMillis();
|
|
activeTime = System.currentTimeMillis();
|
|
} else {
|
|
} else {
|