|
@@ -281,12 +281,12 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
}
|
|
|
|
|
|
// 保存考试次数控制信息
|
|
|
- ExamBoss eb = examBossService.getExamBoss(examingSession.getExamId());
|
|
|
+ ExamBoss eb = examBossService.getExamBoss(examingSession.getExamStudentId());
|
|
|
if (eb == null) {
|
|
|
throw new StatusException("008001", "ExamBoss is not created");
|
|
|
}
|
|
|
eb.setStartCount(eb.getStartCount() + 1);
|
|
|
- examBossService.saveExamBoss(examId, eb);
|
|
|
+ examBossService.saveExamBoss(examStudentId, eb);
|
|
|
|
|
|
// 初始化考试会话
|
|
|
startTime = System.currentTimeMillis();
|
|
@@ -404,7 +404,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
int usedNum = examStudent.getUsedNum();
|
|
|
int extraNum = examStudent.getExtraNum();
|
|
|
|
|
|
- String examBossKey = RedisKeyHelper.getBuilder().examBossKey(examSettingsCacheBean.getId());
|
|
|
+ String examBossKey = RedisKeyHelper.getBuilder().examBossKey(examStudentId);
|
|
|
ExamBoss examBoss = redisClient.get(examBossKey, ExamBoss.class);
|
|
|
|
|
|
int asynchronousTimes = 0;
|
|
@@ -424,7 +424,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
examingSession.setCourseCode(courseCacheBean.getCode());
|
|
|
examingSession.setCourseId(courseCacheBean.getId());
|
|
|
examingSession.setCreationTime(new Date());
|
|
|
- examingSession.setExamDuration((long) examSettingsCacheBean.getDuration());
|
|
|
+ examingSession.setExamDuration((long) examSettingsCacheBean.getDuration()*60*1000);
|
|
|
examingSession.setExamId(examSettingsCacheBean.getId());
|
|
|
examingSession.setExamingStatus(ExamingStatus.INFORMAL);
|
|
|
|
|
@@ -1197,11 +1197,11 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
ExamingHeartbeat examingHeartbeat = redisClient.get(examingHeartbeatKey,
|
|
|
ExamingHeartbeat.class);
|
|
|
|
|
|
- long UsedTime = null == examingHeartbeat ? 0 : examingHeartbeat.getCost();
|
|
|
+ long usedTime = null == examingHeartbeat ? 0 : examingHeartbeat.getCost();
|
|
|
|
|
|
checkExamInProgressInfo.setExamRecordDataId(examingRecord.getId());
|
|
|
checkExamInProgressInfo.setExamId(examSessionInfo.getExamId());
|
|
|
- checkExamInProgressInfo.setUsedTime(UsedTime);
|
|
|
+ checkExamInProgressInfo.setUsedTime(usedTime);
|
|
|
checkExamInProgressInfo.setMaxInterruptNum(maxInterruptNum);
|
|
|
checkExamInProgressInfo.setInterruptNum(examingRecord.getContinuedCount());
|
|
|
|
|
@@ -1215,7 +1215,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
} else {// 非新活检,默认使用旧的活检计算方式
|
|
|
faceVerifyMinute = examFaceLivenessVerifyService.getFaceLivenessVerifyMinute(
|
|
|
examSessionInfo.getRootOrgId(), examSessionInfo.getOrgId(), examSessionInfo.getExamId(),
|
|
|
- studentId, examSessionInfo.getExamRecordDataId(), (int) UsedTime / 60);
|
|
|
+ studentId, examSessionInfo.getExamRecordDataId(), (int) usedTime / 60);
|
|
|
}
|
|
|
|
|
|
checkExamInProgressInfo.setFaceVerifyMinute(faceVerifyMinute);
|
|
@@ -1235,10 +1235,10 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
ExamingHeartbeat examingHeartbeat = redisClient.get(examingHeartbeatKey,
|
|
|
ExamingHeartbeat.class);
|
|
|
|
|
|
- long UsedTime = null == examingHeartbeat ? 0 : examingHeartbeat.getCost();
|
|
|
+ long usedTime = null == examingHeartbeat ? 0 : examingHeartbeat.getCost();
|
|
|
|
|
|
// 如果考试时间结束,自动交卷
|
|
|
- if (examSessionInfo.getExamDuration() <= UsedTime * 1000) {
|
|
|
+ if (examSessionInfo.getExamDuration() <= usedTime * 1000) {
|
|
|
delayHandInExamIfLocked(examingRecord.getId());
|
|
|
return null;
|
|
|
}
|