From 416dae00bf84a136cb203d9edf8a635dd12f8e93 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: Thu, 28 Dec 2023 00:15:18 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../vmp/gb28181/transmit/cmd/impl/SIPCommander.java | 1 -
.../vmp/vmanager/gb28181/device/DeviceControl.java | 11 +++++------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
index ae414b80..25f5bf14 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
@@ -738,7 +738,6 @@ public class SIPCommander implements ISIPCommander {
cmdXml.append("Boot\r\n");
cmdXml.append("\r\n");
-
Request request = headerProvider.createMessageRequest(device, cmdXml.toString(), null, SipUtils.getNewFromTag(), null,sipSender.getNewCallIdHeader(sipLayer.getLocalIp(device.getLocalIp()),device.getTransport()));
sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), request);
diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java
index 07796c2b..df752002 100755
--- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java
+++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java
@@ -70,7 +70,7 @@ public class DeviceControl {
@Parameter(name = "deviceId", description = "设备国标编号", required = true)
@Parameter(name = "channelId", description = "通道国标编号", required = true)
@Parameter(name = "command", description = "控制命令,可选值:start(手动录像),stop(停止手动录像)", required = true)
- @GetMapping("/record/{deviceId}/{channelId}")
+ @GetMapping("/record/{deviceId}/{channelId}")
public DeferredResult> recordApi(@PathVariable String deviceId,
@PathVariable String channelId,
String command) {
@@ -123,8 +123,7 @@ public class DeviceControl {
@Operation(summary = "布防/撤防命令", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "deviceId", description = "设备国标编号", required = true)
- @Parameter(name = "channelId", description = "通道国标编号", required = true)
- @Parameter(name = "command", description = "控制命令,可选值:start(布防),stop(撤防)", required = true)
+ @Parameter(name = "command", description = "控制命令,可选值:set(布防),reset(撤防)", required = true)
@GetMapping("/guard/{deviceId}")
public DeferredResult guardApi(@PathVariable String deviceId, String command) {
if (logger.isDebugEnabled()) {
@@ -137,9 +136,9 @@ public class DeviceControl {
String key = DeferredResultHolder.CALLBACK_CMD_DEVICECONTROL + deviceId + deviceId;
String uuid =UUID.randomUUID().toString();
boolean setGuard;
- if (command.equalsIgnoreCase("start")) {
+ if (command.equalsIgnoreCase("set")) {
setGuard = true;
- }else if (command.equalsIgnoreCase("stop")) {
+ }else if (command.equalsIgnoreCase("reset")) {
setGuard = false;
}else {
throw new ControllerException(ErrorCode.ERROR100.getCode(), "command参数不是规定值");
@@ -185,7 +184,7 @@ public class DeviceControl {
@GetMapping("/reset_alarm/{deviceId}")
public DeferredResult> resetAlarmApi(@PathVariable String deviceId,
@RequestParam(required = false) Integer alarmMethod,
- @RequestParam(required = false) Integer alarmType) {
+ @RequestParam(required = false) Integer alarmType) {
if (logger.isDebugEnabled()) {
logger.debug("报警复位API调用");
}