648540858
2022-09-02 7db2bf7b51015a7e989ea5b0f4d9486dfd99d4bd
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);
        }
    }