|
@@ -1744,7 +1744,13 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
examSessionInfo.getExamId(), examSessionInfo.getExamStudentId()));
|
|
|
|
|
|
// 返回考试剩余时间
|
|
|
- long leftTime = examSessionInfo.getExamDuration() - (examingHeartbeat.getCost() * 1000);
|
|
|
+ long leftTime =0;
|
|
|
+ if(examSessionInfo.getTimingEnd()) {//定点收卷
|
|
|
+ Date now=new Date();
|
|
|
+ leftTime=examSessionInfo.getFixedSubmitTime().getTime()-now.getTime();
|
|
|
+ }else {
|
|
|
+ leftTime=examSessionInfo.getExamDuration() - (examingHeartbeat.getCost() * 1000);
|
|
|
+ }
|
|
|
return leftTime < 0 ? 0 : leftTime;
|
|
|
}
|
|
|
|
|
@@ -1814,10 +1820,9 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
//交卷时重新计算考试已用时间
|
|
|
Long examUsedMilliSeconds = calcUsedExamSeconds(studentId) * 1000;
|
|
|
//考试总时长
|
|
|
- long examTotalMilliSeconds = calcExamTotalMilliSeconds(examingSession.getExamRecordDataId());
|
|
|
- //如果开启场次,并且设置了定点交卷,且考试时间已经用完,则不需要校验冻结时间,直接返回考试时长
|
|
|
- if (isTimingEnd(examingSession.getExamId(), studentId, examingSession.getExamStageId())
|
|
|
- && examUsedMilliSeconds >= examTotalMilliSeconds) {
|
|
|
+// long examTotalMilliSeconds = calcExamTotalMilliSeconds(examingSession.getExamRecordDataId());
|
|
|
+ //如果开启场次,并且设置了定点交卷,且已到定点收卷时间,则不需要校验冻结时间,直接返回考试时长
|
|
|
+ if (examingSession.getTimingEnd() && examingSession.getFixedSubmitTime().getTime()<=new Date().getTime()) {
|
|
|
return examUsedMilliSeconds;
|
|
|
}
|
|
|
|