|
@@ -349,8 +349,9 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
|
|
|
StuRecordDetailDto stuRecordDetailDto = examRegistrationDao.getStuRecordDetail(examRegistrationId);
|
|
StuRecordDetailDto stuRecordDetailDto = examRegistrationDao.getStuRecordDetail(examRegistrationId);
|
|
int recordMinutes = Integer.parseInt(sysConfigService.findByParamName("record_minutes").getParanValue());
|
|
int recordMinutes = Integer.parseInt(sysConfigService.findByParamName("record_minutes").getParanValue());
|
|
- Date date = new Date();
|
|
|
|
|
|
+ Date date = studentExamResult.getRecordStartTime();
|
|
date = DateUtil.addMinutes(date,recordMinutes);
|
|
date = DateUtil.addMinutes(date,recordMinutes);
|
|
|
|
+ stuRecordDetailDto.setExamEndTime(date);
|
|
int secondsBetween = DateUtil.secondsBetween(stuRecordDetailDto.getRecordStartTime(), date);
|
|
int secondsBetween = DateUtil.secondsBetween(stuRecordDetailDto.getRecordStartTime(), date);
|
|
if(secondsBetween <= 0){
|
|
if(secondsBetween <= 0){
|
|
throw new BizException("操作失败:录制超时");
|
|
throw new BizException("操作失败:录制超时");
|
|
@@ -385,7 +386,14 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
public void actionExam(Long examRoomStudentRelationId) {
|
|
public void actionExam(Long examRoomStudentRelationId) {
|
|
ExamRoomStudentRelation examRoomStudentRelation = examRoomStudentRelationDao.get(examRoomStudentRelationId);
|
|
ExamRoomStudentRelation examRoomStudentRelation = examRoomStudentRelationDao.get(examRoomStudentRelationId);
|
|
examRoomStudentRelation.setClassroomSwitch(1);
|
|
examRoomStudentRelation.setClassroomSwitch(1);
|
|
|
|
+
|
|
|
|
+ ExamRoom examRoom = examRoomDao.get(examRoomStudentRelation.getExamRoomId());
|
|
|
|
+ if(examRoom.getExamFlag() == 1){
|
|
|
|
+ throw new BizException("考试已开启,请勿重复操作");
|
|
|
|
+ }
|
|
examRoomStudentRelationDao.update(examRoomStudentRelation);
|
|
examRoomStudentRelationDao.update(examRoomStudentRelation);
|
|
|
|
+ examRoom.setExamFlag(1);
|
|
|
|
+ examRoomDao.update(examRoom);
|
|
publishMessage(examRoomStudentRelation,MemberChangedMessage.Student_Queue,true);
|
|
publishMessage(examRoomStudentRelation,MemberChangedMessage.Student_Queue,true);
|
|
}
|
|
}
|
|
|
|
|