|
@@ -227,25 +227,26 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
TEStudentCacheDto teStudentCacheDto = (TEStudentCacheDto) redisUtil.getStudent(es.getStudentId());
|
|
|
if (teStudentCacheDto.getUnFinishedRecordId() != null) {
|
|
|
Long recordId = teStudentCacheDto.getUnFinishedRecordId();
|
|
|
-
|
|
|
- ExamPaperCacheBean ep = teExamPaperService.getExamPaperCacheBean(ExamRecordCacheUtil.getPaperId(recordId));
|
|
|
- ExamCourseCacheBean ec = teExamCourseService.getExamCourseCacheBean(es.getExamId(), es.getCourseCode());
|
|
|
- ExamPrepareBean prepare = new ExamPrepareBean();
|
|
|
- prepare.setRecordId(recordId);
|
|
|
- prepare.setAudioPlayCount(ep.getAudioPlayCount());
|
|
|
- prepare.setHasAudio((ep.getHasAudio() == null || ep.getHasAudio().intValue() == 0 ? false : true));
|
|
|
- prepare.setObjectiveShuffle(
|
|
|
- (ec.getObjectiveShuffle() == null || ec.getObjectiveShuffle().intValue() == 0 ? false : true));
|
|
|
- prepare.setOptionShuffle(
|
|
|
- (ec.getOptionShuffle() == null || ec.getOptionShuffle().intValue() == 0 ? false : true));
|
|
|
- String paperurl = OssUtil.getUrlForPrivateBucket(systemConfig.getOssEnv(3), ep.getPaperPath());
|
|
|
- String structurl = OssUtil.getUrlForPrivateBucket(systemConfig.getOssEnv(3), ep.getStructPath());
|
|
|
- prepare.setPaperUrl(paperurl);
|
|
|
- prepare.setStructUrl(structurl);
|
|
|
- prepare.setMonitorKey(ExamRecordCacheUtil.getMonitorKey(recordId));
|
|
|
- prepare.setMonitorUserId("s_" + tbSession.getId());
|
|
|
- prepare.setMonitorUserSig(tencentYunUtil.getSign(prepare.getMonitorUserId(), SystemConstant.TENCENT_EXPIRE_TIME));
|
|
|
- return prepare;
|
|
|
+ if(examStudentId.equals(ExamRecordCacheUtil.getExamStudentId(recordId))) {//当前考生已存在候考的考试记录
|
|
|
+ ExamPaperCacheBean ep = teExamPaperService.getExamPaperCacheBean(ExamRecordCacheUtil.getPaperId(recordId));
|
|
|
+ ExamCourseCacheBean ec = teExamCourseService.getExamCourseCacheBean(es.getExamId(), es.getCourseCode());
|
|
|
+ ExamPrepareBean prepare = new ExamPrepareBean();
|
|
|
+ prepare.setRecordId(recordId);
|
|
|
+ prepare.setAudioPlayCount(ep.getAudioPlayCount());
|
|
|
+ prepare.setHasAudio((ep.getHasAudio() == null || ep.getHasAudio().intValue() == 0 ? false : true));
|
|
|
+ prepare.setObjectiveShuffle(
|
|
|
+ (ec.getObjectiveShuffle() == null || ec.getObjectiveShuffle().intValue() == 0 ? false : true));
|
|
|
+ prepare.setOptionShuffle(
|
|
|
+ (ec.getOptionShuffle() == null || ec.getOptionShuffle().intValue() == 0 ? false : true));
|
|
|
+ String paperurl = OssUtil.getUrlForPrivateBucket(systemConfig.getOssEnv(3), ep.getPaperPath());
|
|
|
+ String structurl = OssUtil.getUrlForPrivateBucket(systemConfig.getOssEnv(3), ep.getStructPath());
|
|
|
+ prepare.setPaperUrl(paperurl);
|
|
|
+ prepare.setStructUrl(structurl);
|
|
|
+ prepare.setMonitorKey(ExamRecordCacheUtil.getMonitorKey(recordId));
|
|
|
+ prepare.setMonitorUserId("s_" + tbSession.getId());
|
|
|
+ prepare.setMonitorUserSig(tencentYunUtil.getSign(prepare.getMonitorUserId(), SystemConstant.TENCENT_EXPIRE_TIME));
|
|
|
+ return prepare;
|
|
|
+ }
|
|
|
}
|
|
|
if (es.getLeftExamCount() == 0) {
|
|
|
throw new BusinessException("没有剩余考试次数");
|