|
@@ -3,7 +3,7 @@ package com.qmth.themis.admin.api;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import com.qmth.themis.business.bean.admin.ExamListBean;
|
|
|
+import com.qmth.themis.business.bean.admin.ExamInfoBean;
|
|
|
import com.qmth.themis.business.bean.admin.InvigilateListWarningBean;
|
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
|
import com.qmth.themis.business.dto.AuthDto;
|
|
@@ -60,6 +60,9 @@ public class TIeInvigilateWarnInfoController {
|
|
|
@Resource
|
|
|
TEExamService teExamService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ TEExamStudentService teExamStudentService;
|
|
|
+
|
|
|
@ApiOperation(value = "预警提醒接口")
|
|
|
@RequestMapping(value = "/notify", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "{\"count\":1}", response = Result.class)})
|
|
@@ -89,18 +92,14 @@ public class TIeInvigilateWarnInfoController {
|
|
|
}
|
|
|
} else {
|
|
|
//取当前用户机构id所属考试id集合
|
|
|
- List<TEExam> teExamList = teExamService.list(new QueryWrapper<TEExam>().lambda().eq(TEExam::getOrgId, tbUser.getOrgId()));
|
|
|
- //TODO 查询数据库拉取当前机构下所有考试批次、场次、考场编码集合(启用状态)
|
|
|
- if (!CollectionUtils.isEmpty(teExamList)) {
|
|
|
+ List<ExamInfoBean> examInfoBeanList = teExamStudentService.getExamInfo(tbUser.getOrgId());
|
|
|
+ if (!CollectionUtils.isEmpty(examInfoBeanList)) {
|
|
|
List<TEExamSummary> teExamSummaryAllList = new ArrayList<>();
|
|
|
- for (TEExam t : teExamList) {
|
|
|
- List<ExamListBean> examListBeanList = themisCacheService.getCurrentExamListCache(t.getId().toString());
|
|
|
- if (!CollectionUtils.isEmpty(examListBeanList)) {
|
|
|
- for (ExamListBean e : examListBeanList) {
|
|
|
- Set<String> roomCodeSet = new HashSet<>(Arrays.asList(e.getRoomCode().split(", ")));
|
|
|
- for (String s : roomCodeSet) {
|
|
|
- teExamSummaryAllList.addAll(themisCacheService.getExamSummaryCache(t.getId(), e.getExamActivityId(), s));
|
|
|
- }
|
|
|
+ for (ExamInfoBean t : examInfoBeanList) {
|
|
|
+ if (Objects.nonNull(t.getRoomCodes())) {
|
|
|
+ Set<String> roomCodeSet = new HashSet<>(Arrays.asList(t.getRoomCodes().split(", ")));
|
|
|
+ for (String s : roomCodeSet) {
|
|
|
+ teExamSummaryAllList.addAll(themisCacheService.getExamSummaryCache(t.getExamId(), t.getExamActivityId(), s));
|
|
|
}
|
|
|
}
|
|
|
}
|