|
@@ -14,6 +14,7 @@ import cn.com.qmth.examcloud.core.oe.student.service.ExamControlService;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.service.ExamFaceLivenessVerifyService;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.service.ExamRecordDataService;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.service.ExamingSessionService;
|
|
|
+import cn.com.qmth.examcloud.support.Constants;
|
|
|
import cn.com.qmth.examcloud.support.cache.CacheHelper;
|
|
|
import cn.com.qmth.examcloud.support.cache.bean.StudentCacheBean;
|
|
|
import cn.com.qmth.examcloud.support.cache.bean.SysPropertyCacheBean;
|
|
@@ -73,11 +74,6 @@ public class ExamFaceLivenessVerifyServiceImpl implements ExamFaceLivenessVerify
|
|
|
@Autowired
|
|
|
SystemProperties systemProperties;
|
|
|
|
|
|
- /**
|
|
|
- * 第二次人脸检测时间范围
|
|
|
- */
|
|
|
- private static final int secondFaceCheckMinute = 4;
|
|
|
-
|
|
|
@Override
|
|
|
public ExamFaceLivenessVerifyEntity saveFaceVerify(Long examRecordDataId) {
|
|
|
ExamFaceLivenessVerifyEntity faceVerify = new ExamFaceLivenessVerifyEntity();
|
|
@@ -340,14 +336,14 @@ public class ExamFaceLivenessVerifyServiceImpl implements ExamFaceLivenessVerify
|
|
|
}
|
|
|
//case3如果考试已用时间>配置结束时间,则默认random(1,4)分钟后开始人脸检测
|
|
|
else if (usedMinute >= faceVerifyEndMinute) {
|
|
|
- return CommonUtil.calculationRandomNumber(1, secondFaceCheckMinute);
|
|
|
+ return CommonUtil.calculationRandomNumber(1, Constants.MAX_FACE_LIVE_VERIFY_MINUTE);
|
|
|
}
|
|
|
} else if (faceLivenessVerifys.size() == 1) {
|
|
|
//如果已经人脸检测过一次且未成功,再安排一次检测
|
|
|
ExamFaceLivenessVerifyEntity faceVerify = faceLivenessVerifys.get(0);
|
|
|
if (faceVerify.getVerifyResult() == null
|
|
|
|| faceVerify.getVerifyResult() != FaceVerifyResult.VERIFY_SUCCESS) {
|
|
|
- return CommonUtil.calculationRandomNumber(1, secondFaceCheckMinute);
|
|
|
+ return CommonUtil.calculationRandomNumber(1, Constants.MAX_FACE_LIVE_VERIFY_MINUTE);
|
|
|
}
|
|
|
}
|
|
|
}
|