From ca16a79255f27709f88abc59bea362abdd1e2cc7 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: Sat, 7 May 2022 09:52:02 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=AD=E9=9F=B3=E5=8F=91?=
=?UTF-8?q?=E9=80=81=E9=80=9A=E9=81=93=E5=92=8C=E8=AF=AD=E9=9F=B3=E6=8E=A5?=
=?UTF-8?q?=E6=94=B6=E9=80=9A=E9=81=93=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sql/mysql.sql | 2 ++
sql/update.sql | 13 +++----------
.../genersoft/iot/vmp/VManageBootstrap.java | 1 -
.../genersoft/iot/vmp/gb28181/bean/Device.java | 18 ++++++++++++++++++
.../iot/vmp/storager/dao/DeviceMapper.java | 6 ++++++
.../vmanager/gb28181/play/PlayController.java | 16 ++++++++++++++--
web_src/src/components/dialog/deviceEdit.vue | 10 +++++++---
7 files changed, 50 insertions(+), 16 deletions(-)
diff --git a/sql/mysql.sql b/sql/mysql.sql
index cffaa690..4086d11c 100644
--- a/sql/mysql.sql
+++ b/sql/mysql.sql
@@ -44,6 +44,8 @@ CREATE TABLE `device` (
`mobilePositionSubmissionInterval` int(11) NOT NULL DEFAULT '5',
`subscribeCycleForAlarm` int(11) NOT NULL,
`hostAddress` varchar(50) NOT NULL,
+ `audioChannelForReceive` varchar(50) NOT NULL,
+ `audioChannelForSend` varchar(50) NOT NULL,
`charset` varchar(50) NOT NULL,
`ssrcCheck` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
diff --git a/sql/update.sql b/sql/update.sql
index 9c18c26e..8bfe343a 100644
--- a/sql/update.sql
+++ b/sql/update.sql
@@ -1,12 +1,5 @@
-alter table parent_platform
- add startOfflinePush int default 0 null;
-
-alter table parent_platform
- add administrativeDivision varchar(50) not null;
-
-alter table parent_platform
- add catalogGroup int default 1 null;
+alter table device
+ add audioChannelForReceive VARCHAR(50) null;
alter table device
- add ssrcCheck int default 0 null;
-
+ add audioChannelForSend VARCHAR(50) null;
\ No newline at end of file
diff --git a/src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java b/src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java
index 31185879..8ff2efb8 100644
--- a/src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java
+++ b/src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java
@@ -23,7 +23,6 @@ public class VManageBootstrap extends LogManager {
private static ConfigurableApplicationContext context;
public static void main(String[] args) {
VManageBootstrap.args = args;
- System.out.println("test");
VManageBootstrap.context = SpringApplication.run(VManageBootstrap.class, args);
}
// 项目重启
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java
index 81b96662..778608e5 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java
@@ -134,6 +134,16 @@ public class Device {
*/
private boolean ssrcCheck;
+ /**
+ * 设备用于接收语音消息的通道
+ */
+ private String audioChannelForReceive;
+
+ /**
+ * 设备用于发送语音消息的通道
+ */
+ private String audioChannelForSend;
+
public String getDeviceId() {
return deviceId;
@@ -334,4 +344,12 @@ public class Device {
public void setSsrcCheck(boolean ssrcCheck) {
this.ssrcCheck = ssrcCheck;
}
+
+ public String getAudioChannelForReceive() {
+ return audioChannelForReceive;
+ }
+
+ public void setAudioChannelForReceive(String audioChannelForReceive) {
+ this.audioChannelForReceive = audioChannelForReceive;
+ }
}
diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java
index 97cf2ccf..d1c942ff 100644
--- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java
+++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java
@@ -37,6 +37,8 @@ public interface DeviceMapper {
"subscribeCycleForMobilePosition," +
"mobilePositionSubmissionInterval," +
"subscribeCycleForAlarm," +
+ "audioChannelForReceive," +
+ "audioChannelForSend," +
"ssrcCheck," +
"online" +
") VALUES (" +
@@ -60,6 +62,8 @@ public interface DeviceMapper {
"#{subscribeCycleForMobilePosition}," +
"#{mobilePositionSubmissionInterval}," +
"#{subscribeCycleForAlarm}," +
+ "#{audioChannelForReceive}," +
+ "#{audioChannelForSend}," +
"#{ssrcCheck}," +
"#{online}" +
")")
@@ -86,6 +90,8 @@ public interface DeviceMapper {
", subscribeCycleForMobilePosition=${subscribeCycleForMobilePosition}" +
", mobilePositionSubmissionInterval=${mobilePositionSubmissionInterval}" +
", subscribeCycleForAlarm=${subscribeCycleForAlarm}" +
+ ", audioChannelForReceive=#{audioChannelForReceive}" +
+ ", audioChannelForSend=#{audioChannelForSend}" +
", ssrcCheck=${ssrcCheck}" +
"WHERE deviceId='${deviceId}'"+
" "})
diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
index 20ffc000..dc88da0a 100644
--- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
+++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
@@ -251,20 +251,32 @@ public class PlayController {
@ApiOperation("语音广播命令")
@ApiImplicitParams({
@ApiImplicitParam(name = "deviceId", value = "设备Id", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "channelForSend", value = "设备用于发送语音数据的通道", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "channelForReceive", value = "设备用于接收语音数据的通道", dataTypeClass = String.class),
})
@GetMapping("/broadcast/{deviceId}")
@PostMapping("/broadcast/{deviceId}")
- public DeferredResult> broadcastApi(@PathVariable String deviceId) {
+ public DeferredResult> broadcastApi(@PathVariable String deviceId,
+ String channelForSend,
+ String channelForReceive) {
if (logger.isDebugEnabled()) {
logger.debug("语音广播API调用");
}
Device device = storager.queryVideoDevice(deviceId);
- DeferredResult> result = new DeferredResult>(3 * 1000L);
+ DeferredResult> result = new DeferredResult<>(3 * 1000L);
String key = DeferredResultHolder.CALLBACK_CMD_BROADCAST + deviceId;
if (resultHolder.exist(key, null)) {
result.setResult(new ResponseEntity<>("设备使用中",HttpStatus.OK));
return result;
}
+
+// playService.audioBroadcast(deviceId, channelForSend, channelForReceive);
+
+
+
+
+
+
String uuid = UUID.randomUUID().toString();
if (device == null) {
diff --git a/web_src/src/components/dialog/deviceEdit.vue b/web_src/src/components/dialog/deviceEdit.vue
index b4dd2855..745a3e65 100644
--- a/web_src/src/components/dialog/deviceEdit.vue
+++ b/web_src/src/components/dialog/deviceEdit.vue
@@ -36,6 +36,12 @@
+
+
+
+
+
+
@@ -99,8 +105,6 @@ export default {
})
},
onSubmit: function () {
- console.log("onSubmit");
- console.log(this.form);
this.form.subscribeCycleForCatalog = this.form.subscribeCycleForCatalog||0
this.form.subscribeCycleForMobilePosition = this.form.subscribeCycleForMobilePosition||0
this.form.mobilePositionSubmissionInterval = this.form.mobilePositionSubmissionInterval||0
@@ -120,7 +124,7 @@ export default {
});
}
}).catch(function (error) {
- console.log(error);
+ console.error(error);
});
},
close: function () {