|
@@ -4,21 +4,15 @@ import cn.com.qmth.examcloud.commons.helpers.KeyValuePair;
|
|
|
import cn.com.qmth.examcloud.commons.helpers.ObjectHolder;
|
|
|
import cn.com.qmth.examcloud.commons.helpers.pipeline.NodeExecuter;
|
|
|
import cn.com.qmth.examcloud.commons.helpers.pipeline.TaskContext;
|
|
|
-import cn.com.qmth.examcloud.commons.util.JsonUtil;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.ExamScoreNoticeQueueCloudService;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.SyncExamDataCloudService;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.api.bean.*;
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.api.bean.ExamCaptureBean;
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.api.bean.ExamSyncCaptureBean;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.request.AddExamScoreNoticeQueueReq;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.api.request.SyncExamDataReq;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.api.ExamRecordDataCloudService;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.api.bean.StuExamQuestionBean;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.api.request.*;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.api.response.GetExamFaceLivenessVerifiesResp;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.api.response.GetExamRecordPaperStructResp;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.api.response.GetExamRecordQuestionsResp;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.api.response.GetFaceBiopsyResp;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.dao.*;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.dao.entity.*;
|
|
|
+import cn.com.qmth.examcloud.core.oe.student.api.request.UpdatePartialExamRecordReq;
|
|
|
+import cn.com.qmth.examcloud.core.oe.task.service.CommonService;
|
|
|
import cn.com.qmth.examcloud.core.oe.task.service.ExamBossService;
|
|
|
import cn.com.qmth.examcloud.core.oe.task.service.ExamRecordDataService;
|
|
|
import cn.com.qmth.examcloud.support.Constants;
|
|
@@ -34,9 +28,7 @@ import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
-import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -45,24 +37,18 @@ import java.util.List;
|
|
|
* @Date 2019/12/19 16:22
|
|
|
* @Version 1.0
|
|
|
*/
|
|
|
+@Deprecated
|
|
|
@Component
|
|
|
public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData, Long, ExamRecordData> {
|
|
|
|
|
|
+ private static final Logger LOG = LoggerFactory.getLogger(SyncExamDataExecutor.class);
|
|
|
+
|
|
|
@Autowired
|
|
|
private SyncExamDataCloudService syncExamDataCloudService;
|
|
|
|
|
|
@Autowired
|
|
|
private ExamRecordDataService examRecordDataService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private ExamCaptureRepo examCaptureRepo;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ExamFaceLiveVerifyRepo examFaceLiveVerifyRepo;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ExamSyncCaptureRepo examSyncCaptureRepo;
|
|
|
-
|
|
|
@Autowired
|
|
|
private ExamRecordDataCloudService examRecordDataCloudService;
|
|
|
|
|
@@ -73,24 +59,8 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
private ExamBossService examBossService;
|
|
|
|
|
|
@Autowired
|
|
|
- private ExamContinuedRecordRepo examContinuedRecordRepo;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ExamProcessRecordRepo examProcessRecordRepo;
|
|
|
+ private CommonService commonService;
|
|
|
|
|
|
- private static final Logger LOG = LoggerFactory.getLogger(SyncExamDataExecutor.class);
|
|
|
-
|
|
|
- /**
|
|
|
- * 执行
|
|
|
- *
|
|
|
- * @param key
|
|
|
- * @param examRecordData
|
|
|
- * @param outList
|
|
|
- * @param removable
|
|
|
- * @param context
|
|
|
- * @throws Exception
|
|
|
- * @author WANGWEI
|
|
|
- */
|
|
|
@Override
|
|
|
public void execute(Long key, ExamRecordData examRecordData,
|
|
|
List<KeyValuePair<Long, ExamRecordData>> outList,
|
|
@@ -135,22 +105,22 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
//同步数据
|
|
|
SyncExamDataReq syncReq = new SyncExamDataReq();
|
|
|
|
|
|
- syncReq.setExamRecordPaperStruct(getExamRecordPaperStruct(examRecordDataId));
|
|
|
+ syncReq.setExamRecordPaperStruct(commonService.getExamRecordPaperStruct(examRecordDataId));
|
|
|
|
|
|
- syncReq.setExamRecordQuestions(getExamRecordQuestions(examRecordDataId));
|
|
|
+ syncReq.setExamRecordQuestions(commonService.getExamRecordQuestions(examRecordDataId));
|
|
|
|
|
|
- syncReq.setExamContinuedRecords(getExamContinuedRecords(examRecordDataId));
|
|
|
+ syncReq.setExamContinuedRecords(commonService.getExamContinuedRecords(examRecordDataId));
|
|
|
|
|
|
- syncReq.setExamProcessRecords(getExamProcessRecords(examRecordDataId));
|
|
|
+ syncReq.setExamProcessRecords(commonService.getExamProcessRecords(examRecordDataId));
|
|
|
|
|
|
//开启人脸检测相关数据赋值
|
|
|
Long rootOrgId = examRecordData.getRootOrgId();
|
|
|
Long examId = examRecordData.getExamId();
|
|
|
if (FaceBiopsyHelper.isFaceEnable(rootOrgId, examId, studentId)) {
|
|
|
- List<ExamCaptureBean> captures = getExamCaptures(examRecordDataId);
|
|
|
+ List<ExamCaptureBean> captures = commonService.getExamCaptures(examRecordDataId);
|
|
|
syncReq.setExamCaptures(captures);
|
|
|
|
|
|
- ExamSyncCaptureBean syncCapture = getExamSyncCapture(examRecordDataId);
|
|
|
+ ExamSyncCaptureBean syncCapture = commonService.getExamSyncCapture(examRecordDataId);
|
|
|
syncReq.setExamSyncCapture(syncCapture);
|
|
|
|
|
|
//虚拟摄像头进入待审核,且有虚拟摄像头的或者同步没有照片的,更新缓存
|
|
@@ -161,15 +131,15 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
}
|
|
|
|
|
|
if (FaceBiopsyHelper.isFaceVerify(rootOrgId, examId, studentId)) {
|
|
|
- syncReq.setExamFaceLivenessVerifies(getExamFaceLivenessVerifies(examRecordDataId));
|
|
|
+ syncReq.setExamFaceLivenessVerifies(commonService.getExamFaceLivenessVerifies(examRecordDataId));
|
|
|
|
|
|
- syncReq.setFaceBiopsy(getFaceBiopsy(examRecordDataId));
|
|
|
+ syncReq.setFaceBiopsy(commonService.getFaceBiopsy(examRecordDataId));
|
|
|
|
|
|
- syncReq.setFaceLiveVerifyRecords(loadFaceLiveVerifyRecords(examRecordDataId));
|
|
|
+ syncReq.setFaceLiveVerifyRecords(commonService.getFaceLiveVerifyRecords(examRecordDataId));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- syncReq.setExamRecordData(copyExamRecordDataFrom(examRecordData));
|
|
|
+ syncReq.setExamRecordData(commonService.copyExamRecordDataFrom(examRecordData));
|
|
|
|
|
|
long startTime = System.currentTimeMillis();
|
|
|
//同步数据
|
|
@@ -225,313 +195,6 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private List<ExamContinuedRecordBean> getExamContinuedRecords(Long examRecordDataId) {
|
|
|
- List<ExamContinuedRecordEntity> entityList = examContinuedRecordRepo.findByExamRecordDataId(examRecordDataId);
|
|
|
- if (null == entityList || entityList.isEmpty()) {
|
|
|
- return new ArrayList<>();
|
|
|
- }
|
|
|
-
|
|
|
- List<ExamContinuedRecordBean> resultList = new ArrayList<>();
|
|
|
- for (ExamContinuedRecordEntity entity : entityList) {
|
|
|
- ExamContinuedRecordBean bean = new ExamContinuedRecordBean();
|
|
|
- bean.setId(entity.getId());
|
|
|
- bean.setExamRecordDataId(entity.getExamRecordDataId());
|
|
|
- bean.setContinuedTime(entity.getContinuedTime());
|
|
|
- bean.setStartTime(entity.getStartTime());
|
|
|
- bean.setUsedExamTime(entity.getUsedExamTime());
|
|
|
-
|
|
|
- resultList.add(bean);
|
|
|
- }
|
|
|
-
|
|
|
- return resultList;
|
|
|
- }
|
|
|
-
|
|
|
- private List<ExamProcessRecordBean> getExamProcessRecords(Long examRecordDataId) {
|
|
|
- List<ExamProcessRecordEntity> entityList = examProcessRecordRepo.findByExamRecordDataId(examRecordDataId);
|
|
|
- if (null == entityList || entityList.isEmpty()) {
|
|
|
- return new ArrayList<>();
|
|
|
- }
|
|
|
-
|
|
|
- List<ExamProcessRecordBean> resultList = new ArrayList<>();
|
|
|
- for (ExamProcessRecordEntity entity : entityList) {
|
|
|
- ExamProcessRecordBean bean = new ExamProcessRecordBean();
|
|
|
- bean.setId(entity.getId());
|
|
|
- bean.setExamRecordDataId(entity.getExamRecordDataId());
|
|
|
- bean.setProcessName(entity.getProcessName());
|
|
|
- bean.setRecordTime(entity.getRecordTime());
|
|
|
- bean.setSourceIp(entity.getSourceIp());
|
|
|
-
|
|
|
- resultList.add(bean);
|
|
|
- }
|
|
|
-
|
|
|
- return resultList;
|
|
|
- }
|
|
|
-
|
|
|
- private FaceBiopsyBean getFaceBiopsy(Long examRecordDataId) {
|
|
|
- GetFaceBiopsyReq req = new GetFaceBiopsyReq();
|
|
|
- req.setExamRecordDataId(examRecordDataId);
|
|
|
-
|
|
|
- GetFaceBiopsyResp resp = examRecordDataCloudService.getFaceBiopsy(req);
|
|
|
-
|
|
|
- if (null == resp.getFaceBiopsyBean()) {
|
|
|
- return null;
|
|
|
- }
|
|
|
-
|
|
|
- cn.com.qmth.examcloud.core.oe.student.api.bean.FaceBiopsyBean faceBiopsyBean = resp.getFaceBiopsyBean();
|
|
|
-
|
|
|
- FaceBiopsyBean bean = new FaceBiopsyBean();
|
|
|
- bean.setErrorMsg(faceBiopsyBean.getErrorMsg());
|
|
|
- bean.setExamRecordDataId(faceBiopsyBean.getExamRecordDataId());
|
|
|
- bean.setResult(faceBiopsyBean.getResult());
|
|
|
- bean.setRootOrgId(faceBiopsyBean.getRootOrgId());
|
|
|
- bean.setVerifiedTimes(faceBiopsyBean.getVerifiedTimes());
|
|
|
-
|
|
|
- List<FaceBiopsyItemBean> faceBiopsyItemList = new ArrayList<>();
|
|
|
-
|
|
|
- for (cn.com.qmth.examcloud.core.oe.student.api.bean.FaceBiopsyItemBean faceBiopsyItemBean : faceBiopsyBean.getFaceBiopsyItems()) {
|
|
|
- FaceBiopsyItemBean itemBean = new FaceBiopsyItemBean();
|
|
|
-
|
|
|
- itemBean.setCompleted(faceBiopsyItemBean.getCompleted());
|
|
|
- itemBean.setErrorMsg(faceBiopsyItemBean.getErrorMsg());
|
|
|
- itemBean.setExamRecordDataId(faceBiopsyItemBean.getExamRecordDataId());
|
|
|
- itemBean.setFaceBiopsyId(faceBiopsyItemBean.getFaceBiopsyId());
|
|
|
- itemBean.setFaceBiopsyType(faceBiopsyItemBean.getFaceBiopsyType());
|
|
|
- itemBean.setInFreezeTime(faceBiopsyItemBean.getInFreezeTime());
|
|
|
- itemBean.setResult(faceBiopsyItemBean.getResult());
|
|
|
-
|
|
|
- List<FaceBiopsyItemStepBean> itemStepList = new ArrayList<>();
|
|
|
- for (cn.com.qmth.examcloud.core.oe.student.api.bean.FaceBiopsyItemStepBean faceBiopsyItemStepBean : faceBiopsyItemBean.getFaceBiopsyItemSteps()) {
|
|
|
- FaceBiopsyItemStepBean itemStepBean = new FaceBiopsyItemStepBean();
|
|
|
- itemStepBean.setAction(faceBiopsyItemStepBean.getAction());
|
|
|
- itemStepBean.setActionStay(faceBiopsyItemStepBean.getActionStay());
|
|
|
- itemStepBean.setErrorMsg(faceBiopsyItemStepBean.getErrorMsg());
|
|
|
- itemStepBean.setExamRecordDataId(faceBiopsyItemStepBean.getExamRecordDataId());
|
|
|
- itemStepBean.setFaceBiopsyItemId(faceBiopsyItemStepBean.getFaceBiopsyItemId());
|
|
|
- itemStepBean.setResourceRelativePath(faceBiopsyItemStepBean.getResourceRelativePath());
|
|
|
- itemStepBean.setResourceType(faceBiopsyItemStepBean.getResourceType());
|
|
|
- itemStepBean.setResult(faceBiopsyItemStepBean.getResult());
|
|
|
-
|
|
|
- itemStepList.add(itemStepBean);
|
|
|
- }
|
|
|
-
|
|
|
- itemBean.setFaceBiopsyItemSteps(itemStepList);
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- bean.setFaceBiopsyItems(faceBiopsyItemList);
|
|
|
-
|
|
|
- return bean;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- private List<FaceLiveVerifyBean> loadFaceLiveVerifyRecords(Long examRecordDataId) {
|
|
|
- List<ExamFaceLiveVerifyEntity> entities = examFaceLiveVerifyRepo.findByExamRecordDataIdAndFinished(examRecordDataId, true);
|
|
|
- if (CollectionUtils.isEmpty(entities)) {
|
|
|
- return null;
|
|
|
- }
|
|
|
-
|
|
|
- List<FaceLiveVerifyBean> faceLiveVerifyRecords = new ArrayList<>();
|
|
|
- for (ExamFaceLiveVerifyEntity entity : entities) {
|
|
|
- FaceLiveVerifyBean bean = new FaceLiveVerifyBean();
|
|
|
- bean.setExamRecordDataId(entity.getExamRecordDataId());
|
|
|
- bean.setStatus(entity.getStatus().name());
|
|
|
- bean.setFaceCount(entity.getFaceCount());
|
|
|
- bean.setSimilarity(entity.getSimilarity());
|
|
|
- bean.setRealness(entity.getRealness());
|
|
|
- bean.setErrorMsg(entity.getErrorMsg());
|
|
|
- bean.setProcessTime(entity.getProcessTime());
|
|
|
- bean.setActions(entity.getActions());
|
|
|
- bean.setCreationTime(entity.getCreationTime());
|
|
|
- bean.setUpdateTime(entity.getUpdateTime());
|
|
|
- faceLiveVerifyRecords.add(bean);
|
|
|
- }
|
|
|
-
|
|
|
- return faceLiveVerifyRecords;
|
|
|
- }
|
|
|
-
|
|
|
- private ExamSyncCaptureBean getExamSyncCapture(Long examRecordDataId) {
|
|
|
- ExamSyncCaptureEntity entity = examSyncCaptureRepo.findByExamRecordDataId(examRecordDataId);
|
|
|
- if (null == entity) {
|
|
|
- return null;
|
|
|
- }
|
|
|
-
|
|
|
- ExamSyncCaptureBean bean = new ExamSyncCaptureBean();
|
|
|
- bean.setId(entity.getId());
|
|
|
- bean.setExamRecordDataId(entity.getExamRecordDataId());
|
|
|
- bean.setFileUrl(entity.getFileUrl());
|
|
|
- bean.setFileName(entity.getFileName());
|
|
|
- bean.setPass(entity.getIsPass());
|
|
|
- bean.setFaceCompareResult(entity.getFaceCompareResult());
|
|
|
- bean.setStranger(entity.getIsStranger());
|
|
|
- bean.setLandmark(entity.getLandmark());
|
|
|
- bean.setFacelivenessResult(entity.getFacelivenessResult());
|
|
|
- bean.setUsedTime(entity.getUsedTime());
|
|
|
- bean.setProcessTime(entity.getProcessTime());
|
|
|
- bean.setHasVirtualCamera(entity.getHasVirtualCamera());
|
|
|
- bean.setCameraInfos(entity.getCameraInfos());
|
|
|
- bean.setExtMsg(entity.getExtMsg());
|
|
|
-
|
|
|
- return bean;
|
|
|
- }
|
|
|
-
|
|
|
- private ExamRecordQuestionsBean getExamRecordQuestions(Long examRecordDataId) {
|
|
|
- GetExamRecordQuestionsReq req = new GetExamRecordQuestionsReq();
|
|
|
- req.setExamRecordDataId(examRecordDataId);
|
|
|
- GetExamRecordQuestionsResp resp = examRecordDataCloudService.getExamRecordQuestions(req);
|
|
|
-
|
|
|
- ExamRecordQuestionsBean bean = new ExamRecordQuestionsBean();
|
|
|
- bean.setCreationTime(resp.getCreationTime());
|
|
|
- bean.setExamRecordDataId(resp.getExamRecordDataId());
|
|
|
-
|
|
|
- List<ExamQuestionBean> examQuestionBeanList = new ArrayList<>();
|
|
|
- for (StuExamQuestionBean stuExamQuestionBean : resp.getExamQuestions()) {
|
|
|
- ExamQuestionBean examQuestionBean = new ExamQuestionBean();
|
|
|
- examQuestionBean.setExamRecordDataId(stuExamQuestionBean.getExamRecordDataId());
|
|
|
- examQuestionBean.setMainNumber(stuExamQuestionBean.getMainNumber());
|
|
|
- examQuestionBean.setQuestionId(stuExamQuestionBean.getQuestionId());
|
|
|
- examQuestionBean.setOrder(stuExamQuestionBean.getOrder());
|
|
|
- examQuestionBean.setQuestionScore(stuExamQuestionBean.getQuestionScore());
|
|
|
- examQuestionBean.setQuestionType(stuExamQuestionBean.getQuestionType());
|
|
|
- examQuestionBean.setCorrectAnswer(stuExamQuestionBean.getCorrectAnswer());
|
|
|
- examQuestionBean.setStudentAnswer(stuExamQuestionBean.getStudentAnswer());
|
|
|
- examQuestionBean.setStudentScore(stuExamQuestionBean.getStudentScore());
|
|
|
- examQuestionBean.setAnswer(stuExamQuestionBean.getAnswer());
|
|
|
- examQuestionBean.setSign(stuExamQuestionBean.getSign());
|
|
|
- examQuestionBean.setOptionPermutation(stuExamQuestionBean.getOptionPermutation());
|
|
|
- examQuestionBean.setAudioPlayTimes(stuExamQuestionBean.getAudioPlayTimes());
|
|
|
-
|
|
|
- if (null != stuExamQuestionBean.getAnswerType()) {
|
|
|
- examQuestionBean.setAnswerType(stuExamQuestionBean.getAnswerType().name());
|
|
|
- }
|
|
|
-
|
|
|
- examQuestionBeanList.add(examQuestionBean);
|
|
|
- }
|
|
|
-
|
|
|
- bean.setExamQuestionBeans(examQuestionBeanList);
|
|
|
-
|
|
|
- return bean;
|
|
|
- }
|
|
|
-
|
|
|
- private ExamRecordPaperStructBean getExamRecordPaperStruct(Long examRecordDataId) {
|
|
|
- GetExamRecordPaperStructReq req = new GetExamRecordPaperStructReq();
|
|
|
- req.setExamRecordDataId(examRecordDataId);
|
|
|
- GetExamRecordPaperStructResp resp = examRecordDataCloudService.getExamRecordPaperStruct(req);
|
|
|
-
|
|
|
- ExamRecordPaperStructBean bean = new ExamRecordPaperStructBean();
|
|
|
- bean.setId(resp.getId());
|
|
|
- bean.setDefaultPaper(resp.getDefaultPaper());
|
|
|
-
|
|
|
- return bean;
|
|
|
- }
|
|
|
-
|
|
|
- private List<ExamFaceLivenessVerifyBean> getExamFaceLivenessVerifies(Long examRecordDataId) {
|
|
|
- GetExamFaceLivenessVerifiesReq req = new GetExamFaceLivenessVerifiesReq();
|
|
|
- req.setExamRecordDataId(examRecordDataId);
|
|
|
-
|
|
|
- GetExamFaceLivenessVerifiesResp resp = examRecordDataCloudService.getExamFaceLivenessVerifies(req);
|
|
|
- if (null == resp.getExamFaceLivenessVerifis() || resp.getExamFaceLivenessVerifis().isEmpty()) {
|
|
|
- return new ArrayList<>();
|
|
|
- }
|
|
|
-
|
|
|
- debugLog("the result joson of method getExamFaceLivenessVerifies is :" + JsonUtil.toJson(resp), examRecordDataId);
|
|
|
-
|
|
|
- List<ExamFaceLivenessVerifyBean> resultList = new ArrayList<>();
|
|
|
- for (cn.com.qmth.examcloud.core.oe.student.api.bean.ExamFaceLivenessVerifyBean eflvb : resp.getExamFaceLivenessVerifis()) {
|
|
|
- ExamFaceLivenessVerifyBean bean = new ExamFaceLivenessVerifyBean();
|
|
|
- bean.setId(eflvb.getId());
|
|
|
- bean.setExamRecordDataId(eflvb.getExamRecordDataId());
|
|
|
- bean.setStartTime(eflvb.getStartTime());
|
|
|
- bean.setUsedTime(eflvb.getUsedTime());
|
|
|
- bean.setResultJson(eflvb.getResultJson());
|
|
|
- bean.setVerifyResult(eflvb.getVerifyResult());
|
|
|
- bean.setBizId(eflvb.getBizId());
|
|
|
- bean.setIsError(eflvb.getIsError());
|
|
|
- bean.setErrorMsg(eflvb.getErrorMsg());
|
|
|
- bean.setOperateNum(eflvb.getOperateNum());
|
|
|
-
|
|
|
- resultList.add(bean);
|
|
|
- }
|
|
|
-
|
|
|
- return resultList;
|
|
|
- }
|
|
|
-
|
|
|
- private List<ExamCaptureBean> getExamCaptures(Long examRecordDataId) {
|
|
|
- List<ExamCaptureEntity> entityList = examCaptureRepo.findByExamRecordDataId(examRecordDataId);
|
|
|
- if (null == entityList || entityList.isEmpty()) {
|
|
|
- return new ArrayList<>();
|
|
|
- }
|
|
|
-
|
|
|
- List<ExamCaptureBean> resultList = new ArrayList<>();
|
|
|
- for (ExamCaptureEntity entity : entityList) {
|
|
|
- ExamCaptureBean bean = new ExamCaptureBean();
|
|
|
-
|
|
|
- bean.setId(entity.getId());
|
|
|
- bean.setExamRecordDataId(entity.getExamRecordDataId());
|
|
|
- bean.setFileUrl(entity.getFileUrl());
|
|
|
- bean.setFileName(entity.getFileName());
|
|
|
- bean.setPass(entity.getIsPass());
|
|
|
- bean.setFaceCompareResult(entity.getFaceCompareResult());
|
|
|
- bean.setStranger(entity.getIsStranger());
|
|
|
- bean.setLandmark(entity.getLandmark());
|
|
|
- bean.setFacelivenessResult(entity.getFacelivenessResult());
|
|
|
- bean.setUsedTime(entity.getUsedTime());
|
|
|
- bean.setProcessTime(entity.getProcessTime());
|
|
|
- bean.setHasVirtualCamera(entity.getHasVirtualCamera());
|
|
|
- bean.setCameraInfos(entity.getCameraInfos());
|
|
|
- bean.setExtMsg(entity.getExtMsg());
|
|
|
-
|
|
|
- resultList.add(bean);
|
|
|
- }
|
|
|
-
|
|
|
- return resultList;
|
|
|
- }
|
|
|
-
|
|
|
- private ExamRecordDataBean copyExamRecordDataFrom(ExamRecordData examRecordData) {
|
|
|
- ExamRecordDataBean data = new ExamRecordDataBean();
|
|
|
- data.setId(examRecordData.getId());
|
|
|
- data.setExamId(examRecordData.getExamId());
|
|
|
- data.setExamType(examRecordData.getExamType() == null ? null : examRecordData.getExamType().toString());
|
|
|
- data.setExamStudentId(examRecordData.getExamStudentId());
|
|
|
- data.setStudentId(examRecordData.getStudentId());
|
|
|
- data.setCourseId(examRecordData.getCourseId());
|
|
|
- data.setOrgId(examRecordData.getOrgId());
|
|
|
- data.setRootOrgId(examRecordData.getRootOrgId());
|
|
|
- data.setBasePaperId(examRecordData.getBasePaperId());
|
|
|
- data.setPaperType(examRecordData.getPaperType());
|
|
|
- data.setExamRecordStatus(examRecordData.getExamRecordStatus() == null ? null : examRecordData.getExamRecordStatus().toString());
|
|
|
- data.setStartTime(examRecordData.getStartTime());
|
|
|
- data.setEndTime(examRecordData.getEndTime());
|
|
|
- data.setCleanTime(examRecordData.getCleanTime());
|
|
|
- data.setWarn(examRecordData.getIsWarn() == null ? false : examRecordData.getIsWarn());
|
|
|
- data.setAudit(examRecordData.getIsAudit() == null ? false : examRecordData.getIsAudit());
|
|
|
- data.setIllegality(examRecordData.getIsIllegality() == null ? false : examRecordData.getIsIllegality());
|
|
|
- data.setUsedExamTime(examRecordData.getUsedExamTime());
|
|
|
- data.setContinued(examRecordData.getIsContinued() == null ? false : examRecordData.getIsContinued());
|
|
|
- data.setContinuedCount(examRecordData.getContinuedCount());
|
|
|
- data.setExceed(examRecordData.getIsExceed() == null ? false : examRecordData.getIsExceed());
|
|
|
- data.setFaceSuccessCount(examRecordData.getFaceSuccessCount());
|
|
|
- data.setFaceFailedCount(examRecordData.getFaceFailedCount());
|
|
|
- data.setFaceStrangerCount(examRecordData.getFaceStrangerCount());
|
|
|
- data.setFaceTotalCount(examRecordData.getFaceTotalCount());
|
|
|
- data.setFaceSuccessPercent(examRecordData.getFaceSuccessPercent());
|
|
|
- data.setFaceVerifyResult(examRecordData.getFaceVerifyResult() == null ? null : examRecordData.getFaceVerifyResult().toString());
|
|
|
- data.setBaiduFaceLivenessSuccessPercent(examRecordData.getBaiduFaceLivenessSuccessPercent());
|
|
|
- data.setTotalScore(examRecordData.getTotalScore());
|
|
|
- data.setObjectiveScore(examRecordData.getObjectiveScore());
|
|
|
- data.setObjectiveAccuracy(examRecordData.getObjectiveAccuracy());
|
|
|
- data.setSubjectiveScore(examRecordData.getSubjectiveScore());
|
|
|
- data.setSuccPercent(examRecordData.getSuccPercent());
|
|
|
- data.setAllObjectivePaper(examRecordData.getIsAllObjectivePaper());
|
|
|
- data.setExamStageId(examRecordData.getExamStageId());
|
|
|
- data.setExamStageOrder(examRecordData.getExamStageOrder());
|
|
|
- data.setLastActiveTime(examRecordData.getLastActiveTime());
|
|
|
- data.setContinuedTime(examRecordData.getContinuedTime());
|
|
|
- data.setEnterExamTime(examRecordData.getEnterExamTime());
|
|
|
- data.setSwitchScreenCount(examRecordData.getSwitchScreenCount());
|
|
|
- data.setExceedMaxSwitchScreenCount(examRecordData.getExceedMaxSwitchScreenCount());
|
|
|
- return data;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 设置并保存考试记录的同步状态
|
|
|
*
|