|
@@ -350,7 +350,7 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
warningDto.setRandom(multipleFaceRandom);
|
|
|
faceVerifyHistoryService.save(id, recordId, type, photoUrl, faceCount, similarity, realness, time, exception, multipleFaceRandom);
|
|
|
Integer count = ExamRecordCacheUtil.getMultipleFaceCountErrorNum(recordId);
|
|
|
- if (count >= teConfig.getMultipleFaceCountError()) {
|
|
|
+ if (count > teConfig.getMultipleFaceCountError()) {
|
|
|
ExamRecordCacheUtil.setMultipleFaceCountErrorRandom(recordId, String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|
|
|
ExamRecordCacheUtil.setMultipleFaceCountErrorNum(recordId, 0);
|
|
|
warningService.faceCountError(warningDto);
|
|
@@ -365,7 +365,7 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
warningDto.setRandom(noFaceRandom);
|
|
|
faceVerifyHistoryService.save(id, recordId, type, photoUrl, faceCount, similarity, realness, time, exception, noFaceRandom);
|
|
|
Integer count = ExamRecordCacheUtil.getNoFaceCountErrorNum(recordId);
|
|
|
- if (count >= teConfig.getNoFaceCountError()) {
|
|
|
+ if (count > teConfig.getNoFaceCountError()) {
|
|
|
ExamRecordCacheUtil.setNoFaceCountErrorRandom(recordId, String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|
|
|
ExamRecordCacheUtil.setNoFaceCountErrorNum(recordId, 0);
|
|
|
warningService.faceCountError(warningDto);
|
|
@@ -381,11 +381,26 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
warningDto.setRandom(faceCompareErrorRandom);
|
|
|
faceVerifyHistoryService.save(id, recordId, type, photoUrl, faceCount, similarity, realness, time, exception, null);
|
|
|
Integer count = ExamRecordCacheUtil.getFaceCompareErrorNum(recordId);
|
|
|
- if (count >= teConfig.getTotalFaceCompareErrorCount()) {
|
|
|
+ if (count > teConfig.getTotalFaceCompareErrorCount()) {
|
|
|
ExamRecordCacheUtil.setFaceCompareErrorRandom(recordId, String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|
|
|
ExamRecordCacheUtil.setFaceCompareErrorNum(recordId, 0);
|
|
|
warningService.faceCompareError(warningDto);
|
|
|
}
|
|
|
+ } else if (Objects.equals(VerifyExceptionEnum.EYE_CLOSE_ERROR, warningEnum)) {//闭眼检测异常
|
|
|
+ String eyeCloseErrorRandom = ExamRecordCacheUtil.getEyeCloseErrorRandom(recordId);
|
|
|
+ if (Objects.isNull(eyeCloseErrorRandom)) {
|
|
|
+ eyeCloseErrorRandom = String.valueOf(UUID.randomUUID()).replaceAll("-", "");
|
|
|
+ ExamRecordCacheUtil.setEyeCloseErrorRandom(recordId, eyeCloseErrorRandom);
|
|
|
+ }
|
|
|
+ ExamRecordCacheUtil.setEyeCloseErrorNum(recordId, ExamRecordCacheUtil.getEyeCloseErrorNum(recordId) + 1);
|
|
|
+ warningDto.setRandom(eyeCloseErrorRandom);
|
|
|
+ faceVerifyHistoryService.save(id, recordId, type, photoUrl, faceCount, similarity, realness, time, exception, null);
|
|
|
+ Integer count = ExamRecordCacheUtil.getEyeCloseErrorNum(recordId);
|
|
|
+ if (count > teConfig.getTotalEyeCloseErrorCount()) {
|
|
|
+ ExamRecordCacheUtil.setEyeCloseErrorRandom(recordId, String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|
|
|
+ ExamRecordCacheUtil.setEyeCloseErrorNum(recordId, 0);
|
|
|
+ warningService.eyeCloseError(warningDto);
|
|
|
+ }
|
|
|
} else {
|
|
|
faceVerifyHistoryService.save(id, recordId, type, photoUrl, faceCount, similarity, realness, time, exception, null);
|
|
|
warningService.realnessError(warningDto);
|
|
@@ -459,7 +474,7 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
warningDto.setRandom(multipleFaceRandom);
|
|
|
livenessVerifyHistoryService.save(id, recordId, type, actions, retry, startTime, finishTime, exception, multipleFaceRandom);
|
|
|
Integer count = ExamRecordCacheUtil.getMultipleFaceCountErrorNum(recordId);
|
|
|
- if (count >= teConfig.getMultipleFaceCountError()) {
|
|
|
+ if (count > teConfig.getMultipleFaceCountError()) {
|
|
|
ExamRecordCacheUtil.setMultipleFaceCountErrorRandom(recordId, String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|
|
|
ExamRecordCacheUtil.setMultipleFaceCountErrorNum(recordId, 0);
|
|
|
warningService.faceCountError(warningDto);
|
|
@@ -474,7 +489,7 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
warningDto.setRandom(noFaceRandom);
|
|
|
livenessVerifyHistoryService.save(id, recordId, type, actions, retry, startTime, finishTime, exception, noFaceRandom);
|
|
|
Integer count = ExamRecordCacheUtil.getNoFaceCountErrorNum(recordId);
|
|
|
- if (count >= teConfig.getNoFaceCountError()) {
|
|
|
+ if (count > teConfig.getNoFaceCountError()) {
|
|
|
ExamRecordCacheUtil.setNoFaceCountErrorRandom(recordId, String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|
|
|
ExamRecordCacheUtil.setNoFaceCountErrorNum(recordId, 0);
|
|
|
warningService.faceCountError(warningDto);
|
|
@@ -491,7 +506,7 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
warningDto.setRandom(faceCompareErrorRandom);
|
|
|
livenessVerifyHistoryService.save(id, recordId, type, actions, retry, startTime, finishTime, exception, faceCompareErrorRandom);
|
|
|
Integer count = ExamRecordCacheUtil.getFaceCompareErrorNum(recordId);
|
|
|
- if (count >= teConfig.getTotalFaceCompareErrorCount()) {
|
|
|
+ if (count > teConfig.getTotalFaceCompareErrorCount()) {
|
|
|
ExamRecordCacheUtil.setFaceCompareErrorRandom(recordId, String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
|
|
|
ExamRecordCacheUtil.setFaceCompareErrorNum(recordId, 0);
|
|
|
warningService.faceCompareError(warningDto);
|