wangliang vor 1 Jahr
Ursprung
Commit
4a02954fb3

+ 14 - 0
themis-admin/src/main/java/com/qmth/themis/admin/api/TENotifyController.java

@@ -318,6 +318,20 @@ public class TENotifyController {
         ExamRecordCacheUtil.setMonitorStatus(recordId, MonitorVideoSourceEnum.valueOf(source), monitorStatusSourceEnum, eventTime);
         MonitorCallStatusSourceEnum callStatus = Objects.nonNull(ExamRecordCacheUtil.getMonitorCallStatus(recordId, MonitorVideoSourceEnum.valueOf(source))) ? ExamRecordCacheUtil.getMonitorCallStatus(recordId, MonitorVideoSourceEnum.valueOf(source)) : null;
         ExamRecordCacheUtil.setMonitorCallStatus(recordId, MonitorVideoSourceEnum.valueOf(source), callStatus, eventTime);
+
+        SysConfig sysConfig = themisCacheService.addSysConfigCache(SystemConstant.MONITOR_CONFIG_PREFIX);
+        Optional.ofNullable(sysConfig).orElseThrow(() -> new BusinessException("未配置监控前缀"));
+
+        String liveUrl = SystemConstant.setStreamId(sysConfig.getConfigValue(), recordId, MonitorVideoSourceEnum.valueOf(source));
+        String monitorKey = ExamRecordCacheUtil.getMonitorKey(recordId);
+        TIeExamInvigilateCallLog tIeExamInvigilateCallLog = new TIeExamInvigilateCallLog(recordId, MonitorVideoSourceEnum.valueOf(source), liveUrl, MonitorStatusSourceEnum.START, monitorKey, callStatus, null, null);
+
+        tOeExamRecordService.sendExamRecordDataSaveMqNotIp(recordId, eventTime);
+
+        //监考监控通话信息 发送mq start
+        MqDto mqDto = new MqDto(mqUtil.getTopic(), MqTagEnum.MONITOR_LOG.name(), tIeExamInvigilateCallLog, MqTagEnum.MONITOR_LOG, String.valueOf(tIeExamInvigilateCallLog.getId()), MonitorVideoSourceEnum.valueOf(source).name());
+        mqDtoService.assembleSendAsyncMsg(mqDto);
+        //监考监控通话信息 发送mq end
     }
 
     /**

+ 3 - 1
themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateCallMobileController.java

@@ -315,7 +315,9 @@ public class TIeInvigilateCallMobileController {
         map.put("key", tencentYunUtil.getKey());
 
         TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
-        ExamCacheBean examCacheBean = teExamService.getExamCacheBean(ExamRecordCacheUtil.getExamId(recordId));
+        Long examId = ExamRecordCacheUtil.getExamId(recordId);
+        Optional.ofNullable(examId).orElseThrow(() -> new BusinessException("该考生已交卷"));
+        ExamCacheBean examCacheBean = teExamService.getExamCacheBean(examId);
         String monitorVideoSource = examCacheBean.getMonitorVideoSource();
         MonitorVideoSourceEnum source = null;
         if (Objects.nonNull(monitorVideoSource) && (!monitorVideoSource.toUpperCase().contains(MonitorVideoSourceEnum.CLIENT_SCREEN.name())

+ 1 - 1
themis-admin/src/main/java/com/qmth/themis/admin/api/TIeInvigilateWarnInfoController.java

@@ -106,7 +106,7 @@ public class TIeInvigilateWarnInfoController {
                 count = teExamSummaryAllList.stream().mapToInt(s -> s.getWarningUnread()).sum();
             }
         }
-        return ResultUtil.ok(Collections.singletonMap(SystemConstant.COUNT, count));
+        return ResultUtil.ok(Collections.singletonMap(SystemConstant.COUNT, Objects.isNull(count) ? 0 : count));
     }
 
     @ApiOperation(value = "预警提醒列表接口")