|
@@ -175,22 +175,22 @@ public class WarningServiceImpl implements WarningService {
|
|
|
public void realnessError(WarningDto warningDto) {
|
|
|
Long recordId = warningDto.getRecordId();
|
|
|
VerifyExceptionEnum warningEnum = warningDto.getWarningEnum();
|
|
|
+ String photoUrl = warningDto.getPhotoUrl();
|
|
|
TEConfig teConfig = teConfigService.getGlobalConfig();
|
|
|
Long examId = ExamRecordCacheUtil.getExamId(recordId);
|
|
|
Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
|
|
|
Long examActivityId = ExamRecordCacheUtil.getExamActivityId(recordId);
|
|
|
- QueryWrapper<TOeFaceVerifyHistory> tOeFaceVerifyHistoryQueryWrapper = new QueryWrapper<>();
|
|
|
- tOeFaceVerifyHistoryQueryWrapper.lambda().eq(TOeFaceVerifyHistory::getExamRecordId, recordId)
|
|
|
- .eq(TOeFaceVerifyHistory::getException, warningEnum.name())
|
|
|
- .eq(TOeFaceVerifyHistory::getBatchNo, warningDto.getRandom());
|
|
|
ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
|
- int count = faceVerifyHistoryService.count(tOeFaceVerifyHistoryQueryWrapper);
|
|
|
- if (count > teConfig.getRealnessCount()) {
|
|
|
- TIeInvigilateWarnInfo tIeInvigilateWarnInfo = new TIeInvigilateWarnInfo(examId, examActivityId, recordId, examStudentId, WarningLevelEnum.D15.name(), WarningLevelEnum.D15.getTitle(), warningEnum, Objects.nonNull(ExamRecordCacheUtil.getBreachStatus(recordId)) ? ExamRecordCacheUtil.getBreachStatus(recordId) : 1);
|
|
|
- tIeInvigilateWarnInfoService.saveOrUpdate(tIeInvigilateWarnInfo);
|
|
|
- this.setWarningCount(recordId);
|
|
|
- TEExamStudentLog teExamStudentLog = new TEExamStudentLog(tIeInvigilateWarnInfo.getType().name(), WarningLevelEnum.valueOf(tIeInvigilateWarnInfo.getLevel()).getTitle(), tIeInvigilateWarnInfo.getType().getCode(), examStudentCacheBean.getStudentId(), examStudentCacheBean.getId(), recordId, WarningLevelEnum.valueOf(tIeInvigilateWarnInfo.getLevel()).getSecondTitle());
|
|
|
- teExamStudentLogService.saveOrUpdate(teExamStudentLog);
|
|
|
+ Map<String, Object> map = faceVerifyHistoryService.realnessError(recordId, warningDto.getWarningEnum().name(), ExamTypeEnum.IN_PROCESS.name(), warningDto.getRandom());
|
|
|
+ if (Objects.nonNull(map) && map.size() > 0) {
|
|
|
+ Integer count = Integer.parseInt(String.valueOf(map.get("tmpCount")));
|
|
|
+ count = Objects.isNull(count) ? 0 : count;
|
|
|
+ if (count > teConfig.getRealnessCount()) {
|
|
|
+ TIeInvigilateWarnInfo tIeInvigilateWarnInfo = new TIeInvigilateWarnInfo(examId, examActivityId, recordId, examStudentId, WarningLevelEnum.D15.name(), WarningLevelEnum.D15.getTitle(), warningEnum, Objects.nonNull(ExamRecordCacheUtil.getBreachStatus(recordId)) ? ExamRecordCacheUtil.getBreachStatus(recordId) : 1);
|
|
|
+ tIeInvigilateWarnInfoService.saveOrUpdate(tIeInvigilateWarnInfo);
|
|
|
+ this.setWarningCount(recordId);
|
|
|
+ this.setPhotoUrls(map, tIeInvigilateWarnInfo, examStudentCacheBean, recordId, teConfig.getRealnessCount());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|