|
@@ -3,13 +3,11 @@ package com.qmth.themis.exam.api;
|
|
|
import com.qmth.themis.business.annotation.ApiJsonObject;
|
|
|
import com.qmth.themis.business.annotation.ApiJsonProperty;
|
|
|
import com.qmth.themis.business.cache.ExamRecordCacheUtil;
|
|
|
-import com.qmth.themis.business.cache.bean.ExamStudentCacheBean;
|
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
|
import com.qmth.themis.business.dto.MqDto;
|
|
|
import com.qmth.themis.business.entity.TIeExamInvigilateCallLog;
|
|
|
import com.qmth.themis.business.enums.*;
|
|
|
import com.qmth.themis.business.service.MqDtoService;
|
|
|
-import com.qmth.themis.business.service.TEExamStudentService;
|
|
|
import com.qmth.themis.business.service.TOeExamRecordService;
|
|
|
import com.qmth.themis.business.util.MqUtil;
|
|
|
import com.qmth.themis.common.enums.ExceptionResultEnum;
|
|
@@ -17,7 +15,6 @@ import com.qmth.themis.common.exception.BusinessException;
|
|
|
import com.qmth.themis.common.util.Result;
|
|
|
import com.qmth.themis.common.util.ResultUtil;
|
|
|
import com.qmth.themis.exam.config.DictionaryConfig;
|
|
|
-import com.qmth.themis.exam.config.ExamConstant;
|
|
|
import io.swagger.annotations.*;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -28,9 +25,10 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.io.IOException;
|
|
|
-import java.security.NoSuchAlgorithmException;
|
|
|
-import java.util.*;
|
|
|
+import java.util.Collections;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
* @Description: mobile监考监控通话信息 前端控制器
|
|
@@ -57,9 +55,6 @@ public class TIeInvigilateCallMobileController {
|
|
|
@Resource
|
|
|
TOeExamRecordService tOeExamRecordService;
|
|
|
|
|
|
- @Resource
|
|
|
- TEExamStudentService teExamStudentService;
|
|
|
-
|
|
|
// @Deprecated
|
|
|
// @ApiOperation(value = "监控观看地址更新接口")
|
|
|
// @RequestMapping(value = "/live_url", method = RequestMethod.POST)
|
|
@@ -160,7 +155,7 @@ public class TIeInvigilateCallMobileController {
|
|
|
@ApiJsonProperty(key = "source", description = "监考视频源", required = true),
|
|
|
@ApiJsonProperty(key = "status", description = "当前状态", required = true),
|
|
|
@ApiJsonProperty(key = "type", description = "异常类型,status=stop时需要传递")
|
|
|
- }) @ApiParam(value = "监控信息", required = true) @RequestBody Map<String, Object> mapParameter) throws IOException, NoSuchAlgorithmException {
|
|
|
+ }) @ApiParam(value = "监控信息", required = true) @RequestBody Map<String, Object> mapParameter) {
|
|
|
if (Objects.isNull(mapParameter.get("recordId")) || Objects.equals(mapParameter.get("recordId"), "")) {
|
|
|
throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
|
|
|
}
|
|
@@ -205,12 +200,6 @@ public class TIeInvigilateCallMobileController {
|
|
|
//监控结束
|
|
|
MqDto mqDtoStop = new MqDto(mqUtil.getMqGroupDomain().getTopic(), MqTagEnum.MONITOR_STOP.name(), recordId, MqTagEnum.MONITOR_STOP, String.valueOf(recordId), mqMap, String.valueOf(recordId));
|
|
|
mqDtoService.assembleSendOneOrderMsg(mqDtoStop);
|
|
|
-
|
|
|
- Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
|
|
|
- ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
|
- Optional.ofNullable(examStudentCacheBean).orElseThrow(() -> new BusinessException("考生数据为空"));
|
|
|
- SystemConstant.mobileMonitorStatusStop(examStudentCacheBean.getStudentId(), recordId, true);
|
|
|
- ExamConstant.mobileWebsocketClose(recordId);
|
|
|
}
|
|
|
Map map = new HashMap();
|
|
|
map.put("status", status.name());
|