|
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
-import com.google.common.collect.Sets;
|
|
|
import com.google.gson.Gson;
|
|
|
import com.qmth.themis.business.cache.ExamRecordCacheUtil;
|
|
|
import com.qmth.themis.business.cache.RedisKeyHelper;
|
|
@@ -13,7 +12,6 @@ import com.qmth.themis.business.constant.SpringContextHolder;
|
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
|
import com.qmth.themis.business.dto.MqDto;
|
|
|
import com.qmth.themis.business.dto.WarningDto;
|
|
|
-import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
|
|
|
import com.qmth.themis.business.entity.*;
|
|
|
import com.qmth.themis.business.enums.*;
|
|
|
import com.qmth.themis.business.service.*;
|
|
@@ -23,7 +21,6 @@ import com.qmth.themis.business.templete.impl.*;
|
|
|
import com.qmth.themis.business.util.*;
|
|
|
import com.qmth.themis.common.contanst.Constants;
|
|
|
import com.qmth.themis.common.enums.ExceptionResultEnum;
|
|
|
-import com.qmth.themis.common.enums.Source;
|
|
|
import com.qmth.themis.common.exception.BusinessException;
|
|
|
import com.qmth.themis.common.util.SimpleBeanUtil;
|
|
|
import com.qmth.themis.mq.service.MqLogicService;
|
|
@@ -120,9 +117,6 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
@Resource
|
|
|
MqUtil mqUtil;
|
|
|
|
|
|
- @Resource
|
|
|
- CacheService cacheService;
|
|
|
-
|
|
|
@Resource
|
|
|
TencentYunUtil tencentYunUtil;
|
|
|
|
|
@@ -132,9 +126,6 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
@Resource
|
|
|
MonitorUtil monitorUtil;
|
|
|
|
|
|
- @Resource
|
|
|
- OssUtil ossUtil;
|
|
|
-
|
|
|
@Resource
|
|
|
TOeExamRecordService tOeExamRecordService;
|
|
|
|
|
@@ -287,7 +278,6 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
@Transactional
|
|
|
public void execMqWebsocketUnNormalLogic(MqDto mqDto, String key) throws NoSuchAlgorithmException {
|
|
|
Gson gson = new Gson();
|
|
|
- mqDto.setAck(SystemConstant.STANDARD_ACK_TYPE);//表示成功处理
|
|
|
Map<String, Object> tranMap = mqDto.getProperties();
|
|
|
Long recordId = Long.parseLong(String.valueOf(tranMap.get("recordId")));
|
|
|
ExamRecordStatusEnum status = ExamRecordCacheUtil.getStatus(recordId);
|
|
@@ -309,16 +299,17 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
//2022/03/28加入更新移动端第一、第二机位推流状态
|
|
|
examRecordService.sendExamRecordDataSaveMq(recordId, System.currentTimeMillis());
|
|
|
|
|
|
- Map<String, Object> properties = new HashMap<>();
|
|
|
- properties.put(SystemConstant.REMOVE_WEBSOCKET, true);
|
|
|
+// Map<String, Object> properties = new HashMap<>();
|
|
|
+// properties.put(SystemConstant.REMOVE_WEBSOCKET, true);
|
|
|
//发送移动端监考退出考试mq消息 start
|
|
|
- MqDto mqDtoExamStop = new MqDto(mqUtil.getMqGroupDomain().getTopic(), MqTagEnum.EXAM_STOP.name(), recordId,
|
|
|
- MqTagEnum.EXAM_STOP, String.valueOf(recordId), properties, String.valueOf(recordId));
|
|
|
- mqDtoService.assembleSendOneOrderMsg(mqDtoExamStop);
|
|
|
+// MqDto mqDtoExamStop = new MqDto(mqUtil.getMqGroupDomain().getTopic(), MqTagEnum.EXAM_STOP.name(), recordId,
|
|
|
+// MqTagEnum.EXAM_STOP, String.valueOf(recordId), String.valueOf(recordId));
|
|
|
+// mqDtoService.assembleSendOneOrderMsg(mqDtoExamStop);
|
|
|
|
|
|
- SystemConstant.mobileMonitorStatusStop(examStudentCacheBean.getStudentId(), recordId, true);
|
|
|
+// SystemConstant.mobileMonitorStatusStop(examStudentCacheBean.getStudentId(), recordId, true);
|
|
|
//发送移动端监考退出考试mq消息 end
|
|
|
}
|
|
|
+ mqDto.setAck(SystemConstant.STANDARD_ACK_TYPE);//表示成功处理
|
|
|
TMRocketMessage tmRocketMessage = gson.fromJson(gson.toJson(mqDto), TMRocketMessage.class);
|
|
|
tmRocketMessage.setBody(JacksonUtil.parseJson(tmRocketMessage.getBody()));
|
|
|
tmRocketMessageService.saveOrUpdate(tmRocketMessage);
|
|
@@ -973,16 +964,16 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
SystemConstant.clientMonitorStatusStop(recordId);
|
|
|
examRecordService.sendExamRecordDataSaveMq(recordId, System.currentTimeMillis());
|
|
|
|
|
|
- Map<String, Object> properties = new HashMap<>();
|
|
|
- properties.put(SystemConstant.REMOVE_WEBSOCKET, true);
|
|
|
+// Map<String, Object> properties = new HashMap<>();
|
|
|
+// properties.put(SystemConstant.REMOVE_WEBSOCKET, true);
|
|
|
//发送移动端监考退出考试mq消息 start
|
|
|
- MqDto mqDtoExamStop = new MqDto(mqUtil.getMqGroupDomain().getTopic(), MqTagEnum.EXAM_STOP.name(), recordId,
|
|
|
- MqTagEnum.EXAM_STOP, String.valueOf(recordId), properties, String.valueOf(recordId));
|
|
|
- mqDtoService.assembleSendOneOrderMsg(mqDtoExamStop);
|
|
|
+// MqDto mqDtoExamStop = new MqDto(mqUtil.getMqGroupDomain().getTopic(), MqTagEnum.EXAM_STOP.name(), recordId,
|
|
|
+// MqTagEnum.EXAM_STOP, String.valueOf(recordId), String.valueOf(recordId));
|
|
|
+// mqDtoService.assembleSendOneOrderMsg(mqDtoExamStop);
|
|
|
//发送移动端监考退出考试mq消息 end
|
|
|
|
|
|
//更新移动端第一机位推流状态为stop
|
|
|
- SystemConstant.mobileMonitorStatusStop(examStudentCacheBean.getStudentId(), recordId, true);
|
|
|
+// SystemConstant.mobileMonitorStatusStop(examStudentCacheBean.getStudentId(), recordId, true);
|
|
|
|
|
|
Gson gson = new Gson();
|
|
|
mqDto.setAck(SystemConstant.STANDARD_ACK_TYPE);
|
|
@@ -1002,7 +993,6 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
@Transactional
|
|
|
public void execMqExamBreakDelayLogic(MqDto mqDto, String key) {
|
|
|
Gson gson = new Gson();
|
|
|
- mqDto.setAck(SystemConstant.STANDARD_ACK_TYPE);//表示成功处理
|
|
|
Map<String, Object> tranMap = mqDto.getProperties();
|
|
|
Long recordId = Long.parseLong(String.valueOf(tranMap.get("recordId")));
|
|
|
ExamRecordStatusEnum statusEnum = ExamRecordCacheUtil.getStatus(recordId);
|
|
@@ -1012,6 +1002,7 @@ public class MqLogicServiceImpl implements MqLogicService {
|
|
|
.equals(statusEnum, ExamRecordStatusEnum.RESUME_PREPARE)) {
|
|
|
examRecordService.examBreakLogic(recordId, false);
|
|
|
}
|
|
|
+ mqDto.setAck(SystemConstant.STANDARD_ACK_TYPE);//表示成功处理
|
|
|
TMRocketMessage tmRocketMessage = gson.fromJson(gson.toJson(mqDto), TMRocketMessage.class);
|
|
|
tmRocketMessage.setBody(JacksonUtil.parseJson(tmRocketMessage.getBody()));
|
|
|
tmRocketMessageService.saveOrUpdate(tmRocketMessage);
|