wangliang 4 سال پیش
والد
کامیت
bc835cccde

+ 8 - 8
themis-exam/src/main/java/com/qmth/themis/exam/listener/service/impl/MqOeLogicServiceImpl.java

@@ -72,7 +72,7 @@ public class MqOeLogicServiceImpl implements MqOeLogicService {
         Gson gson = new Gson();
         ConcurrentHashMap<String, WebSocketOeServer> webSocketMap = WebSocketOeServer.getWebSocketMap();
         String tag = mqDto.getTag();
-        AtomicBoolean match = new AtomicBoolean(false);
+//        AtomicBoolean match = new AtomicBoolean(false);
         if (Objects.equals(MqTagEnum.OE_MONITOR_FINISH.name(), tag)) {//强制离线交卷
             Set examRecordId = JacksonUtil.readJson(String.valueOf(mqDto.getBody()), Set.class);
             examRecordId.forEach(s -> {
@@ -89,7 +89,7 @@ public class MqOeLogicServiceImpl implements MqOeLogicService {
                             && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum))
                             && Objects.nonNull(webSocketOeServer.getRecordId())
                             && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
-                        match.set(true);
+//                        match.set(true);
                         Map map = new HashMap<>();
                         map.put("form", mqDto.getObjName());
                         map.put(SystemConstant.RECORD_ID, recordId);
@@ -116,7 +116,7 @@ public class MqOeLogicServiceImpl implements MqOeLogicService {
                             && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum))
                             && Objects.nonNull(webSocketOeServer.getRecordId())
                             && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
-                        match.set(true);
+//                        match.set(true);
                         Map map = new HashMap<>();
                         map.put(SystemConstant.RECORD_ID, recordId);
                         map.put(SystemConstant.BREACH_STATUS, FinishTypeEnum.valueOf(String.valueOf(mqDto.getProperties().get("type"))).getCode());
@@ -141,7 +141,7 @@ public class MqOeLogicServiceImpl implements MqOeLogicService {
                         && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum))
                         && Objects.nonNull(webSocketOeServer.getRecordId())
                         && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
-                    match.set(true);
+//                    match.set(true);
                     Map<String, Object> prop = mqDto.getProperties();
                     Map map = new HashMap<>();
                     map.put(SystemConstant.RECORD_ID, recordId);
@@ -171,7 +171,7 @@ public class MqOeLogicServiceImpl implements MqOeLogicService {
                         && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum))
                         && Objects.nonNull(webSocketOeServer.getRecordId())
                         && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
-                    match.set(true);
+//                    match.set(true);
                     Map map = new HashMap<>();
                     map.put(SystemConstant.RECORD_ID, recordId);
                     WebsocketDto websocketDto = new WebsocketDto(WebsocketTypeEnum.INVIGILATE_LIVENESS_VERIFY.name(), map);
@@ -197,7 +197,7 @@ public class MqOeLogicServiceImpl implements MqOeLogicService {
                         && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum))
                         && Objects.nonNull(webSocketOeServer.getRecordId())
                         && webSocketOeServer.getRecordId().longValue() == recordId.longValue()) {
-                    match.set(true);
+//                    match.set(true);
                     WebsocketDto websocketDto = null;
                     switch (tag.toUpperCase()) {
                         case "OE_WEBSOCKET_MOBILE_ANSWER_READY":
@@ -237,13 +237,13 @@ public class MqOeLogicServiceImpl implements MqOeLogicService {
                 }
             }
         }
-        if (match.get()) {
+//        if (match.get()) {
             mqDto.setAck(SystemConstant.STANDARD_ACK_TYPE);
             TMRocketMessage tmRocketMessage = gson.fromJson(gson.toJson(mqDto), TMRocketMessage.class);
             tmRocketMessage.setBody(JacksonUtil.parseJson(tmRocketMessage.getBody()));
             tmRocketMessageService.saveOrUpdate(tmRocketMessage);
             redisUtil.delete(key, mqDto.getId());
-        }
+//        }
     }
 
     /**