|
@@ -96,16 +96,18 @@ public class ExamCaptureServiceImpl implements ExamCaptureService {
|
|
|
|
|
|
@Override
|
|
|
public CompareFaceSyncInfo compareFaceSync(StudentCacheBean student, String fileUrl) {
|
|
|
- // 获取学校人脸API方案配置
|
|
|
+ // 获取学校“开考时人脸识别API”配置
|
|
|
boolean useBaiduApi = false;
|
|
|
- Double baiduExpectFaceCompareScore = null;
|
|
|
- OrgPropertyCacheBean property1 = CacheHelper.getOrgProperty(student.getRootOrgId(), Constants.FACE_VERIFY_API_PROVIDER);
|
|
|
- if (property1.getHasValue() && FaceApiProvider.BAIDU.name().equals(property1.getValue())) {
|
|
|
+ OrgPropertyCacheBean faceApiConfig = CacheHelper.getOrgProperty(student.getRootOrgId(), Constants.FACE_VERIFY_API_PROVIDER);
|
|
|
+ if (faceApiConfig.getHasValue() && FaceApiProvider.BAIDU.name().equals(faceApiConfig.getValue())) {
|
|
|
useBaiduApi = true;
|
|
|
}
|
|
|
- OrgPropertyCacheBean property2 = CacheHelper.getOrgProperty(student.getRootOrgId(), Constants.BAIDU_EXPECT_FACE_COMPARE_SCORE);
|
|
|
- if (property2.getHasValue() && StringUtils.isNotEmpty(property2.getValue())) {
|
|
|
- baiduExpectFaceCompareScore = Double.parseDouble(property2.getValue());
|
|
|
+
|
|
|
+ // 获取学校“百度人脸比对通过阈值”配置
|
|
|
+ Double baiduExpectFaceCompareScore = null;
|
|
|
+ OrgPropertyCacheBean faceScoreConfig = CacheHelper.getOrgProperty(student.getRootOrgId(), Constants.BAIDU_EXPECT_FACE_COMPARE_SCORE);
|
|
|
+ if (faceScoreConfig.getHasValue() && StringUtils.isNotEmpty(faceScoreConfig.getValue())) {
|
|
|
+ baiduExpectFaceCompareScore = Double.parseDouble(faceScoreConfig.getValue());
|
|
|
}
|
|
|
|
|
|
CompareFaceSyncInfo info = new CompareFaceSyncInfo();
|