|
@@ -13,7 +13,6 @@ import com.qmth.themis.business.enums.ExamTypeEnum;
|
|
|
import com.qmth.themis.business.enums.VerifyExceptionEnum;
|
|
|
import com.qmth.themis.business.enums.WarningLevelEnum;
|
|
|
import com.qmth.themis.business.service.*;
|
|
|
-import com.qmth.themis.business.util.RedisUtil;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -71,7 +70,7 @@ public class WarningServiceImpl implements WarningService {
|
|
|
Integer count = Integer.parseInt(String.valueOf(map.get("tmpCount")));
|
|
|
count = Objects.isNull(count) ? 0 : count;
|
|
|
if (count >= teConfig.getMultipleFaceCountError()) {
|
|
|
- TIeInvigilateWarnInfo tIeInvigilateWarnInfo = new TIeInvigilateWarnInfo(examId, examActivityId, recordId, examStudentId, warningEnum.getLevel().get(1), WarningLevelEnum.valueOf(warningEnum.getLevel().get(1)).getDesc(), warningEnum, photoUrl);
|
|
|
+ TIeInvigilateWarnInfo tIeInvigilateWarnInfo = new TIeInvigilateWarnInfo(examId, examActivityId, recordId, examStudentId, warningEnum.getLevel().get(1), WarningLevelEnum.valueOf(warningEnum.getLevel().get(1)).getTitle(), warningEnum, photoUrl);
|
|
|
tIeInvigilateWarnInfoService.saveOrUpdate(tIeInvigilateWarnInfo);
|
|
|
this.setWarningCount(recordId);
|
|
|
this.setPhotoUrls(map, photoUrl, tIeInvigilateWarnInfo, examStudentCacheBean, recordId);
|
|
@@ -83,7 +82,7 @@ public class WarningServiceImpl implements WarningService {
|
|
|
Integer count = Integer.parseInt(String.valueOf(map.get("tmpCount")));
|
|
|
count = Objects.isNull(count) ? 0 : count;
|
|
|
if (count >= teConfig.getNoFaceCountError()) {
|
|
|
- TIeInvigilateWarnInfo tIeInvigilateWarnInfo = new TIeInvigilateWarnInfo(examId, examActivityId, recordId, examStudentId, warningEnum.getLevel().get(0), WarningLevelEnum.valueOf(warningEnum.getLevel().get(0)).getDesc(), warningEnum, photoUrl);
|
|
|
+ TIeInvigilateWarnInfo tIeInvigilateWarnInfo = new TIeInvigilateWarnInfo(examId, examActivityId, recordId, examStudentId, warningEnum.getLevel().get(0), WarningLevelEnum.valueOf(warningEnum.getLevel().get(0)).getTitle(), warningEnum, photoUrl);
|
|
|
tIeInvigilateWarnInfoService.saveOrUpdate(tIeInvigilateWarnInfo);
|
|
|
this.setWarningCount(recordId);
|
|
|
this.setPhotoUrls(map, photoUrl, tIeInvigilateWarnInfo, examStudentCacheBean, recordId);
|
|
@@ -113,13 +112,13 @@ public class WarningServiceImpl implements WarningService {
|
|
|
Integer count = Integer.parseInt(String.valueOf(map.get("tmpCount")));
|
|
|
count = Objects.isNull(count) ? 0 : count;
|
|
|
if (count >= teConfig.getMatchFaceCompareErrorCount()) {
|
|
|
- TIeInvigilateWarnInfo tIeInvigilateWarnInfo = new TIeInvigilateWarnInfo(examId, examActivityId, recordId, examStudentId, warningEnum.getLevel().get(0), WarningLevelEnum.valueOf(warningEnum.getLevel().get(0)).getDesc(), warningEnum, photoUrl);
|
|
|
+ TIeInvigilateWarnInfo tIeInvigilateWarnInfo = new TIeInvigilateWarnInfo(examId, examActivityId, recordId, examStudentId, warningEnum.getLevel().get(0), WarningLevelEnum.valueOf(warningEnum.getLevel().get(0)).getTitle(), warningEnum, photoUrl);
|
|
|
tIeInvigilateWarnInfoService.saveOrUpdate(tIeInvigilateWarnInfo);
|
|
|
this.setWarningCount(recordId);
|
|
|
this.setPhotoUrls(map, photoUrl, tIeInvigilateWarnInfo, examStudentCacheBean, recordId);
|
|
|
}
|
|
|
if (count >= teConfig.getTotalFaceCompareErrorCount()) {
|
|
|
- TIeInvigilateWarnInfo tIeInvigilateWarnInfo = new TIeInvigilateWarnInfo(examId, examActivityId, recordId, examStudentId, warningEnum.getLevel().get(1), WarningLevelEnum.valueOf(warningEnum.getLevel().get(1)).getDesc(), warningEnum, photoUrl);
|
|
|
+ TIeInvigilateWarnInfo tIeInvigilateWarnInfo = new TIeInvigilateWarnInfo(examId, examActivityId, recordId, examStudentId, warningEnum.getLevel().get(1), WarningLevelEnum.valueOf(warningEnum.getLevel().get(1)).getTitle(), warningEnum, photoUrl);
|
|
|
tIeInvigilateWarnInfoService.saveOrUpdate(tIeInvigilateWarnInfo);
|
|
|
this.setWarningCount(recordId);
|
|
|
this.setPhotoUrls(map, photoUrl, tIeInvigilateWarnInfo, examStudentCacheBean, recordId);
|
|
@@ -166,10 +165,10 @@ public class WarningServiceImpl implements WarningService {
|
|
|
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.getDesc(), warningEnum);
|
|
|
+ TIeInvigilateWarnInfo tIeInvigilateWarnInfo = new TIeInvigilateWarnInfo(examId, examActivityId, recordId, examStudentId, WarningLevelEnum.D15.name(), WarningLevelEnum.D15.getTitle(), warningEnum);
|
|
|
tIeInvigilateWarnInfoService.saveOrUpdate(tIeInvigilateWarnInfo);
|
|
|
this.setWarningCount(recordId);
|
|
|
- TEExamStudentLog teExamStudentLog = new TEExamStudentLog(tIeInvigilateWarnInfo.getType().name(), tIeInvigilateWarnInfo.getType().getCode(), tIeInvigilateWarnInfo.getType().getCode(), examStudentCacheBean.getStudentId(), examStudentCacheBean.getId(), recordId);
|
|
|
+ TEExamStudentLog teExamStudentLog = new TEExamStudentLog(tIeInvigilateWarnInfo.getType().name(), WarningLevelEnum.valueOf(tIeInvigilateWarnInfo.getLevel()).getTitle(), tIeInvigilateWarnInfo.getType().getCode(), examStudentCacheBean.getStudentId(), examStudentCacheBean.getId(), recordId);
|
|
|
teExamStudentLogService.saveOrUpdate(teExamStudentLog);
|
|
|
}
|
|
|
}
|
|
@@ -208,7 +207,7 @@ public class WarningServiceImpl implements WarningService {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("PHOTOS", photoUrls);
|
|
|
jsonObject.put("MIN_CREATE_TIME", map.get("createTime"));
|
|
|
- TEExamStudentLog teExamStudentLog = new TEExamStudentLog(tIeInvigilateWarnInfo.getType().name(), tIeInvigilateWarnInfo.getType().getCode(), jsonObject.toJSONString(), examStudentCacheBean.getStudentId(), examStudentCacheBean.getId(), recordId);
|
|
|
+ TEExamStudentLog teExamStudentLog = new TEExamStudentLog(tIeInvigilateWarnInfo.getType().name(), WarningLevelEnum.valueOf(tIeInvigilateWarnInfo.getLevel()).getTitle(), jsonObject.toJSONString(), examStudentCacheBean.getStudentId(), examStudentCacheBean.getId(), recordId);
|
|
|
teExamStudentLogService.saveOrUpdate(teExamStudentLog);
|
|
|
}
|
|
|
}
|