|
@@ -106,7 +106,12 @@ public class MqOeLogicServiceImpl implements MqOeLogicService {
|
|
|
Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
|
|
|
ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
|
WebSocketOeServer webSocketOeServer = webSocketMap.get(clientWebsocketId);
|
|
|
- if (Objects.nonNull(webSocketOeServer.getRecordId()) && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
|
|
|
+ ExamRecordStatusEnum examRecordStatusEnum = ExamRecordCacheUtil.getStatus(recordId);
|
|
|
+ if ((Objects.nonNull(examRecordStatusEnum)
|
|
|
+ && !Objects.equals(ExamRecordStatusEnum.PERSISTED, examRecordStatusEnum)
|
|
|
+ && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum))
|
|
|
+ && Objects.nonNull(webSocketOeServer.getRecordId())
|
|
|
+ && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
|
|
|
match.set(true);
|
|
|
Map map = new HashMap<>();
|
|
|
map.put("form", mqDto.getObjName());
|
|
@@ -128,7 +133,12 @@ public class MqOeLogicServiceImpl implements MqOeLogicService {
|
|
|
Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
|
|
|
ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
|
WebSocketOeServer webSocketOeServer = webSocketMap.get(clientWebsocketId);
|
|
|
- if (Objects.nonNull(webSocketOeServer.getRecordId()) && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
|
|
|
+ ExamRecordStatusEnum examRecordStatusEnum = ExamRecordCacheUtil.getStatus(recordId);
|
|
|
+ if ((Objects.nonNull(examRecordStatusEnum)
|
|
|
+ && !Objects.equals(ExamRecordStatusEnum.PERSISTED, examRecordStatusEnum)
|
|
|
+ && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum))
|
|
|
+ && Objects.nonNull(webSocketOeServer.getRecordId())
|
|
|
+ && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
|
|
|
match.set(true);
|
|
|
Map map = new HashMap<>();
|
|
|
map.put(SystemConstant.RECORD_ID, recordId);
|
|
@@ -148,7 +158,12 @@ public class MqOeLogicServiceImpl implements MqOeLogicService {
|
|
|
Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
|
|
|
Long examActivityId = ExamRecordCacheUtil.getExamActivityId(recordId);
|
|
|
WebSocketOeServer webSocketOeServer = webSocketMap.get(clientWebsocketId);
|
|
|
- if (Objects.nonNull(webSocketOeServer.getRecordId()) && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
|
|
|
+ ExamRecordStatusEnum examRecordStatusEnum = ExamRecordCacheUtil.getStatus(recordId);
|
|
|
+ if ((Objects.nonNull(examRecordStatusEnum)
|
|
|
+ && !Objects.equals(ExamRecordStatusEnum.PERSISTED, examRecordStatusEnum)
|
|
|
+ && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum))
|
|
|
+ && Objects.nonNull(webSocketOeServer.getRecordId())
|
|
|
+ && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
|
|
|
match.set(true);
|
|
|
Map<String, Object> prop = mqDto.getProperties();
|
|
|
Map map = new HashMap<>();
|
|
@@ -173,7 +188,12 @@ public class MqOeLogicServiceImpl implements MqOeLogicService {
|
|
|
Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
|
|
|
ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
|
WebSocketOeServer webSocketOeServer = webSocketMap.get(clientWebsocketId);
|
|
|
- if (Objects.nonNull(webSocketOeServer.getRecordId()) && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
|
|
|
+ ExamRecordStatusEnum examRecordStatusEnum = ExamRecordCacheUtil.getStatus(recordId);
|
|
|
+ if ((Objects.nonNull(examRecordStatusEnum)
|
|
|
+ && !Objects.equals(ExamRecordStatusEnum.PERSISTED, examRecordStatusEnum)
|
|
|
+ && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum))
|
|
|
+ && Objects.nonNull(webSocketOeServer.getRecordId())
|
|
|
+ && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
|
|
|
match.set(true);
|
|
|
Map map = new HashMap<>();
|
|
|
map.put(SystemConstant.RECORD_ID, recordId);
|
|
@@ -193,7 +213,12 @@ public class MqOeLogicServiceImpl implements MqOeLogicService {
|
|
|
String clientWebsocketId = ExamRecordCacheUtil.getClientWebsocketId(recordId);
|
|
|
if (Objects.nonNull(webSocketMap.get(clientWebsocketId))) {
|
|
|
WebSocketOeServer webSocketOeServer = webSocketMap.get(clientWebsocketId);
|
|
|
- if (Objects.nonNull(webSocketOeServer.getRecordId()) && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
|
|
|
+ ExamRecordStatusEnum examRecordStatusEnum = ExamRecordCacheUtil.getStatus(recordId);
|
|
|
+ if ((Objects.nonNull(examRecordStatusEnum)
|
|
|
+ && !Objects.equals(ExamRecordStatusEnum.PERSISTED, examRecordStatusEnum)
|
|
|
+ && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum))
|
|
|
+ && Objects.nonNull(webSocketOeServer.getRecordId())
|
|
|
+ && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
|
|
|
match.set(true);
|
|
|
WebsocketDto websocketDto = null;
|
|
|
switch (tag.toUpperCase()) {
|