|
@@ -83,7 +83,7 @@ public class WarningServiceImpl implements WarningService {
|
|
} else if (faceCount <= 0) {//未检测到人脸
|
|
} else if (faceCount <= 0) {//未检测到人脸
|
|
Map<String, Object> map = faceVerifyHistoryService.faceCountError(recordId, warningDto.getWarningEnum().name(), faceCount, false);
|
|
Map<String, Object> map = faceVerifyHistoryService.faceCountError(recordId, warningDto.getWarningEnum().name(), faceCount, false);
|
|
if (Objects.nonNull(map) && map.size() > 0) {
|
|
if (Objects.nonNull(map) && map.size() > 0) {
|
|
- Integer count = (Integer) map.get("tmpCount");
|
|
|
|
|
|
+ Integer count = Integer.parseInt(String.valueOf(map.get("tmpCount")));
|
|
count = Objects.isNull(count) ? 0 : count;
|
|
count = Objects.isNull(count) ? 0 : count;
|
|
if (count >= teConfig.getNoFaceCountError()) {
|
|
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)).getDesc(), warningEnum, photoUrl);
|
|
@@ -113,7 +113,7 @@ public class WarningServiceImpl implements WarningService {
|
|
ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
Map<String, Object> map = faceVerifyHistoryService.faceCompareError(recordId, warningDto.getWarningEnum().name());
|
|
Map<String, Object> map = faceVerifyHistoryService.faceCompareError(recordId, warningDto.getWarningEnum().name());
|
|
if (Objects.nonNull(map) && map.size() > 0) {
|
|
if (Objects.nonNull(map) && map.size() > 0) {
|
|
- Integer count = (Integer) map.get("tmpCount");
|
|
|
|
|
|
+ Integer count = Integer.parseInt(String.valueOf(map.get("tmpCount")));
|
|
count = Objects.isNull(count) ? 0 : count;
|
|
count = Objects.isNull(count) ? 0 : count;
|
|
if (count >= teConfig.getMatchFaceCompareErrorCount()) {
|
|
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)).getDesc(), warningEnum, photoUrl);
|
|
@@ -211,6 +211,7 @@ public class WarningServiceImpl implements WarningService {
|
|
photoUrls.add(photoUrl);
|
|
photoUrls.add(photoUrl);
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
jsonObject.put("PHOTOS", photoUrls);
|
|
jsonObject.put("PHOTOS", photoUrls);
|
|
|
|
+ jsonObject.put("MIN_CREATE_TIME", (Date) 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(), tIeInvigilateWarnInfo.getType().getCode(), jsonObject.toJSONString(), examStudentCacheBean.getStudentId(), examStudentCacheBean.getId(), recordId);
|
|
teExamStudentLogService.saveOrUpdate(teExamStudentLog);
|
|
teExamStudentLogService.saveOrUpdate(teExamStudentLog);
|
|
}
|
|
}
|