|
@@ -308,6 +308,9 @@ public class ExamRecordDataServiceImpl implements ExamRecordDataService {
|
|
|
boolean isFaceVerifyForceExit = examProperty != null && StringUtil.isTrue(examProperty.getValue());
|
|
|
|
|
|
if (examRecordData.getFaceVerifyResult() != null) {
|
|
|
+ log.warn("活检结果:{} studentId:{} examRecordDataId:{}", examRecordData.getFaceVerifyResult(), studentId,
|
|
|
+ examRecordData.getId());
|
|
|
+
|
|
|
if (IsSuccess.SUCCESS == examRecordData.getFaceVerifyResult()) {
|
|
|
// 存在活体检测成功结果,则直接返回
|
|
|
return new CalcFaceBiopsyResultResp(IsSuccess.SUCCESS);
|
|
@@ -341,11 +344,19 @@ public class ExamRecordDataServiceImpl implements ExamRecordDataService {
|
|
|
}
|
|
|
return -1;
|
|
|
}).get();
|
|
|
- if (lastVerify.getStatus() != null && FaceLiveVerifyStatus.SUCCESS == lastVerify.getStatus()) {
|
|
|
+
|
|
|
+ if (lastVerify.getStatus() == null) {
|
|
|
+ // 活检状态未知,不作为违纪或异常。
|
|
|
+ log.warn("S3 活检状态未知!studentId:{} examRecordDataId:{} lastVerifyId:{}", studentId,
|
|
|
+ examRecordData.getId(), lastVerify.getId());
|
|
|
+ return new CalcFaceBiopsyResultResp();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (FaceLiveVerifyStatus.SUCCESS == lastVerify.getStatus()) {
|
|
|
return new CalcFaceBiopsyResultResp(IsSuccess.SUCCESS);
|
|
|
}
|
|
|
} else if (faceBiopsyScheme == FaceBiopsyScheme.FACE_MOTION) {
|
|
|
- // S2 自研活体检测方案
|
|
|
+ // S2 自研活体检测方案【已废弃】
|
|
|
FaceBiopsyEntity lastVerify = faceBiopsyRepo.findByExamRecordDataId(examRecordData.getId());
|
|
|
|
|
|
if (lastVerify == null) {
|
|
@@ -353,7 +364,14 @@ public class ExamRecordDataServiceImpl implements ExamRecordDataService {
|
|
|
return new CalcFaceBiopsyResultResp();
|
|
|
}
|
|
|
|
|
|
- if (lastVerify.getResult() != null && lastVerify.getResult()) {
|
|
|
+ if (lastVerify.getResult() == null) {
|
|
|
+ // 活检状态未知,不作为违纪或异常。
|
|
|
+ log.warn("S2 活检状态未知!studentId:{} examRecordDataId:{} lastVerifyId:{}", studentId,
|
|
|
+ examRecordData.getId(), lastVerify.getId());
|
|
|
+ return new CalcFaceBiopsyResultResp();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (lastVerify.getResult()) {
|
|
|
return new CalcFaceBiopsyResultResp(IsSuccess.SUCCESS);
|
|
|
}
|
|
|
} else {
|
|
@@ -368,8 +386,15 @@ public class ExamRecordDataServiceImpl implements ExamRecordDataService {
|
|
|
|
|
|
// 最后一次活检成功,则认为成功
|
|
|
ExamFaceLivenessVerifyEntity lastVerify = verifies.get(verifies.size() - 1);
|
|
|
- if (lastVerify.getVerifyResult() != null
|
|
|
- && FaceVerifyResult.VERIFY_SUCCESS == lastVerify.getVerifyResult()) {
|
|
|
+
|
|
|
+ if (lastVerify.getVerifyResult() == null) {
|
|
|
+ // 活检状态未知,不作为违纪或异常。
|
|
|
+ log.warn("S1 活检状态未知!studentId:{} examRecordDataId:{} lastVerifyId:{}", studentId,
|
|
|
+ examRecordData.getId(), lastVerify.getId());
|
|
|
+ return new CalcFaceBiopsyResultResp();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (FaceVerifyResult.VERIFY_SUCCESS == lastVerify.getVerifyResult()) {
|
|
|
return new CalcFaceBiopsyResultResp(IsSuccess.SUCCESS);
|
|
|
}
|
|
|
}
|