Explorar el Código

考试科目修改

wangliang hace 4 años
padre
commit
8795ba277c

+ 4 - 3
themis-business/src/main/java/com/qmth/themis/business/enums/WarningEnum.java

@@ -4,6 +4,7 @@ import com.google.common.collect.Maps;
 
 import java.util.Arrays;
 import java.util.List;
+import java.util.Objects;
 
 /**
  * @Description: 预警类型 enum
@@ -18,11 +19,11 @@ public enum WarningEnum {
 
     FACE_COMPARE_ERROR("人脸比对异常", Arrays.asList("D6", "D14")),
 
-    EYE_CLOSE_ERROR("闭眼检测异常", Arrays.asList(null)),
+    EYE_CLOSE_ERROR("闭眼检测异常", Arrays.asList("-1")),
 
-    LIVENESS_ACTION_ERROR("活检动作错误", Arrays.asList(null)),
+    LIVENESS_ACTION_ERROR("活检动作错误", Arrays.asList("-1")),
 
-    NONE("无异常", Arrays.asList(null)),
+    NONE("无异常", Arrays.asList("-1")),
 
     REALNESS("真实性检测", Arrays.asList("D15"));
 

+ 14 - 5
themis-exam/src/main/java/com/qmth/themis/exam/api/TIeInvigilateCallMobileController.java

@@ -96,7 +96,9 @@ public class TIeInvigilateCallMobileController {
                 throw new RuntimeException(e);
             }
         }
-        return ResultUtil.ok(SystemConstant.SUCCESS);
+        Map map = new HashMap();
+        map.put("updateTime", System.currentTimeMillis());
+        return ResultUtil.ok(map);
     }
 
     @ApiOperation(value = "发送通话申请接口")
@@ -129,7 +131,9 @@ public class TIeInvigilateCallMobileController {
         MqDto mqDto = new MqDto(MqTopicEnum.themisTopic.getCode(), MqTagEnum.MONITOR_LOG.name(), tIeExamInvigilateCallLog, MqTagEnum.MONITOR_LOG, String.valueOf(tIeExamInvigilateCallLog.getId()), source.name());
         mqDtoService.assembleSendOneWayMsg(mqDto);
         //监考监控通话信息 发送mq end
-        return ResultUtil.ok(SystemConstant.SUCCESS);
+        Map map = new HashMap();
+        map.put("updateTime", System.currentTimeMillis());
+        return ResultUtil.ok(map);
     }
 
     @ApiOperation(value = "监控状态更新接口")
@@ -153,7 +157,7 @@ public class TIeInvigilateCallMobileController {
         if (Objects.isNull(mapParameter.get("status")) || Objects.equals(mapParameter.get("status"), "")) {
             throw new BusinessException("监考视频状态不能为空");
         }
-        MonitorStatusSourceEnum status = (MonitorStatusSourceEnum) mapParameter.get("status");
+        MonitorStatusSourceEnum status = MonitorStatusSourceEnum.valueOf(String.valueOf(mapParameter.get("status")).toUpperCase());
         if (Objects.equals(status, MonitorStatusSourceEnum.STOP.name()) && (Objects.isNull(mapParameter.get("type")) || Objects.equals(mapParameter.get("type"), ""))) {
             throw new BusinessException("异常类型不能为空");
         }
@@ -193,7 +197,10 @@ public class TIeInvigilateCallMobileController {
             WebsocketDto websocketDto = new WebsocketDto(WebsocketTypeEnum.MOBILE_MONITOR_STOP.name(), map);
             webSocketOeServer.sendMessage(websocketDto);
         }
-        return ResultUtil.ok(SystemConstant.SUCCESS);
+        Map map = new HashMap();
+        map.put("status", status.name());
+        map.put("updateTime", System.currentTimeMillis());
+        return ResultUtil.ok(map);
     }
 
     @ApiOperation(value = "撤销通话申请接口")
@@ -225,6 +232,8 @@ public class TIeInvigilateCallMobileController {
         MqDto mqDto = new MqDto(MqTopicEnum.themisTopic.getCode(), MqTagEnum.MONITOR_LOG.name(), tIeExamInvigilateCallLog, MqTagEnum.MONITOR_LOG, String.valueOf(tIeExamInvigilateCallLog.getId()), source.name());
         mqDtoService.assembleSendOneWayMsg(mqDto);
         //监考监控通话信息 发送mq end
-        return ResultUtil.ok(SystemConstant.SUCCESS);
+        Map map = new HashMap();
+        map.put("updateTime", System.currentTimeMillis());
+        return ResultUtil.ok(map);
     }
 }

+ 15 - 5
themis-exam/src/main/java/com/qmth/themis/exam/api/TIeInvigilateCallOeController.java

@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Objects;
 
@@ -93,7 +94,9 @@ public class TIeInvigilateCallOeController {
                 throw new RuntimeException(e);
             }
         }
-        return ResultUtil.ok(SystemConstant.SUCCESS);
+        Map map = new HashMap();
+        map.put("updateTime", System.currentTimeMillis());
+        return ResultUtil.ok(map);
     }
 
     @ApiOperation(value = "监控状态更新接口")
@@ -117,7 +120,7 @@ public class TIeInvigilateCallOeController {
         if (Objects.isNull(mapParameter.get("status")) || Objects.equals(mapParameter.get("status"), "")) {
             throw new BusinessException("监考视频状态不能为空");
         }
-        MonitorStatusSourceEnum status = (MonitorStatusSourceEnum) mapParameter.get("status");
+        MonitorStatusSourceEnum status = MonitorStatusSourceEnum.valueOf(String.valueOf(mapParameter.get("status")).toUpperCase());
         if (Objects.equals(status, MonitorStatusSourceEnum.STOP.name()) && (Objects.isNull(mapParameter.get("type")) || Objects.equals(mapParameter.get("type"), ""))) {
             throw new BusinessException("异常类型不能为空");
         }
@@ -140,7 +143,10 @@ public class TIeInvigilateCallOeController {
         MqDto mqDto = new MqDto(MqTopicEnum.themisTopic.getCode(), MqTagEnum.MONITOR_LOG.name(), tIeExamInvigilateCallLog, MqTagEnum.MONITOR_LOG, String.valueOf(tIeExamInvigilateCallLog.getId()), source.name());
         mqDtoService.assembleSendOneWayMsg(mqDto);
         //监考监控通话信息 发送mq end
-        return ResultUtil.ok(SystemConstant.SUCCESS);
+        Map map = new HashMap();
+        map.put("status", status.name());
+        map.put("updateTime", System.currentTimeMillis());
+        return ResultUtil.ok(map);
     }
 
     @ApiOperation(value = "发送通话申请接口")
@@ -173,7 +179,9 @@ public class TIeInvigilateCallOeController {
         MqDto mqDto = new MqDto(MqTopicEnum.themisTopic.getCode(), MqTagEnum.MONITOR_LOG.name(), tIeExamInvigilateCallLog, MqTagEnum.MONITOR_LOG, String.valueOf(tIeExamInvigilateCallLog.getId()), source.name());
         mqDtoService.assembleSendOneWayMsg(mqDto);
         //监考监控通话信息 发送mq end
-        return ResultUtil.ok(SystemConstant.SUCCESS);
+        Map map = new HashMap();
+        map.put("updateTime", System.currentTimeMillis());
+        return ResultUtil.ok(map);
     }
 
     @ApiOperation(value = "撤销通话申请接口")
@@ -205,6 +213,8 @@ public class TIeInvigilateCallOeController {
         MqDto mqDto = new MqDto(MqTopicEnum.themisTopic.getCode(), MqTagEnum.MONITOR_LOG.name(), tIeExamInvigilateCallLog, MqTagEnum.MONITOR_LOG, String.valueOf(tIeExamInvigilateCallLog.getId()), source.name());
         mqDtoService.assembleSendOneWayMsg(mqDto);
         //监考监控通话信息 发送mq end
-        return ResultUtil.ok(SystemConstant.SUCCESS);
+        Map map = new HashMap();
+        map.put("updateTime", System.currentTimeMillis());
+        return ResultUtil.ok(map);
     }
 }