lideyin %!s(int64=5) %!d(string=hai) anos
pai
achega
ed035ec13e

+ 6 - 0
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/service/impl/ExamFaceLivenessVerifyServiceImpl.java

@@ -215,6 +215,12 @@ public class ExamFaceLivenessVerifyServiceImpl implements ExamFaceLivenessVerify
         //保存活体检测的结果
         ExamRecordData examRecordData = examRecordDataService.getExamRecordDataCache(examRecordDataId);
         examRecordData.setFaceVerifyResult(IsSuccess.strToEnum(result) == IsSuccess.FAILED ? IsSuccess.FAILED : IsSuccess.SUCCESS);
+
+        //活检失败,则认为违纪
+        if (IsSuccess.strToEnum(result) == IsSuccess.FAILED) {
+            examRecordData.setIsIllegality(true);
+        }
+
         examRecordDataService.saveExamRecordDataCache(examRecordDataId, examRecordData);
 
         //如果活体检失败,需要清除会话并自动交卷

+ 6 - 1
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/service/impl/FaceBiopsyServiceImpl.java

@@ -31,7 +31,6 @@ import cn.com.qmth.examcloud.support.redis.RedisKeyHelper;
 import cn.com.qmth.examcloud.web.bootstrap.PropertyHolder;
 import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
 import cn.com.qmth.examcloud.web.redis.RedisClient;
-
 import com.google.common.collect.Lists;
 import com.mysql.cj.util.StringUtils;
 import org.apache.commons.lang3.RandomUtils;
@@ -156,6 +155,12 @@ public class FaceBiopsyServiceImpl implements FaceBiopsyService {
             throw new StatusException("201010", "找不到相关考试记录数据");
         }
         examRecordData.setFaceVerifyResult(resp.getVerifyResult() ? IsSuccess.SUCCESS : IsSuccess.FAILED);
+
+        //活检失败,则认为违纪
+        if (!resp.getVerifyResult()) {
+            examRecordData.setIsIllegality(true);
+        }
+
         examRecordDataService.saveExamRecordDataCache(req.getExamRecordDataId(), examRecordData);
 
         return resp;