|
@@ -1,18 +1,62 @@
|
|
|
package cn.com.qmth.examcloud.core.oe.student.service.impl;
|
|
|
|
|
|
+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 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.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+
|
|
|
+import com.google.common.base.Splitter;
|
|
|
+
|
|
|
import cn.com.qmth.examcloud.api.commons.enums.ExamSpecialSettingsType;
|
|
|
import cn.com.qmth.examcloud.api.commons.enums.ExamType;
|
|
|
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.*;
|
|
|
+import cn.com.qmth.examcloud.commons.util.ByteUtil;
|
|
|
+import cn.com.qmth.examcloud.commons.util.SHA256;
|
|
|
import cn.com.qmth.examcloud.commons.util.UUID;
|
|
|
-import cn.com.qmth.examcloud.core.basic.api.bean.CourseBean;
|
|
|
+import cn.com.qmth.examcloud.commons.util.UrlUtil;
|
|
|
+import cn.com.qmth.examcloud.commons.util.Util;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.base.bean.ExamQuestion;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.base.bean.ExamRecordQuestions;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.base.utils.CommonUtil;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.base.utils.QuestionTypeUtil;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.bean.*;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.service.*;
|
|
|
+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.ExamRecordPaperStruct;
|
|
|
+import cn.com.qmth.examcloud.core.oe.student.bean.GetUpyunSignatureReq;
|
|
|
+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.service.ExamBossService;
|
|
|
+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.ExamRecordPaperStructService;
|
|
|
+import cn.com.qmth.examcloud.core.oe.student.service.ExamRecordQuestionsService;
|
|
|
+import cn.com.qmth.examcloud.core.oe.student.service.ExamingSessionService;
|
|
|
+import cn.com.qmth.examcloud.core.oe.student.service.FaceBiopsyService;
|
|
|
import cn.com.qmth.examcloud.core.oe.task.api.ExamCaptureCloudService;
|
|
|
import cn.com.qmth.examcloud.core.oe.task.api.request.SaveExamCaptureSyncCompareResultReq;
|
|
|
import cn.com.qmth.examcloud.core.oe.task.api.request.UpdateExamCaptureQueuePriorityReq;
|
|
@@ -28,11 +72,20 @@ import cn.com.qmth.examcloud.reports.commons.bean.OnlineExamStudentReport;
|
|
|
import cn.com.qmth.examcloud.reports.commons.util.ReportsUtil;
|
|
|
import cn.com.qmth.examcloud.support.Constants;
|
|
|
import cn.com.qmth.examcloud.support.cache.CacheHelper;
|
|
|
-import cn.com.qmth.examcloud.support.cache.bean.*;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.CourseCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.ExamOrgSettingsCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.ExamPropertyCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.ExamSettingsCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.ExamStudentSettingsCacheBean;
|
|
|
+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.SysPropertyCacheBean;
|
|
|
import cn.com.qmth.examcloud.support.enums.ExamProperties;
|
|
|
import cn.com.qmth.examcloud.support.enums.ExamRecordStatus;
|
|
|
import cn.com.qmth.examcloud.support.enums.FaceBiopsyScheme;
|
|
|
import cn.com.qmth.examcloud.support.enums.HandInExamType;
|
|
|
+import cn.com.qmth.examcloud.support.examing.ExamBoss;
|
|
|
import cn.com.qmth.examcloud.support.examing.ExamRecordData;
|
|
|
import cn.com.qmth.examcloud.support.examing.ExamingSession;
|
|
|
import cn.com.qmth.examcloud.support.examing.ExamingStatus;
|
|
@@ -40,28 +93,11 @@ import cn.com.qmth.examcloud.support.helper.ExamCacheTransferHelper;
|
|
|
import cn.com.qmth.examcloud.support.helper.FaceBiopsyHelper;
|
|
|
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.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 java.text.SimpleDateFormat;
|
|
|
-import java.util.*;
|
|
|
-import java.util.concurrent.TimeUnit;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @author chenken
|
|
@@ -91,7 +127,10 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
|
|
|
@Autowired
|
|
|
private ExamCloudService examCloudService;
|
|
|
-
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ExamBossService examBossService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private FaceBiopsyService faceBiopsyService;
|
|
|
|
|
@@ -221,7 +260,16 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
if (log.isDebugEnabled()) {
|
|
|
log.debug("8 创建考试作答记录耗时:" + (System.currentTimeMillis() - startTime) + " ms");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ //保存考试次数控制信息
|
|
|
+ ExamBoss eb=examBossService.getExamBoss(examingSession.getExamId());
|
|
|
+ if(eb==null) {
|
|
|
+ eb=new ExamBoss();
|
|
|
+ eb.setStartCount(0);
|
|
|
+ }
|
|
|
+ eb.setStartCount(eb.getStartCount()+1);
|
|
|
+ examBossService.saveExamBoss(examId, eb);
|
|
|
+
|
|
|
// 初始化考试会话
|
|
|
startTime = System.currentTimeMillis();
|
|
|
initializeExamRecordSession(examingSession, examRecordData, examBean);
|