|
@@ -144,7 +144,14 @@ public class TEExamController {
|
|
|
//mq发送消息end
|
|
|
}
|
|
|
ConcurrentHashMap<String, WebSocketMobileServer> webSocketMap = WebSocketMobileServer.getWebSocketMap();
|
|
|
- if (Objects.nonNull(webSocketMap.get(param.getRecordId() + MonitorVideoSourceEnum.MOBILE_FIRST.name()))) {
|
|
|
+ if (Objects.nonNull(webSocketMap.get(param.getRecordId() + "-" + MonitorVideoSourceEnum.MOBILE_FIRST.name()))) {
|
|
|
+ WebSocketMobileServer webSocketMobileServer = webSocketMap.get(param.getRecordId());
|
|
|
+ Map map = new HashMap<>();
|
|
|
+ map.put(SystemConstant.RECORD_ID, param.getRecordId());
|
|
|
+ WebsocketDto websocketDto = new WebsocketDto(WebsocketTypeEnum.EXAM_START.name(), map);
|
|
|
+ webSocketMobileServer.sendMessage(websocketDto);
|
|
|
+ }
|
|
|
+ if (Objects.nonNull(webSocketMap.get(param.getRecordId() + "-" + MonitorVideoSourceEnum.MOBILE_SECOND.name()))) {
|
|
|
WebSocketMobileServer webSocketMobileServer = webSocketMap.get(param.getRecordId());
|
|
|
Map map = new HashMap<>();
|
|
|
map.put(SystemConstant.RECORD_ID, param.getRecordId());
|
|
@@ -268,7 +275,14 @@ public class TEExamController {
|
|
|
}
|
|
|
Result re = ResultUtil.ok(teExamService.finish(teStudent.getId(), param.getRecordId(), param.getType(), param.getDurationSeconds()));
|
|
|
ConcurrentHashMap<String, WebSocketMobileServer> webSocketMap = WebSocketMobileServer.getWebSocketMap();
|
|
|
- if (Objects.nonNull(webSocketMap.get(param.getRecordId()))) {
|
|
|
+ if (Objects.nonNull(webSocketMap.get(param.getRecordId() + "-" + MonitorVideoSourceEnum.MOBILE_FIRST.name()))) {
|
|
|
+ WebSocketMobileServer webSocketMobileServer = webSocketMap.get(param.getRecordId());
|
|
|
+ Map map = new HashMap<>();
|
|
|
+ map.put(SystemConstant.RECORD_ID, param.getRecordId());
|
|
|
+ WebsocketDto websocketDto = new WebsocketDto(WebsocketTypeEnum.EXAM_STOP.name(), map);
|
|
|
+ webSocketMobileServer.sendMessage(websocketDto);
|
|
|
+ }
|
|
|
+ if (Objects.nonNull(webSocketMap.get(param.getRecordId() + "-" + MonitorVideoSourceEnum.MOBILE_SECOND.name()))) {
|
|
|
WebSocketMobileServer webSocketMobileServer = webSocketMap.get(param.getRecordId());
|
|
|
Map map = new HashMap<>();
|
|
|
map.put(SystemConstant.RECORD_ID, param.getRecordId());
|