|
@@ -580,23 +580,19 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
}
|
|
|
} else if (Objects.equals(type.toUpperCase(), ExamTypeEnum.IN_PROCESS.name())) {
|
|
|
VerifyExceptionEnum warningEnum = VerifyExceptionEnum.valueOf(exception);
|
|
|
- JSONArray jsonArray = JSONArray.parseArray(actions);
|
|
|
- for (int i = 0; i < jsonArray.size(); i++) {
|
|
|
- JSONObject jsonObject = jsonArray.getJSONObject(i);
|
|
|
- if (Objects.equals(VerifyExceptionEnum.NONE, warningEnum)) {//无异常,往考生日志表里插一条
|
|
|
- livenessVerifyHistoryService.save(id, recordId, type, actions, retry, startTime, finishTime, exception, null);
|
|
|
- } else {
|
|
|
- if (Objects.equals(VerifyExceptionEnum.FACE_COMPARE_ERROR, warningEnum) || Objects.equals(VerifyExceptionEnum.FACE_COUNT_ERROR, warningEnum)) {//人脸数量异常
|
|
|
- Integer faceCount = Integer.parseInt(String.valueOf(jsonObject.get("faceCount")));
|
|
|
- WarningDto warningDto = new WarningDto(warningEnum, faceCount, null, recordId, String.valueOf(jsonObject.get("photoUrl")));
|
|
|
- livenessVerifyHistoryService.save(id, recordId, type, actions, retry, startTime, finishTime, exception, null);
|
|
|
- warningService.livenessActionError(warningDto);
|
|
|
- } else if (Objects.equals(VerifyExceptionEnum.FACE_COMPARE_ERROR, warningEnum) || Objects.equals(VerifyExceptionEnum.LIVENESS_ACTION_ERROR, warningEnum)) {//活检动作错误
|
|
|
- WarningDto warningDto = new WarningDto(warningEnum, null, null, recordId, String.valueOf(jsonObject.get("photoUrl")));
|
|
|
- livenessVerifyHistoryService.save(id, recordId, type, actions, retry, startTime, finishTime, exception, null);
|
|
|
- warningService.livenessActionError(warningDto);
|
|
|
- }
|
|
|
+ if (Objects.equals(VerifyExceptionEnum.NONE, warningEnum)) {//无异常,往考生日志表里插一条
|
|
|
+ livenessVerifyHistoryService.save(id, recordId, type, actions, retry, startTime, finishTime, exception, null);
|
|
|
+ } else {
|
|
|
+ String livenessActionErrorRandom = ExamRecordCacheUtil.getLivenessActionErrorRandom(recordId);
|
|
|
+ if (Objects.isNull(livenessActionErrorRandom)) {
|
|
|
+ livenessActionErrorRandom = SystemConstant.getNanoId();
|
|
|
+ ExamRecordCacheUtil.setLivenessActionErrorRandom(recordId, livenessActionErrorRandom);
|
|
|
}
|
|
|
+ WarningDto warningDto = new WarningDto(warningEnum, null, null, recordId, null);
|
|
|
+ warningDto.setRandom(livenessActionErrorRandom);
|
|
|
+ livenessVerifyHistoryService.save(id, recordId, type, actions, retry, startTime, finishTime, exception, livenessActionErrorRandom);
|
|
|
+ ExamRecordCacheUtil.setLivenessActionErrorRandom(recordId, SystemConstant.getNanoId());
|
|
|
+ warningService.livenessActionError(warningDto);
|
|
|
}
|
|
|
} else {
|
|
|
livenessVerifyHistoryService.save(id, recordId, type, actions, retry, startTime, finishTime, exception, null);
|