|
@@ -116,24 +116,26 @@ public class MqOeLogicServiceImpl implements MqOeLogicService {
|
|
teExamStudentLogService.save(teExamStudentLog);
|
|
teExamStudentLogService.save(teExamStudentLog);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- } else if (Objects.equals(MqTagEnum.OE_HARD_FINISH.name(), tag)) {//手动交卷
|
|
|
|
- Set examRecordId = JacksonUtil.readJson(String.valueOf(mqDto.getBody()), Set.class);
|
|
|
|
- examRecordId.forEach(s -> {
|
|
|
|
- Long recordId = Long.parseLong(String.valueOf(s));
|
|
|
|
- if (Objects.nonNull(webSocketMap.get(recordId))) {
|
|
|
|
- Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
|
|
|
|
- ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
|
|
- WebSocketOeServer webSocketOeServer = webSocketMap.get(recordId);
|
|
|
|
- Map map = new HashMap<>();
|
|
|
|
- map.put(SystemConstant.RECORD_ID, recordId);
|
|
|
|
- map.put(SystemConstant.MESSAGE, FinishTypeEnum.valueOf(String.valueOf(mqDto.getProperties().get("type"))).getCode());
|
|
|
|
- WebsocketDto websocketDto = new WebsocketDto(WebsocketTypeEnum.HAND_STOP_EXAM.name(), map);
|
|
|
|
- webSocketOeServer.sendMessage(websocketDto);
|
|
|
|
- TEExamStudentLog teExamStudentLog = new TEExamStudentLog(mqDto.getType().name(), mqDto.getType().getCode(), mqDto.getType().getCode(), examStudentCacheBean.getStudentId(), examStudentId, recordId);
|
|
|
|
- teExamStudentLogService.save(teExamStudentLog);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- } else if (Objects.equals(MqTagEnum.OE_WARNING_FINISH.name(), tag)) {//预警交卷
|
|
|
|
|
|
+ }
|
|
|
|
+// else if (Objects.equals(MqTagEnum.OE_HARD_FINISH.name(), tag)) {//手动交卷
|
|
|
|
+// Set examRecordId = JacksonUtil.readJson(String.valueOf(mqDto.getBody()), Set.class);
|
|
|
|
+// examRecordId.forEach(s -> {
|
|
|
|
+// Long recordId = Long.parseLong(String.valueOf(s));
|
|
|
|
+// if (Objects.nonNull(webSocketMap.get(recordId))) {
|
|
|
|
+// Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
|
|
|
|
+// ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
|
|
+// WebSocketOeServer webSocketOeServer = webSocketMap.get(recordId);
|
|
|
|
+// Map map = new HashMap<>();
|
|
|
|
+// map.put(SystemConstant.RECORD_ID, recordId);
|
|
|
|
+// map.put(SystemConstant.MESSAGE, FinishTypeEnum.valueOf(String.valueOf(mqDto.getProperties().get("type"))).getCode());
|
|
|
|
+// WebsocketDto websocketDto = new WebsocketDto(WebsocketTypeEnum.HAND_STOP_EXAM.name(), map);
|
|
|
|
+// webSocketOeServer.sendMessage(websocketDto);
|
|
|
|
+// TEExamStudentLog teExamStudentLog = new TEExamStudentLog(mqDto.getType().name(), mqDto.getType().getCode(), mqDto.getType().getCode(), examStudentCacheBean.getStudentId(), examStudentId, recordId);
|
|
|
|
+// teExamStudentLogService.save(teExamStudentLog);
|
|
|
|
+// }
|
|
|
|
+// });
|
|
|
|
+// }
|
|
|
|
+ else if (Objects.equals(MqTagEnum.OE_WARNING_FINISH.name(), tag)) {//预警交卷
|
|
Set examRecordId = JacksonUtil.readJson(String.valueOf(mqDto.getBody()), Set.class);
|
|
Set examRecordId = JacksonUtil.readJson(String.valueOf(mqDto.getBody()), Set.class);
|
|
examRecordId.forEach(s -> {
|
|
examRecordId.forEach(s -> {
|
|
Long recordId = Long.parseLong(String.valueOf(s));
|
|
Long recordId = Long.parseLong(String.valueOf(s));
|