|
@@ -18,6 +18,7 @@ import com.qmth.themis.business.constant.SystemConstant;
|
|
import com.qmth.themis.business.dto.AuthDto;
|
|
import com.qmth.themis.business.dto.AuthDto;
|
|
import com.qmth.themis.business.dto.ExamPropCountDto;
|
|
import com.qmth.themis.business.dto.ExamPropCountDto;
|
|
import com.qmth.themis.business.dto.MqDto;
|
|
import com.qmth.themis.business.dto.MqDto;
|
|
|
|
+import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
|
|
import com.qmth.themis.business.entity.*;
|
|
import com.qmth.themis.business.entity.*;
|
|
import com.qmth.themis.business.enums.*;
|
|
import com.qmth.themis.business.enums.*;
|
|
import com.qmth.themis.business.excel.ExportUtils;
|
|
import com.qmth.themis.business.excel.ExportUtils;
|
|
@@ -100,6 +101,9 @@ public class TIeInvigilateController {
|
|
@Resource
|
|
@Resource
|
|
DictionaryConfig dictionaryConfig;
|
|
DictionaryConfig dictionaryConfig;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ CacheService cacheService;
|
|
|
|
+
|
|
@ApiOperation(value = "实时监控台视频列表接口")
|
|
@ApiOperation(value = "实时监控台视频列表接口")
|
|
@RequestMapping(value = "/list/video", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/list/video", method = RequestMethod.POST)
|
|
@ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListVideoBean.class)})
|
|
@ApiResponses({@ApiResponse(code = 200, message = "监考监控信息", response = InvigilateListVideoBean.class)})
|
|
@@ -117,7 +121,7 @@ public class TIeInvigilateController {
|
|
@ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
|
|
@ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
|
|
@ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
@ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
- AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + tbUser.getId());
|
|
|
|
|
|
+ AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
Long userId = null;
|
|
Long userId = null;
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
@@ -161,7 +165,7 @@ public class TIeInvigilateController {
|
|
if (Objects.nonNull(monitorVideoSource)) {
|
|
if (Objects.nonNull(monitorVideoSource)) {
|
|
source = MonitorVideoSourceEnum.valueOf(monitorVideoSource);
|
|
source = MonitorVideoSourceEnum.valueOf(monitorVideoSource);
|
|
}
|
|
}
|
|
- String monitorLiveUrl = dictionaryConfig.monitorDomain().getPrefix() + "_" + s.getExamRecordId() + "_" + source.name().toLowerCase();
|
|
|
|
|
|
+ String monitorLiveUrl = SystemConstant.setStreamId(dictionaryConfig.monitorDomain().getPrefix(), s.getExamRecordId(), source);
|
|
s.setMonitorLiveUrl(monitorLiveUrl);
|
|
s.setMonitorLiveUrl(monitorLiveUrl);
|
|
WebsocketStatusEnum websocketStatusEnum = ExamRecordCacheUtil.getClientWebsocketStatus(s.getExamRecordId());
|
|
WebsocketStatusEnum websocketStatusEnum = ExamRecordCacheUtil.getClientWebsocketStatus(s.getExamRecordId());
|
|
if (Objects.nonNull(websocketStatusEnum)) {
|
|
if (Objects.nonNull(websocketStatusEnum)) {
|
|
@@ -189,7 +193,7 @@ public class TIeInvigilateController {
|
|
throw new BusinessException("随机数不能为空");
|
|
throw new BusinessException("随机数不能为空");
|
|
}
|
|
}
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
- AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + tbUser.getId());
|
|
|
|
|
|
+ AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
Long userId = null;
|
|
Long userId = null;
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
@@ -203,7 +207,7 @@ public class TIeInvigilateController {
|
|
}
|
|
}
|
|
ExamCacheBean finalExamCacheBean = examCacheBean;
|
|
ExamCacheBean finalExamCacheBean = examCacheBean;
|
|
invigilateListVideoBeanList.forEach(s -> {
|
|
invigilateListVideoBeanList.forEach(s -> {
|
|
- String monitorLiveUrl = dictionaryConfig.monitorDomain().getPrefix() + "_" + s.getExamRecordId() + "_" + MonitorVideoSourceEnum.CLIENT_CAMERA.name().toLowerCase();
|
|
|
|
|
|
+ String monitorLiveUrl = SystemConstant.setStreamId(dictionaryConfig.monitorDomain().getPrefix(), s.getExamRecordId(), MonitorVideoSourceEnum.CLIENT_CAMERA);
|
|
if (Objects.nonNull(monitorLiveUrl)) {
|
|
if (Objects.nonNull(monitorLiveUrl)) {
|
|
s.setMonitorLiveUrl(monitorLiveUrl);
|
|
s.setMonitorLiveUrl(monitorLiveUrl);
|
|
}
|
|
}
|
|
@@ -245,7 +249,7 @@ public class TIeInvigilateController {
|
|
@ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
|
|
@ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
|
|
@ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
@ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
- AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + tbUser.getId());
|
|
|
|
|
|
+ AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
Long userId = null;
|
|
Long userId = null;
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
@@ -282,7 +286,7 @@ public class TIeInvigilateController {
|
|
breachStatus = Objects.isNull(ExamRecordCacheUtil.getBreachStatus(examRecordId)) ? 1 : ExamRecordCacheUtil.getBreachStatus(examRecordId);
|
|
breachStatus = Objects.isNull(ExamRecordCacheUtil.getBreachStatus(examRecordId)) ? 1 : ExamRecordCacheUtil.getBreachStatus(examRecordId);
|
|
}
|
|
}
|
|
ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
- TEStudent teStudent = teStudentService.getById(examStudentCacheBean.getStudentId());
|
|
|
|
|
|
+ TEStudentCacheDto teStudent = cacheService.addStudentAccountCache(examStudentCacheBean.getStudentId());
|
|
String basePhotoPath = ossUtil.getAliYunOssPublicDomain().getPublicUrl() + File.separator + teStudent.getBasePhotoPath();
|
|
String basePhotoPath = ossUtil.getAliYunOssPublicDomain().getPublicUrl() + File.separator + teStudent.getBasePhotoPath();
|
|
String identity = examStudentCacheBean.getIdentity();
|
|
String identity = examStudentCacheBean.getIdentity();
|
|
String examStudentName = examStudentCacheBean.getName();
|
|
String examStudentName = examStudentCacheBean.getName();
|
|
@@ -326,7 +330,7 @@ public class TIeInvigilateController {
|
|
|
|
|
|
//2020/11/24新增管理员不清除预警状态
|
|
//2020/11/24新增管理员不清除预警状态
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
- AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + tbUser.getId());
|
|
|
|
|
|
+ AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
|
|
if (!authDto.getRoleCodes().toString().contains(RoleEnum.ADMIN.name())) {
|
|
if (!authDto.getRoleCodes().toString().contains(RoleEnum.ADMIN.name())) {
|
|
//清除预警未阅状态
|
|
//清除预警未阅状态
|
|
UpdateWrapper<TIeInvigilateWarnInfo> tIeExamInvigilateNoticeUpdateWrapper = new UpdateWrapper<>();
|
|
UpdateWrapper<TIeInvigilateWarnInfo> tIeExamInvigilateNoticeUpdateWrapper = new UpdateWrapper<>();
|
|
@@ -396,7 +400,7 @@ public class TIeInvigilateController {
|
|
@ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
|
|
@ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
|
|
@ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
@ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
- AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + tbUser.getId());
|
|
|
|
|
|
+ AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
Long userId = null;
|
|
Long userId = null;
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
@@ -438,7 +442,7 @@ public class TIeInvigilateController {
|
|
@ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
|
|
@ApiParam(value = "分页页码", required = true) @RequestParam int pageNumber,
|
|
@ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
@ApiParam(value = "分页数", required = true) @RequestParam int pageSize) {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
- AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + tbUser.getId());
|
|
|
|
|
|
+ AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
Long userId = null;
|
|
Long userId = null;
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
@@ -457,7 +461,7 @@ public class TIeInvigilateController {
|
|
@ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
@ApiParam(value = "姓名", required = false) @RequestParam(required = false) String name,
|
|
@ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity) throws Exception {
|
|
@ApiParam(value = "证件号", required = false) @RequestParam(required = false) String identity) throws Exception {
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
- AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + tbUser.getId());
|
|
|
|
|
|
+ AuthDto authDto = cacheService.addAccountAuthCache(tbUser.getId());
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
//如果有监考员角色,只能查看自己所监考的考场,巡考员和管理员则可以查看全部考场
|
|
Long userId = null;
|
|
Long userId = null;
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
if (authDto.getRoleCodes().toString().contains(RoleEnum.INVIGILATE.name())) {
|
|
@@ -566,7 +570,7 @@ public class TIeInvigilateController {
|
|
}
|
|
}
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
|
|
//发送mq给客户端监考消息start
|
|
//发送mq给客户端监考消息start
|
|
- mapParameter.put("formUserId",tbUser.getId());
|
|
|
|
|
|
+ mapParameter.put("formUserId", tbUser.getId());
|
|
MqDto mqDto = new MqDto(mqUtil.getMqGroupDomain().getTopic(), MqTagEnum.OE_IM_CLUSTERING.name(), recordId, MqTagEnum.OE_IM_CLUSTERING, String.valueOf(recordId), mapParameter, tbUser.getName());
|
|
MqDto mqDto = new MqDto(mqUtil.getMqGroupDomain().getTopic(), MqTagEnum.OE_IM_CLUSTERING.name(), recordId, MqTagEnum.OE_IM_CLUSTERING, String.valueOf(recordId), mapParameter, tbUser.getName());
|
|
mqDtoService.assembleSendOneOrderMsg(mqDto);
|
|
mqDtoService.assembleSendOneOrderMsg(mqDto);
|
|
//发送mq给客户端监考消息end
|
|
//发送mq给客户端监考消息end
|