deason 1 gadu atpakaļ
vecāks
revīzija
08785d2e5c

+ 6 - 3
examcloud-core-oe-task-service/src/main/java/cn/com/qmth/examcloud/core/oe/task/service/impl/ExamRecordDataServiceImpl.java

@@ -123,6 +123,8 @@ public class ExamRecordDataServiceImpl implements ExamRecordDataService {
 
     @Override
     public ExamRecordData processAfterHandInExam(ExamRecordData examRecordData) {
+        long startTime = System.currentTimeMillis();
+
         //只有开启的人脸的才会进行如下处理
         if (FaceBiopsyHelper.isFaceEnable(examRecordData.getRootOrgId(), examRecordData.getExamId(), examRecordData.getStudentId())) {
 
@@ -207,9 +209,6 @@ public class ExamRecordDataServiceImpl implements ExamRecordDataService {
             if (null != isAudit) {
                 examRecordData.setIsAudit(isAudit);
             }
-
-            log.info("examRecordDataId:{} isIllegality:{} isWarn:{}  isAudit:{}",
-                    examRecordData.getId(), examRecordData.getIsIllegality(), isWarn, isAudit);
         }
 
         //自动计算客观分
@@ -231,6 +230,10 @@ public class ExamRecordDataServiceImpl implements ExamRecordDataService {
         // 更新考试记录状态
         examRecordDataRepo.updateExamRecordStatusById(examRecordData.getExamRecordStatus(), new Date(), examRecordData.getId());
 
+        long cost = (System.currentTimeMillis() - startTime) / 1000;
+        log.warn("processAfterHandInExam ok, studentId:{} examRecordDataId:{} examType:{} isIllegality:{} isWarn:{} isAudit:{} cost:{}s",
+                examRecordData.getStudentId(), examRecordData.getId(), examRecordData.getExamType(),
+                examRecordData.getIsIllegality(), examRecordData.getIsWarn(), examRecordData.getIsAudit(), cost);
         return examRecordData;
     }
 

+ 0 - 4
examcloud-core-oe-task-service/src/main/java/cn/com/qmth/examcloud/core/oe/task/service/job/AfterHandInExamJobHandler.java

@@ -109,11 +109,7 @@ public class AfterHandInExamJobHandler {
 
         try {
             // 处理人脸、活体、违纪、算分等
-            long startTime = System.currentTimeMillis();
             examRecordDataService.processAfterHandInExam(examRecordDataCache);
-            long cost = (System.currentTimeMillis() - startTime) / 1000;
-            log.warn("processAfterHandInExam ok, examRecordDataId:{}, studentId:{}, examType:{}, cost:{}s",
-                    examRecordDataCache.getId(), examRecordDataCache.getStudentId(), examRecordDataCache.getExamType(), cost);
         } catch (Exception e) {
             log.error("processAfterHandInExam fail, examRecordDataId:{}, error:{}", examRecordDataCache.getId(), e.getMessage());
             throw e;

+ 10 - 7
examcloud-core-oe-task-service/src/main/java/cn/com/qmth/examcloud/core/oe/task/service/job/SyncExamRecordDataJobHandler.java

@@ -157,7 +157,7 @@ public class SyncExamRecordDataJobHandler {
         Long examId = examRecordDataCache.getExamId();
         Long studentId = examRecordDataCache.getStudentId();
 
-        // 是否开启人脸比对检测
+        // 是否开启人脸验证
         if (FaceBiopsyHelper.isFaceEnable(rootOrgId, examId, studentId)) {
             // 获取同步抓拍照片处理结果(Mysql中)
             ExamSyncCaptureBean syncCapture = commonService.getExamSyncCapture(examRecordDataId);
@@ -167,14 +167,17 @@ public class SyncExamRecordDataJobHandler {
             List<ExamCaptureBean> captures = commonService.getExamCaptures(examRecordDataId);
             syncReq.setExamCaptures(captures);
 
-            // S1 FACE_ID FaceID活体检测方案(即旧活体检测方案)
-            syncReq.setExamFaceLivenessVerifies(commonService.getExamFaceLivenessVerifies(examRecordDataId));
+            // 是否开启考中人脸活体检测
+            if (FaceBiopsyHelper.isFaceVerify(rootOrgId, examId, studentId)) {
+                // S1 FACE_ID FaceID活体检测方案(即旧活体检测方案)
+                syncReq.setExamFaceLivenessVerifies(commonService.getExamFaceLivenessVerifies(examRecordDataId));
 
-            // S2 FACE_MOTION 自研活体检测方案【已废弃】
-            syncReq.setFaceBiopsy(commonService.getFaceBiopsy(examRecordDataId));
+                // S2 FACE_MOTION 自研活体检测方案【已废弃】
+                syncReq.setFaceBiopsy(commonService.getFaceBiopsy(examRecordDataId));
 
-            // S3 FACE_CLIENT C端活体检测方案
-            syncReq.setFaceLiveVerifyRecords(commonService.getFaceLiveVerifyRecords(examRecordDataId));
+                // S3 FACE_CLIENT C端活体检测方案
+                syncReq.setFaceLiveVerifyRecords(commonService.getFaceLiveVerifyRecords(examRecordDataId));
+            }
         }
 
         // 考试记录信息