648540858
2022-09-09 221f99c764b51c3cd284c6e5a41492c26c5c7ffc
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java
@@ -56,20 +56,14 @@
   @Operation(summary = "远程启动控制命令")
   @Parameter(name = "deviceId", description = "设备国标编号", required = true)
    @GetMapping("/teleboot/{deviceId}")
    public String teleBootApi(@PathVariable String deviceId) {
    public void teleBootApi(@PathVariable String deviceId) {
        if (logger.isDebugEnabled()) {
            logger.debug("设备远程启动API调用");
        }
        Device device = storager.queryVideoDevice(deviceId);
        boolean sucsess = cmder.teleBootCmd(device);
        if (sucsess) {
            JSONObject json = new JSONObject();
            json.put("DeviceID", deviceId);
            json.put("Result", "OK");
            return json.toJSONString();
        } else {
            logger.warn("设备远程启动API调用失败!");
         throw new ControllerException(ErrorCode.ERROR100.getCode(), "设备远程启动API调用失败!");
        if (!cmder.teleBootCmd(device)) {
         logger.warn("设备远程启动API调用失败!");
            throw new ControllerException(ErrorCode.ERROR100);
        }
    }