|
@@ -166,27 +166,27 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
// 是否开启人脸验证
|
|
|
boolean isFaceEnable = FaceBiopsyHelper.isFaceEnable(rootOrgId, examId, studentId);
|
|
|
|
|
|
- // 是否开启考中人脸活体检测
|
|
|
- boolean isFaceVerify = FaceBiopsyHelper.isFaceVerify(rootOrgId, examId, studentId);
|
|
|
+ boolean skipFace = false, isFaceVerify = false, isFaceVerifyForceExit = false, isVirtualCameraAuditEnabled = false;
|
|
|
+ if (isFaceEnable) {
|
|
|
+ // 检查当前考生是否跳过人脸识别
|
|
|
+ skipFace = this.checkExamSkipFace(examId, examStudentId);
|
|
|
+
|
|
|
+ // 是否开启考中人脸活体检测
|
|
|
+ isFaceVerify = FaceBiopsyHelper.isFaceVerify(rootOrgId, examId, studentId);
|
|
|
|
|
|
- // 是否考中活体不通过强制退出
|
|
|
- ExamPropertyCacheBean faceVerifyForceExitProperty = CacheHelper.getExamProperty(examId, ExamProperties.FACE_VERIFY_FORCE_EXIT.name());
|
|
|
- boolean isFaceVerifyForceExit = faceVerifyForceExitProperty != null && StringUtil.isTrue(faceVerifyForceExitProperty.getValue());
|
|
|
+ // 是否考中活体不通过强制退出
|
|
|
+ ExamPropertyCacheBean faceVerifyForceExitProperty = CacheHelper.getExamProperty(examId, ExamProperties.FACE_VERIFY_FORCE_EXIT.name());
|
|
|
+ isFaceVerifyForceExit = faceVerifyForceExitProperty != null && StringUtil.isTrue(faceVerifyForceExitProperty.getValue());
|
|
|
|
|
|
- // 是否开启虚拟摄像头进入待审核
|
|
|
- ExamPropertyCacheBean virtualCameraAuditEnabledProperty = CacheHelper.getExamProperty(examId, ExamProperties.VIRTUAL_CAMERA_AUDIT_ENABLED.name());
|
|
|
- boolean isVirtualCameraAuditEnabled = virtualCameraAuditEnabledProperty != null && StringUtil.isTrue(virtualCameraAuditEnabledProperty.getValue());
|
|
|
+ // 是否开启虚拟摄像头进入待审核
|
|
|
+ ExamPropertyCacheBean virtualCameraAuditEnabledProperty = CacheHelper.getExamProperty(examId, ExamProperties.VIRTUAL_CAMERA_AUDIT_ENABLED.name());
|
|
|
+ isVirtualCameraAuditEnabled = virtualCameraAuditEnabledProperty != null && StringUtil.isTrue(virtualCameraAuditEnabledProperty.getValue());
|
|
|
+ }
|
|
|
|
|
|
// 是否开启审核全通过
|
|
|
ExamPropertyCacheBean auditAllPassProperty = CacheHelper.getExamProperty(examId, ExamProperties.AUDIT_ALL_PASS.name());
|
|
|
boolean isAuditAllPass = auditAllPassProperty != null && StringUtil.isTrue(auditAllPassProperty.getValue());
|
|
|
|
|
|
- // 检查当前考生是否跳过人脸识别
|
|
|
- boolean skipFace = false;
|
|
|
- if (isFaceEnable) {
|
|
|
- skipFace = this.checkExamSkipFace(examId, examStudentId);
|
|
|
- }
|
|
|
-
|
|
|
//先更新考生的考试次数
|
|
|
updateExamStudent(examStudentId);
|
|
|
|
|
@@ -226,6 +226,8 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
//同步活检结果: FACE_CLIENT("S3", "C端活体检测方案")
|
|
|
syncFaceLiveVerifyRecords(req.getFaceLiveVerifyRecords(), realExamRecordDataId);
|
|
|
|
|
|
+ // ******************** 处理违纪、异常、审核等场景 start ********************
|
|
|
+
|
|
|
//【违纪】非法考生端应用
|
|
|
String illegalReason = redisClient.get(CacheConstants.CACHE_OE_DISCIPLINE_ILLEGAL_CLIENT + tempExamRecordDataId, String.class);
|
|
|
if (StringUtils.isNotEmpty(illegalReason)) {
|
|
@@ -307,6 +309,8 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
LOG.warn("{}_{}_{} AuditAllPass...", studentId, tempExamRecordDataId, realExamRecordDataId);
|
|
|
}
|
|
|
|
|
|
+ // ******************** 处理违纪、异常、审核等场景 end ********************
|
|
|
+
|
|
|
//计算最终分数(这个步骤必须放在所有改变“违纪、警告、审核状态”的操作之后)
|
|
|
if (ExamType.ONLINE.name().equals(examType) || ExamType.ONLINE_HOMEWORK.name().equals(examType)
|
|
|
|| ExamType.OFFLINE.name().equals(examType)) {
|
|
@@ -335,11 +339,12 @@ public class SyncExamDataCloudServiceProvider extends ControllerSupport implemen
|
|
|
//开启审核全通过
|
|
|
Optional<ExamRecordDataEntity> optional = examRecordDataRepo.findById(realExamRecordDataId);
|
|
|
if (optional.isPresent()) {
|
|
|
+ boolean isPass = examAuditService.updateExamAuditByAllPass(realExamRecordDataId);
|
|
|
// 修改考试记录为已审
|
|
|
ExamRecordDataEntity entity = optional.get();
|
|
|
entity.setIsWarn(false);
|
|
|
entity.setIsIllegality(false);
|
|
|
- if (examAuditService.updateExamAuditByAllPass(realExamRecordDataId)) {
|
|
|
+ if (isPass) {
|
|
|
entity.setIsAudit(true);
|
|
|
} else {
|
|
|
entity.setIsAudit(false);
|