From 095a3e1384319a6ad7a757a0b2125f2aa0a64313 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: Mon, 31 Jul 2023 12:26:42 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=97=A0=E7=94=A8=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../iot/vmp/gb28181/transmit/cmd/ISIPCommander.java | 2 +-
.../vmp/gb28181/transmit/cmd/impl/SIPCommander.java | 5 +----
.../iot/vmp/service/impl/DeviceServiceImpl.java | 11 +++++++++++
.../iot/vmp/vmanager/server/ServerController.java | 8 --------
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommander.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommander.java
index d6840563..cff3b31d 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommander.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommander.java
@@ -334,7 +334,7 @@ public interface ISIPCommander {
* @param endTime 报警发生终止时间(可选)
* @return true = 命令发送成功
*/
- void alarmSubscribe(Device device, int expires, String startPriority, String endPriority, String alarmMethod, String alarmType, String startTime, String endTime) throws InvalidArgumentException, SipException, ParseException;
+ void alarmSubscribe(Device device, int expires, String startPriority, String endPriority, String alarmMethod, String startTime, String endTime) throws InvalidArgumentException, SipException, ParseException;
/**
* 订阅、取消订阅目录信息
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 782dc06a..dd46544b 100644
--- 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
@@ -1228,7 +1228,7 @@ public class SIPCommander implements ISIPCommander {
* @return true = 命令发送成功
*/
@Override
- public void alarmSubscribe(Device device, int expires, String startPriority, String endPriority, String alarmMethod, String alarmType, String startTime, String endTime) throws InvalidArgumentException, SipException, ParseException {
+ public void alarmSubscribe(Device device, int expires, String startPriority, String endPriority, String alarmMethod, String startTime, String endTime) throws InvalidArgumentException, SipException, ParseException {
StringBuffer cmdXml = new StringBuffer(200);
String charset = device.getCharset();
@@ -1246,9 +1246,6 @@ public class SIPCommander implements ISIPCommander {
if (!ObjectUtils.isEmpty(alarmMethod)) {
cmdXml.append("" + alarmMethod + "\r\n");
}
- if (!ObjectUtils.isEmpty(alarmType)) {
- cmdXml.append("" + alarmType + "\r\n");
- }
if (!ObjectUtils.isEmpty(startTime)) {
cmdXml.append("" + startTime + "\r\n");
}
diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java
index 6e748f4f..17e8e21e 100644
--- a/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java
@@ -183,6 +183,17 @@ public class DeviceServiceImpl implements IDeviceService {
redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), null, true);
}
+//
+// try {
+// cmder.alarmSubscribe(device, 600, "0", "4", "0", "2023-7-27T00:00:00", "2023-7-28T00:00:00");
+// } catch (InvalidArgumentException e) {
+// throw new RuntimeException(e);
+// } catch (SipException e) {
+// throw new RuntimeException(e);
+// } catch (ParseException e) {
+// throw new RuntimeException(e);
+// }
+
}
@Override
diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/server/ServerController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/server/ServerController.java
index f4bcb1a9..72641be4 100644
--- a/src/main/java/com/genersoft/iot/vmp/vmanager/server/ServerController.java
+++ b/src/main/java/com/genersoft/iot/vmp/vmanager/server/ServerController.java
@@ -266,12 +266,4 @@ public class ServerController {
return result;
}
-
- @PostMapping(value = "/test/getPort")
- @ResponseBody
- public int getPort() {
- int result = sendRtpPortManager.getNextPort(mediaServerService.getDefaultMediaServer());
- System.out.println(result);
- return result;
- }
}