|
@@ -56,16 +56,13 @@ public class QuartzLogicServiceImpl implements QuartzLogicService {
|
|
Map<String, Object> objectMap = redisUtil.getHashEntries(RedisKeyHelper.examActivityRecordCacheKey(teExamActivity.getId()));
|
|
Map<String, Object> objectMap = redisUtil.getHashEntries(RedisKeyHelper.examActivityRecordCacheKey(teExamActivity.getId()));
|
|
if (Objects.nonNull(objectMap) && objectMap.size() > 0) {
|
|
if (Objects.nonNull(objectMap) && objectMap.size() > 0) {
|
|
objectMap.forEach((k, v) -> {
|
|
objectMap.forEach((k, v) -> {
|
|
- ExamRecordStatusEnum examRecordStatusEnum = ExamRecordStatusEnum.valueOf(String.valueOf(v));
|
|
|
|
|
|
+ ExamRecordStatusEnum examRecordStatusEnum = (ExamRecordStatusEnum) v;
|
|
//获取该考试批次下所有未交卷的考生的考试记录
|
|
//获取该考试批次下所有未交卷的考生的考试记录
|
|
- if (!Objects.equals(ExamRecordStatusEnum.FINISHED.name(), examRecordStatusEnum.name())) {
|
|
|
|
|
|
+ if (!Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum)) {
|
|
Long recordId = Long.parseLong(k);
|
|
Long recordId = Long.parseLong(k);
|
|
Map<String, Object> recordObjectMap = redisUtil.getHashEntries(RedisKeyHelper.examRecordCacheKey(recordId));
|
|
Map<String, Object> recordObjectMap = redisUtil.getHashEntries(RedisKeyHelper.examRecordCacheKey(recordId));
|
|
Integer durationSeconds = Integer.parseInt(String.valueOf(recordObjectMap.get("durationSeconds")));
|
|
Integer durationSeconds = Integer.parseInt(String.valueOf(recordObjectMap.get("durationSeconds")));
|
|
Long studentId = Long.parseLong(String.valueOf(recordObjectMap.get("studentId")));
|
|
Long studentId = Long.parseLong(String.valueOf(recordObjectMap.get("studentId")));
|
|
- recordObjectMap.put("status", ExamRecordStatusEnum.FINISHED);
|
|
|
|
- recordObjectMap.put("finishTime", new Date());
|
|
|
|
- recordObjectMap.put("finishType", FinishTypeEnum.AUTO);
|
|
|
|
//交卷
|
|
//交卷
|
|
teExamService.finish(studentId, recordId, FinishTypeEnum.AUTO.name(), durationSeconds);
|
|
teExamService.finish(studentId, recordId, FinishTypeEnum.AUTO.name(), durationSeconds);
|
|
}
|
|
}
|