|
@@ -1,40 +1,5 @@
|
|
|
package cn.com.qmth.examcloud.core.oe.student.service.impl;
|
|
|
|
|
|
-import java.io.UnsupportedEncodingException;
|
|
|
-import java.net.URLEncoder;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Collections;
|
|
|
-import java.util.Comparator;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.HashSet;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Locale;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Random;
|
|
|
-import java.util.Set;
|
|
|
-import java.util.TimeZone;
|
|
|
-import java.util.concurrent.TimeUnit;
|
|
|
-import java.util.stream.Collectors;
|
|
|
-
|
|
|
-import javax.validation.Valid;
|
|
|
-
|
|
|
-import org.apache.commons.collections.CollectionUtils;
|
|
|
-import org.apache.commons.lang.math.RandomUtils;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.apache.commons.lang3.time.DateUtils;
|
|
|
-import org.apache.commons.logging.Log;
|
|
|
-import org.apache.commons.logging.LogFactory;
|
|
|
-import org.slf4j.Logger;
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
-
|
|
|
-import com.google.common.base.Splitter;
|
|
|
-
|
|
|
import cn.com.qmth.examcloud.api.commons.security.bean.User;
|
|
|
import cn.com.qmth.examcloud.commons.exception.StatusException;
|
|
|
import cn.com.qmth.examcloud.commons.util.ByteUtil;
|
|
@@ -43,57 +8,18 @@ import cn.com.qmth.examcloud.commons.util.UrlUtil;
|
|
|
import cn.com.qmth.examcloud.commons.util.Util;
|
|
|
import cn.com.qmth.examcloud.core.basic.api.bean.CourseBean;
|
|
|
import cn.com.qmth.examcloud.core.oe.common.base.Constants;
|
|
|
+import cn.com.qmth.examcloud.core.oe.common.base.helper.ExamCacheTransferHelper;
|
|
|
import cn.com.qmth.examcloud.core.oe.common.base.utils.CommonUtil;
|
|
|
import cn.com.qmth.examcloud.core.oe.common.base.utils.QuestionTypeUtil;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.entity.ExamFileAnswerTempEntity;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.entity.ExamQuestionEntity;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.entity.ExamRecordDataEntity;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.entity.ExamRecordPaperStructEntity;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.entity.ExamRecordQuestionsEntity;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.entity.ExamScoreEntity;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.entity.ExamStudentEntity;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.entity.ExamingRecordEntity;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.entity.HandInExamRecordEntity;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.enums.ExamProperties;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.enums.ExamRecordStatus;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.enums.ExamType;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.enums.FileAnswerAcknowledgeStatus;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.enums.HandInExamType;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.repository.ExamCaptureQueueRepo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.repository.ExamFileAnswerTempRepo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.repository.ExamRecordDataRepo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.repository.ExamRecordPaperStructRepo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.repository.ExamScoreRepo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.repository.ExamStudentRepo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.common.repository.ExamingRecordRepo;
|
|
|
+import cn.com.qmth.examcloud.core.oe.common.entity.*;
|
|
|
+import cn.com.qmth.examcloud.core.oe.common.enums.*;
|
|
|
+import cn.com.qmth.examcloud.core.oe.common.repository.*;
|
|
|
import cn.com.qmth.examcloud.core.oe.common.service.ExamScoreObtainQueueService;
|
|
|
import cn.com.qmth.examcloud.core.oe.common.service.ExamScorePushQueueService;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.CalculateFaceCheckResultInfo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.CheckExamInProgressInfo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.CheckQrCodeInfo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.EndExamInfo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.ExamSessionInfo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.GetQrCodeReq;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.GetUploadedFileAcknowledgeStatusReq;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.GetUploadedFileAnswerListReq;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.GetUpyunSignatureReq;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.SaveUploadedFileAcknowledgeStatusReq;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.SaveUploadedFileReq;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.StartExamInfo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.UploadedFileAnswerInfo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.UpyunSignatureInfo;
|
|
|
+import cn.com.qmth.examcloud.core.oe.student.bean.*;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.face.api.ExamCaptureCloudService;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.face.api.request.SaveExamCaptureSyncCompareResultReq;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.service.ExamCacheTransferHelper;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.service.ExamControlService;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.service.ExamFaceLivenessVerifyService;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.service.ExamRecordDataService;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.service.ExamRecordForMarkingService;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.service.ExamRecordQuestionsService;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.service.ExamScoreService;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.service.ExamSessionInfoService;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.service.ExamStudentService;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.service.FaceBiopsyService;
|
|
|
+import cn.com.qmth.examcloud.core.oe.student.service.*;
|
|
|
import cn.com.qmth.examcloud.core.oe.websocket.api.FileAnswerWebsocketCloudService;
|
|
|
import cn.com.qmth.examcloud.core.oe.websocket.api.enums.WebSocketEventType;
|
|
|
import cn.com.qmth.examcloud.core.oe.websocket.api.request.SendFileAnswerMessageReq;
|
|
@@ -110,19 +36,36 @@ import cn.com.qmth.examcloud.question.commons.core.question.QuestionType;
|
|
|
import cn.com.qmth.examcloud.reports.commons.bean.OnlineExamStudentReport;
|
|
|
import cn.com.qmth.examcloud.reports.commons.util.ReportsUtil;
|
|
|
import cn.com.qmth.examcloud.support.cache.CacheHelper;
|
|
|
-import cn.com.qmth.examcloud.support.cache.bean.ExtractConfigCacheBean;
|
|
|
-import cn.com.qmth.examcloud.support.cache.bean.ExtractConfigDetailCacheBean;
|
|
|
-import cn.com.qmth.examcloud.support.cache.bean.ExtractConfigPaperCacheBean;
|
|
|
-import cn.com.qmth.examcloud.support.cache.bean.OrgPropertyCacheBean;
|
|
|
-import cn.com.qmth.examcloud.support.cache.bean.SysPropertyCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.*;
|
|
|
import cn.com.qmth.examcloud.web.bootstrap.PropertyHolder;
|
|
|
import cn.com.qmth.examcloud.web.exception.SequenceLockException;
|
|
|
import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
|
|
|
import cn.com.qmth.examcloud.web.helpers.SequenceLockHelper;
|
|
|
import cn.com.qmth.examcloud.web.redis.RedisClient;
|
|
|
+import com.google.common.base.Splitter;
|
|
|
import main.java.com.upyun.Base64Coder;
|
|
|
import main.java.com.upyun.UpException;
|
|
|
import main.java.com.upyun.UpYunUtils;
|
|
|
+import org.apache.commons.collections.CollectionUtils;
|
|
|
+import org.apache.commons.lang.math.RandomUtils;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.apache.commons.lang3.time.DateUtils;
|
|
|
+import org.apache.commons.logging.Log;
|
|
|
+import org.apache.commons.logging.LogFactory;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+
|
|
|
+import javax.validation.Valid;
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
|
+import java.net.URLEncoder;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.*;
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @author chenken
|
|
@@ -337,9 +280,8 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
examRecordData.getExamType());
|
|
|
|
|
|
// 如果开启人脸比对,将同步人脸比对结果存储到抓后结果表中
|
|
|
- Long examId = examRecordData.getExamId();
|
|
|
- String isFaceEnable = CacheHelper.getExamOrgProperty(examRecordData.getExamId(), examRecordData.getOrgId(),
|
|
|
- ExamProperties.IS_FACE_ENABLE.name()).getValue();
|
|
|
+ String isFaceEnable = ExamCacheTransferHelper.getCachedExamProperty(examRecordData.getExamId(), examRecordData.getOrgId(),
|
|
|
+ examRecordData.getStudentId(), ExamProperties.IS_FACE_ENABLE.name()).getValue();
|
|
|
if (isFaceEnable != null && Constants.isTrue.equals(isFaceEnable)) {
|
|
|
SaveExamCaptureSyncCompareResultReq req = new SaveExamCaptureSyncCompareResultReq();
|
|
|
req.setExamRecordDataId(examRecordData.getId());
|
|
@@ -444,7 +386,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
}
|
|
|
|
|
|
private StartExamInfo buildStartExamInfo(Long examRecordDataId, ExamStudentEntity examStudentEntity,
|
|
|
- ExamBean examBean, CourseBean courseBean) {
|
|
|
+ ExamBean examBean, CourseBean courseBean) {
|
|
|
StartExamInfo startExamInfo = new StartExamInfo();
|
|
|
startExamInfo.setExamRecordDataId(examRecordDataId);
|
|
|
startExamInfo.setStudentCode(examStudentEntity.getStudentCode());
|
|
@@ -452,7 +394,8 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
startExamInfo.setCourseCode(examStudentEntity.getCourseCode());
|
|
|
startExamInfo.setCourseName(courseBean.getName());
|
|
|
startExamInfo.setDuration(examBean.getDuration());
|
|
|
- startExamInfo.setFaceVerifyMinute(getFaceVerifyMinute(examBean.getId(), examStudentEntity.getOrgId()));
|
|
|
+ startExamInfo.setFaceVerifyMinute(getFaceVerifyMinute(examBean.getId(), examStudentEntity.getOrgId(),
|
|
|
+ examStudentEntity.getStudentId()));
|
|
|
return startExamInfo;
|
|
|
}
|
|
|
|
|
@@ -462,9 +405,9 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
* @param examId
|
|
|
* @return
|
|
|
*/
|
|
|
- private Integer getFaceVerifyMinute(Long examId, Long orgId) {
|
|
|
- String isFaceVerifyStr = CacheHelper.getExamOrgProperty(examId, orgId, ExamProperties.IS_FACE_VERIFY.name())
|
|
|
- .getValue();
|
|
|
+ private Integer getFaceVerifyMinute(Long examId, Long orgId, Long studentId) {
|
|
|
+ String isFaceVerifyStr = ExamCacheTransferHelper.getCachedExamProperty(examId, orgId,
|
|
|
+ studentId, ExamProperties.IS_FACE_VERIFY.name()).getValue();
|
|
|
// 如果开启了活体检测
|
|
|
if (Constants.isTrue.equals(isFaceVerifyStr)) {
|
|
|
// 开始分钟数
|
|
@@ -508,18 +451,16 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
|
|
|
// examStudentEntity.getOrgId());
|
|
|
|
|
|
- // 通用考试配置
|
|
|
- ExamBean examBean = ExamCacheTransferHelper.getCachedExam(examStudentEntity.getExamId());
|
|
|
// 学习中心特殊考试配置(是否禁考,开考时间可以特殊设置)
|
|
|
- ExamBean specialExamBean = ExamCacheTransferHelper.getCachedExam(examStudentEntity.getExamId(),
|
|
|
- examStudentEntity.getOrgId());
|
|
|
- if (!examBean.getEnable() || (specialExamBean.getExamLimit() != null && specialExamBean.getExamLimit())) {
|
|
|
+ ExamBean examBean = ExamCacheTransferHelper.getCachedExam(examStudentEntity.getExamId(),
|
|
|
+ examStudentEntity.getOrgId(), examStudentEntity.getStudentId());
|
|
|
+ if (!examBean.getEnable() || (examBean.getExamLimit() != null && examBean.getExamLimit())) {
|
|
|
throw new StatusException("ExamControlServiceImpl-checkExam-exception-01", "暂无考试资格,请与学校老师联系");
|
|
|
}
|
|
|
- if (new Date().before(specialExamBean.getBeginTime())) {
|
|
|
+ if (new Date().before(examBean.getBeginTime())) {
|
|
|
throw new StatusException("ExamControlServiceImpl-checkExam-exception-02", "考试未开始");
|
|
|
}
|
|
|
- if (specialExamBean.getEndTime().before(new Date())) {
|
|
|
+ if (examBean.getEndTime().before(new Date())) {
|
|
|
throw new StatusException("ExamControlServiceImpl-checkExam-exception-03", "本次考试已结束");
|
|
|
}
|
|
|
if (ExamType.ONLINE.name().equals(examBean.getExamType())
|
|
@@ -539,7 +480,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
* @param examBean
|
|
|
*/
|
|
|
public void initializeExamRecordSession(final ExamStudentEntity examStudent,
|
|
|
- final ExamRecordDataEntity examRecordData, final ExamBean examBean) {
|
|
|
+ final ExamRecordDataEntity examRecordData, final ExamBean examBean) {
|
|
|
ExamSessionInfo examSessionInfo = new ExamSessionInfo();
|
|
|
examSessionInfo.setExamRecordDataId(examRecordData.getId());
|
|
|
examSessionInfo.setExamStudentId(examStudent.getExamStudentId());
|
|
@@ -583,10 +524,8 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
/**
|
|
|
* 获取试卷结构 小题乱序、选项乱序
|
|
|
*
|
|
|
- * @param extractConfig
|
|
|
- * 调卷规则对象
|
|
|
- * @param paperStruct
|
|
|
- * 试卷结构对象
|
|
|
+ * @param extractConfig 调卷规则对象
|
|
|
+ * @param paperStruct 试卷结构对象
|
|
|
*/
|
|
|
private void reorderPaperStruct(ExtractConfigCacheBean extractConfig, ExtractConfigPaperCacheBean paperStruct) {
|
|
|
// 小题乱序
|
|
@@ -673,8 +612,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
/**
|
|
|
* 计算考试时长 校验是否达到冻结时间
|
|
|
*
|
|
|
- * @param studentId
|
|
|
- * 学生id
|
|
|
+ * @param studentId 学生id
|
|
|
* @return
|
|
|
*/
|
|
|
private Long checkAndComputeExamDuration(Long studentId) {
|
|
@@ -706,8 +644,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
/**
|
|
|
* 计算考试已用时间(毫秒)
|
|
|
*
|
|
|
- * @param examSessionInfo
|
|
|
- * 考试会话对象
|
|
|
+ * @param examSessionInfo 考试会话对象
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
@@ -731,10 +668,8 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param examRecordDataId
|
|
|
- * 考试记录id
|
|
|
- * @param handInExamType
|
|
|
- * 交卷类型
|
|
|
+ * @param examRecordDataId 考试记录id
|
|
|
+ * @param handInExamType 交卷类型
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional
|
|
@@ -768,8 +703,9 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
examRecordData.setEndTime(new Date());
|
|
|
|
|
|
// 手工手卷时,如果开启人脸检测,则更新抓拍队列优先级
|
|
|
- String isFaceEnable = CacheHelper.getExamOrgProperty(examRecordData.getExamId(), examRecordData.getOrgId(),
|
|
|
- ExamProperties.IS_FACE_ENABLE.name()).getValue();
|
|
|
+ String isFaceEnable = ExamCacheTransferHelper.getCachedExamProperty(examRecordData.getExamId(),
|
|
|
+ examRecordData.getOrgId(),
|
|
|
+ examRecordData.getStudentId(), ExamProperties.IS_FACE_ENABLE.name()).getValue();
|
|
|
if (isFaceEnable != null && Constants.isTrue.equals(isFaceEnable)) {
|
|
|
// 更新照片抓拍队列优先级为高优先级
|
|
|
examCaptureQueueRepo.updateExamCaptureQueuePriority(Constants.PROCESS_CAPTURE_HIGH_PRIORITY,
|
|
@@ -901,8 +837,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
/**
|
|
|
* 考试心跳每分钟调用一次
|
|
|
*
|
|
|
- * @param user
|
|
|
- * 学生
|
|
|
+ * @param user 学生
|
|
|
*/
|
|
|
@Override
|
|
|
public long examHeartbeat(User user) {
|
|
@@ -977,13 +912,13 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
|
|
|
// 如果是新活体检测方案,则使用新的计算方案计算活检开始时间
|
|
|
if (NEW_FACE_BIOPSY_SCHEME.equals(orgProperty.getValue())) {
|
|
|
- faceVerifyMinute = examFaceLivenessVerifyService.getFaceLivenessVerifyMinute(
|
|
|
- examStudentEntity.getOrgId(), examStudentEntity.getExamId(),
|
|
|
- examingRecord.getExamRecordDataId(), examSessionInfo.getHeartbeat());
|
|
|
+ faceVerifyMinute = faceBiopsyService.getFaceBiopsyStartMinute(examingRecord.getExamRecordDataId());
|
|
|
}
|
|
|
// 非新活检,默认使用旧的活检计算方式
|
|
|
else {
|
|
|
- faceVerifyMinute = faceBiopsyService.getFaceBiopsyStartMinute(examingRecord.getExamRecordDataId());
|
|
|
+ faceVerifyMinute = examFaceLivenessVerifyService.getFaceLivenessVerifyMinute(
|
|
|
+ examStudentEntity.getOrgId(), examStudentEntity.getExamId(), studentId,
|
|
|
+ examingRecord.getExamRecordDataId(), examSessionInfo.getHeartbeat());
|
|
|
}
|
|
|
|
|
|
checkExamInProgressInfo.setFaceVerifyMinute(faceVerifyMinute);
|
|
@@ -1022,8 +957,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
/**
|
|
|
* 如果有序列化锁,则延迟交卷
|
|
|
*
|
|
|
- * @param examRecordDataId
|
|
|
- * 考试记录id
|
|
|
+ * @param examRecordDataId 考试记录id
|
|
|
* @return
|
|
|
*/
|
|
|
private void delayHandInExamIfLocked(Long examRecordDataId) {
|
|
@@ -1195,16 +1129,11 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param bucketName
|
|
|
- * //不能为空
|
|
|
- * @param expiration
|
|
|
- * //不能为空
|
|
|
- * @param filePath
|
|
|
- * //不能为空
|
|
|
- * @param date
|
|
|
- * 为空时,以又怕云时间和expiration比较,不为空时以此date和expiration比较
|
|
|
- * @param md5
|
|
|
- * //可以为空
|
|
|
+ * @param bucketName //不能为空
|
|
|
+ * @param expiration //不能为空
|
|
|
+ * @param filePath //不能为空
|
|
|
+ * @param date 为空时,以又怕云时间和expiration比较,不为空时以此date和expiration比较
|
|
|
+ * @param md5 //可以为空
|
|
|
* @return
|
|
|
*/
|
|
|
private String policy(String bucketName, Long expiration, String filePath, Date date, String md5) {
|
|
@@ -1237,7 +1166,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
* @throws UpException
|
|
|
*/
|
|
|
private String sign(String method, String date, String bucketName, String policy, String userName, String password,
|
|
|
- String md5) throws UpException {
|
|
|
+ String md5) throws UpException {
|
|
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
String sp = "&";
|
|
@@ -1335,20 +1264,16 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
/**
|
|
|
* 通过websocket发送消息
|
|
|
*
|
|
|
- * @param examRecordDataId
|
|
|
- * 考试记录id
|
|
|
- * @param order
|
|
|
- * 题序号
|
|
|
- * @param fileUrl
|
|
|
- * 文件路径
|
|
|
- * @param transferFileType
|
|
|
- * 传输文件类型
|
|
|
+ * @param examRecordDataId 考试记录id
|
|
|
+ * @param order 题序号
|
|
|
+ * @param fileUrl 文件路径
|
|
|
+ * @param transferFileType 传输文件类型
|
|
|
* @param userId
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
@Override
|
|
|
public void sendFileAnswerToWebSocket(Long examRecordDataId, Integer order, String fileUrl, String transferFileType,
|
|
|
- Long userId) throws Exception {
|
|
|
+ Long userId) throws Exception {
|
|
|
Map<String, Object> data = new HashMap<String, Object>();
|
|
|
data.put("examRecordDataId", examRecordDataId);
|
|
|
data.put("order", order);
|
|
@@ -1620,7 +1545,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
* Collectors.toList()).get(0); //集合中取id最大的值 if (currentTemp.getId() <
|
|
|
* temp.getId()) { newestUploadedFileAnswerList.remove(currentTemp);
|
|
|
* newestUploadedFileAnswerList.add(temp); } } }
|
|
|
- *
|
|
|
+ *
|
|
|
* //按大题号给所有的小题定义序号 List<UploadedFileAnswerInfo> allQuestionAnswerList =
|
|
|
* getReSortedQuestionList(req.getExamRecordDataId()); //当前考生已作答的题目集合
|
|
|
* List<ExamQuestionEntity> examQuestionsInMongo =
|