|
@@ -7,39 +7,18 @@ 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.ExamCaptureBean;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.api.bean.ExamContinuedRecordBean;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.api.bean.ExamFaceLivenessVerifyBean;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.api.bean.ExamProcessRecordBean;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.api.bean.ExamQuestionBean;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.api.bean.ExamRecordDataBean;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.api.bean.ExamRecordPaperStructBean;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.api.bean.ExamRecordQuestionsBean;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.api.bean.ExamSyncCaptureBean;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.api.bean.FaceBiopsyBean;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.api.bean.FaceBiopsyItemBean;
|
|
|
-import cn.com.qmth.examcloud.core.oe.admin.api.bean.FaceBiopsyItemStepBean;
|
|
|
+import cn.com.qmth.examcloud.core.oe.admin.api.bean.*;
|
|
|
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.GetExamFaceLivenessVerifiesReq;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.api.request.GetExamRecordPaperStructReq;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.api.request.GetExamRecordQuestionsReq;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.api.request.GetFaceBiopsyReq;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.api.request.UpdatePartialExamRecordReq;
|
|
|
+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.ExamContinuedRecordRepo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.dao.ExamProcessRecordRepo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.dao.entity.ExamContinuedRecordEntity;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.dao.entity.ExamProcessRecordEntity;
|
|
|
-import cn.com.qmth.examcloud.core.oe.task.dao.ExamCaptureRepo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.task.dao.ExamSyncCaptureRepo;
|
|
|
-import cn.com.qmth.examcloud.core.oe.task.dao.entity.ExamCaptureEntity;
|
|
|
-import cn.com.qmth.examcloud.core.oe.task.dao.entity.ExamSyncCaptureEntity;
|
|
|
+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.task.service.ExamBossService;
|
|
|
import cn.com.qmth.examcloud.core.oe.task.service.ExamRecordDataService;
|
|
|
import cn.com.qmth.examcloud.support.Constants;
|
|
@@ -55,6 +34,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;
|
|
@@ -77,6 +57,9 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
@Autowired
|
|
|
private ExamCaptureRepo examCaptureRepo;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ExamFaceLiveVerifyRepo examFaceLiveVerifyRepo;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ExamSyncCaptureRepo examSyncCaptureRepo;
|
|
|
|
|
@@ -177,7 +160,7 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
syncReq.setExamSyncCapture(syncCapture);
|
|
|
|
|
|
//虚拟摄像头进入待审核,且有虚拟摄像头的或者同步没有照片的,更新缓存
|
|
|
- boolean hasVirtualCamera = captures.stream().anyMatch(e->e.getHasVirtualCamera()!=null&&e.getHasVirtualCamera());
|
|
|
+ boolean hasVirtualCamera = captures.stream().anyMatch(e -> e.getHasVirtualCamera() != null && e.getHasVirtualCamera());
|
|
|
if (examRecordDataService.isVirtualToWaiting(examId) && hasVirtualCamera || syncCapture == null) {
|
|
|
examRecordData.setIsWarn(true);
|
|
|
examRecordDataService.saveExamRecordDataCache(examRecordDataId, examRecordData);
|
|
@@ -187,6 +170,8 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
syncReq.setExamFaceLivenessVerifies(getExamFaceLivenessVerifies(examRecordDataId));
|
|
|
|
|
|
syncReq.setFaceBiopsy(getFaceBiopsy(examRecordDataId));
|
|
|
+
|
|
|
+ syncReq.setFaceLiveVerifyRecords(loadFaceLiveVerifyRecords(examRecordDataId));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -348,6 +333,31 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
|
|
|
}
|
|
|
|
|
|
+ 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) {
|
|
@@ -527,7 +537,7 @@ public class SyncExamDataExecutor implements NodeExecuter<Long, ExamRecordData,
|
|
|
data.setContinuedTime(examRecordData.getContinuedTime());
|
|
|
data.setEnterExamTime(examRecordData.getEnterExamTime());
|
|
|
data.setSwitchScreenCount(examRecordData.getSwitchScreenCount());
|
|
|
-
|
|
|
+ data.setExceedMaxSwitchScreenCount(examRecordData.getExceedMaxSwitchScreenCount());
|
|
|
return data;
|
|
|
}
|
|
|
|