|
@@ -203,39 +203,18 @@ public class TIeInvigilateWarnInfoController {
|
|
}
|
|
}
|
|
//2020/11/24新增管理员不清除预警状态
|
|
//2020/11/24新增管理员不清除预警状态
|
|
if (!authDto.getRoleCodes().toString().contains(RoleEnum.ADMIN.name())) {
|
|
if (!authDto.getRoleCodes().toString().contains(RoleEnum.ADMIN.name())) {
|
|
- tOeExamRecordService.approveStatusListUpdate(examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, tbUser.getOrgId());
|
|
|
|
- }
|
|
|
|
- return ResultUtil.ok(true);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 预警通知公用
|
|
|
|
- *
|
|
|
|
- * @param admin
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- protected Integer warnNotifyCommon(boolean admin) {
|
|
|
|
- Integer count = null;
|
|
|
|
- TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
|
|
- QueryWrapper<TBExamInvigilateUser> tbExamInvigilateUserQueryWrapper = new QueryWrapper<>();
|
|
|
|
- tbExamInvigilateUserQueryWrapper.lambda().eq(TBExamInvigilateUser::getOrgId, tbUser.getOrgId());
|
|
|
|
- if (!admin) {
|
|
|
|
- tbExamInvigilateUserQueryWrapper.lambda().eq(TBExamInvigilateUser::getUserId, tbUser.getId());
|
|
|
|
- }
|
|
|
|
- List<TBExamInvigilateUser> tbExamInvigilateUserList = tbExamInvigilateUserService.list(tbExamInvigilateUserQueryWrapper);
|
|
|
|
- if (!CollectionUtils.isEmpty(tbExamInvigilateUserList)) {
|
|
|
|
- List<TEExamSummary> teExamSummaryAllList = new ArrayList<>();
|
|
|
|
- for (TBExamInvigilateUser t : tbExamInvigilateUserList) {
|
|
|
|
- List<TEExamActivity> teExamActivityList = teExamActivityService.list(new QueryWrapper<TEExamActivity>().lambda().eq(TEExamActivity::getExamId, t.getExamId()));
|
|
|
|
- for (TEExamActivity teExamActivity : teExamActivityList) {
|
|
|
|
- teExamSummaryService.examSummary(t.getExamId(), teExamActivity.getId(), new HashSet<>(Arrays.asList(t.getRoomCode())));
|
|
|
|
- teExamSummaryAllList.addAll(themisCacheService.addExamSummaryCache(t.getExamId(), teExamActivity.getId(), t.getRoomCode()));
|
|
|
|
- }
|
|
|
|
|
|
+ QueryWrapper<TOeExamRecord> tOeExamRecordQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ if (Objects.nonNull(examId)) {
|
|
|
|
+ tOeExamRecordQueryWrapper.lambda().eq(TOeExamRecord::getExamId, examId);
|
|
|
|
+ } else if (Objects.nonNull(examActivityId)) {
|
|
|
|
+ tOeExamRecordQueryWrapper.lambda().eq(TOeExamRecord::getExamActivityId, examActivityId);
|
|
}
|
|
}
|
|
- if (!CollectionUtils.isEmpty(teExamSummaryAllList)) {
|
|
|
|
- count = teExamSummaryAllList.stream().mapToInt(s -> s.getWarningUnread()).sum();
|
|
|
|
|
|
+ List<TOeExamRecord> tOeExamRecordList = tOeExamRecordService.list(tOeExamRecordQueryWrapper);
|
|
|
|
+ for (TOeExamRecord t : tOeExamRecordList) {
|
|
|
|
+ tOeExamRecordService.updateWarningUnreadCache(t.getId(), 0);
|
|
}
|
|
}
|
|
|
|
+ tOeExamRecordService.approveStatusListUpdate(examId, examActivityId, roomCode, approveStatus, name, identity, minMultipleFaceCount, maxMultipleFaceCount, minExceptionCount, maxExceptionCount, minWarningCount, maxWarningCount, userId, tbUser.getOrgId());
|
|
}
|
|
}
|
|
- return count;
|
|
|
|
|
|
+ return ResultUtil.ok(true);
|
|
}
|
|
}
|
|
}
|
|
}
|