|
@@ -287,12 +287,12 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public NeedCheckingDetailDto stuRecorded(Long examRegistrationId) {
|
|
|
//修改考试状态为录播
|
|
|
- StudentExamResult studentExamResult = studentExamResultDao.findByRegistrationId(examRegistrationId);
|
|
|
+ /*StudentExamResult studentExamResult = studentExamResultDao.findByRegistrationId(examRegistrationId);
|
|
|
studentExamResult.setRecordFlag(1);
|
|
|
studentExamResult.setRecordStartTime(new Date());
|
|
|
- studentExamResultDao.update(studentExamResult);
|
|
|
+ studentExamResultDao.update(studentExamResult);*/
|
|
|
//返回详情数据
|
|
|
- return examCertificationService.needCheckingDetail(examRegistrationId);
|
|
|
+ return examCertificationService.needCheckingDetail(examRegistrationId,1);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -301,7 +301,7 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
//清除排队状态
|
|
|
examRoomStudentRelationDao.cleanSignInTime(examRegistrationId);
|
|
|
//返回详情数据
|
|
|
- return examCertificationService.needCheckingDetail(examRegistrationId);
|
|
|
+ return examCertificationService.needCheckingDetail(examRegistrationId,null);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -325,6 +325,7 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public StuRecordDetailDto stuRecordDetail(Long examRegistrationId) {
|
|
|
StudentExamResult studentExamResult = studentExamResultDao.findByRegistrationId(examRegistrationId);
|
|
|
//当前学员是否完成考试
|
|
@@ -332,9 +333,17 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
throw new BizException("操作失败:您已完成考试");
|
|
|
}
|
|
|
//是否允许录播
|
|
|
- if(studentExamResult.getRecordFlag() == 0){
|
|
|
- throw new BizException("操作失败:请走直播通道");
|
|
|
+ if(studentExamResult.getRecordStartTime() == null){
|
|
|
+ if(studentExamResult.getRecordFlag() == 0){
|
|
|
+ studentExamResult.setRecordFlag(1);
|
|
|
+ studentExamResult.setRecordStartTime(new Date());
|
|
|
+ studentExamResultDao.update(studentExamResult);
|
|
|
+ }else {
|
|
|
+ studentExamResult.setRecordStartTime(new Date());
|
|
|
+ studentExamResultDao.update(studentExamResult);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
StuRecordDetailDto stuRecordDetailDto = examRegistrationDao.getStuRecordDetail(examRegistrationId);
|
|
|
int recordMinutes = Integer.parseInt(sysConfigService.findByParamName("record_minutes").getParanValue());
|
|
|
Date date = new Date();
|
|
@@ -345,11 +354,29 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
}
|
|
|
stuRecordDetailDto.setSubTime(secondsBetween);
|
|
|
stuRecordDetailDto.setRecordTime(recordMinutes);
|
|
|
+ stuRecordDetailDto.setExamRegistrationId(examRegistrationId);
|
|
|
stuRecordDetailDto.setSingleSongRecordMinutes(Integer.parseInt(sysConfigService.findByParamName("single_song_record_minutes").getParanValue()));
|
|
|
return stuRecordDetailDto;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public void stuEndRecord(Long examRegistrationId, String videoUrl) {
|
|
|
+ StudentExamResult studentExamResult = studentExamResultDao.findByRegistrationId(examRegistrationId);
|
|
|
+ //当前学员是否完成考试
|
|
|
+ if(studentExamResult.getIsFinishedExam() == 1){
|
|
|
+ throw new BizException("提交失败:您的考试已完成");
|
|
|
+ }
|
|
|
+ //是否允许录播
|
|
|
+ if(studentExamResult.getRecordFlag() == 0){
|
|
|
+ throw new BizException("提交失败:当前考试不允许录播");
|
|
|
+ }
|
|
|
+ studentExamResult.setVideoUrl(videoUrl);
|
|
|
+ studentExamResult.setIsFinishedExam(1);
|
|
|
+ studentExamResultDao.update(studentExamResult);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public void nextBit(Long nextExamRoomStudentRelationId, Long currentExamRoomStudentRelationId, Integer examStatus,Long examRoomId) {
|
|
|
Boolean isPush = true;
|
|
|
if(currentExamRoomStudentRelationId != null){
|
|
@@ -400,7 +427,7 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
publishMessageDto.setRoomId(examRoomStudentRelation.getExamRoomId().toString());
|
|
|
MemberChangedMessage msg = new MemberChangedMessage(action, userId,3);
|
|
|
// String jsonString = JSONObject.toJSONString(examCertificationService.needCheckingDetail(examRoomStudentRelation.getExamRegistrationId()));
|
|
|
- NeedCheckingDetailDto needCheckingDetailDto = examCertificationService.needCheckingDetail(examRoomStudentRelation.getExamRegistrationId());
|
|
|
+ NeedCheckingDetailDto needCheckingDetailDto = examCertificationService.needCheckingDetail(examRoomStudentRelation.getExamRegistrationId(),null);
|
|
|
msg.setWaitNum(needCheckingDetailDto.getWaitNum());
|
|
|
msg.setClassroomSwitch(needCheckingDetailDto.getClassroomSwitch());
|
|
|
// msg.setAppParamJson(jsonString);
|
|
@@ -422,7 +449,7 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
MemberChangedMessage msg = new MemberChangedMessage(MemberChangedMessage.Student_Queue, userId,3);
|
|
|
// String jsonString = JSONObject.toJSONString(examCertificationService.needCheckingDetail(examRoomStudentRelation.getExamRegistrationId()));
|
|
|
// msg.setAppParamJson(jsonString);
|
|
|
- NeedCheckingDetailDto needCheckingDetailDto = examCertificationService.needCheckingDetail(examRoomStudentRelation.getExamRegistrationId());
|
|
|
+ NeedCheckingDetailDto needCheckingDetailDto = examCertificationService.needCheckingDetail(examRoomStudentRelation.getExamRegistrationId(),null);
|
|
|
msg.setWaitNum(needCheckingDetailDto.getWaitNum());
|
|
|
msg.setClassroomSwitch(needCheckingDetailDto.getClassroomSwitch());
|
|
|
Map<String,Object> paramMap = new HashMap<>(2);
|
|
@@ -466,7 +493,7 @@ public class ExamRoomStudentRelationServiceImpl extends BaseServiceImpl<Long, Ex
|
|
|
publishMessageDto.setRoomId(studentExamRoom.getExamRoomId().toString());
|
|
|
MemberChangedMessage msg = new MemberChangedMessage(MemberChangedMessage.Student_Queue, userId,3);
|
|
|
// String jsonString = JSONObject.toJSONString(examCertificationService.needCheckingDetail(examRegistrationId));
|
|
|
- NeedCheckingDetailDto needCheckingDetailDto = examCertificationService.needCheckingDetail(examRegistrationId);
|
|
|
+ NeedCheckingDetailDto needCheckingDetailDto = examCertificationService.needCheckingDetail(examRegistrationId,null);
|
|
|
// msg.setAppParamJson(needCheckingDetailDto.getWaitNum());
|
|
|
msg.setWaitNum(needCheckingDetailDto.getWaitNum());
|
|
|
publishMessageDto.setMemberChangedMessage(msg);
|