|
@@ -204,13 +204,21 @@ public class TEStudentController {
|
|
|
Integer leftBreakResumeCount = Objects.isNull(ExamRecordCacheUtil.getLeftBreakResumeCount(recordId)) ? 0 : ExamRecordCacheUtil.getLeftBreakResumeCount(recordId);
|
|
|
//如果断点时间大于整体断点时间,则强制交卷
|
|
|
if (Objects.nonNull(clientLastSyncTime) && (System.currentTimeMillis() - clientLastSyncTime.getTime() / 1000) > ec.getBreakExpireSeconds()) {
|
|
|
- teExamService.finish(examStudentId, recordId, FinishTypeEnum.AUTO.name(), durationSeconds);
|
|
|
+ teExamService.finish(teStudentCacheDto.getId(), recordId, FinishTypeEnum.AUTO.name(), durationSeconds);
|
|
|
+ List<TEExamDto> list = teExamService.getWaitingExam(teStudent.getId(), examId, orgId);
|
|
|
+ if (Objects.nonNull(list) && list.size() > 0) {
|
|
|
+ map.put("waiting", list);
|
|
|
+ }
|
|
|
} else {//否则断点次数减1
|
|
|
leftBreakResumeCount--;
|
|
|
leftBreakResumeCount = leftBreakResumeCount <= 0 ? 0 : leftBreakResumeCount;
|
|
|
//如果断点次数超过了考试整体断点次数,也强制交卷
|
|
|
if (leftBreakResumeCount < ec.getBreakResumeCount()) {
|
|
|
- teExamService.finish(examStudentId, recordId, FinishTypeEnum.AUTO.name(), durationSeconds);
|
|
|
+ teExamService.finish(teStudentCacheDto.getId(), recordId, FinishTypeEnum.AUTO.name(), durationSeconds);
|
|
|
+ List<TEExamDto> list = teExamService.getWaitingExam(teStudent.getId(), examId, orgId);
|
|
|
+ if (Objects.nonNull(list) && list.size() > 0) {
|
|
|
+ map.put("waiting", list);
|
|
|
+ }
|
|
|
} else {
|
|
|
//更新考试记录
|
|
|
objectMap.put("status", ExamRecordStatusEnum.RESUME_PREPARE.name());
|
|
@@ -221,12 +229,12 @@ public class TEStudentController {
|
|
|
//发送mq,增加断点次数记录
|
|
|
MqDto mqDto = new MqDto(MqTopicEnum.themisTopic.getCode(), MqTagEnum.examBreakHistory.name(), JacksonUtil.parseJson(objectMap), MqEnum.EXAM_BREAK, String.valueOf(recordId), "增加断点记录");
|
|
|
mqDtoService.assembleSendOneWayMsg(mqDto);
|
|
|
+ Map finalMap = new HashMap();
|
|
|
+ finalMap.put("waiting", ec);
|
|
|
+ finalMap.put("activity", objectMap);
|
|
|
+ map.put("unFinished", finalMap);
|
|
|
}
|
|
|
}
|
|
|
- Map finalMap = new HashMap();
|
|
|
- finalMap.put("waiting", ec);
|
|
|
- finalMap.put("activity", objectMap);
|
|
|
- map.put("unFinished", finalMap);
|
|
|
}
|
|
|
//获取全局考试配置
|
|
|
TEConfig teConfig = teConfigService.getGlobalConfig();
|