Browse Source

添加行政区划功能,修复目录发送数量统计的BUG

pull/439/head
648540858 3 years ago
parent
commit
91515f1b05
  1. 1
      src/main/java/com/genersoft/iot/vmp/gb28181/task/impl/MobilePositionSubscribeHandlerTask.java
  2. 7
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
  3. 4
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/CatalogNotifyMessageHandler.java
  4. 4
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/query/cmd/CatalogQueryMessageHandler.java
  5. 3
      src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java
  6. 4
      src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
  7. 11
      web_src/src/components/dialog/platformEdit.vue

1
src/main/java/com/genersoft/iot/vmp/gb28181/task/impl/MobilePositionSubscribeHandlerTask.java

@ -29,7 +29,6 @@ public class MobilePositionSubscribeHandlerTask implements ISubscribeTask {
private String key; private String key;
public MobilePositionSubscribeHandlerTask(IRedisCatchStorage redisCatchStorage, ISIPCommanderForPlatform sipCommanderForPlatform, IVideoManagerStorage storager, String platformId, String sn, String key, SubscribeHolder subscribeInfo) { public MobilePositionSubscribeHandlerTask(IRedisCatchStorage redisCatchStorage, ISIPCommanderForPlatform sipCommanderForPlatform, IVideoManagerStorage storager, String platformId, String sn, String key, SubscribeHolder subscribeInfo) {
System.out.println("MobilePositionSubscribeHandlerTask 初始化");
this.redisCatchStorage = redisCatchStorage; this.redisCatchStorage = redisCatchStorage;
this.storager = storager; this.storager = storager;
this.platform = storager.queryParentPlatByServerGBId(platformId); this.platform = storager.queryParentPlatByServerGBId(platformId);

7
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java

@ -293,12 +293,11 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
} }
try { try {
List<DeviceChannel> deviceChannels; List<DeviceChannel> deviceChannels;
if (index + parentPlatform.getCatalogGroup() < channels.size() - 1) { if (index + parentPlatform.getCatalogGroup() < channels.size()) {
deviceChannels = channels.subList(index, index + parentPlatform.getCatalogGroup()); deviceChannels = channels.subList(index, index + parentPlatform.getCatalogGroup());
}else { }else {
deviceChannels = channels.subList(index, channels.size()); deviceChannels = channels.subList(index, channels.size());
} }
String catalogXml = getCatalogXml(deviceChannels, sn, parentPlatform, channels.size()); String catalogXml = getCatalogXml(deviceChannels, sn, parentPlatform, channels.size());
// callid // callid
CallIdHeader callIdHeader = parentPlatform.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId() CallIdHeader callIdHeader = parentPlatform.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId()
@ -445,7 +444,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
return true; return true;
} }
List<DeviceChannel> channels; List<DeviceChannel> channels;
if (index + parentPlatform.getCatalogGroup() < deviceChannels.size() - 1) { if (index + parentPlatform.getCatalogGroup() < deviceChannels.size()) {
channels = deviceChannels.subList(index, index + parentPlatform.getCatalogGroup()); channels = deviceChannels.subList(index, index + parentPlatform.getCatalogGroup());
}else { }else {
channels = deviceChannels.subList(index, deviceChannels.size()); channels = deviceChannels.subList(index, deviceChannels.size());
@ -579,7 +578,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
return true; return true;
} }
List<DeviceChannel> channels; List<DeviceChannel> channels;
if (index + parentPlatform.getCatalogGroup() < deviceChannels.size() - 1) { if (index + parentPlatform.getCatalogGroup() < deviceChannels.size()) {
channels = deviceChannels.subList(index, index + parentPlatform.getCatalogGroup()); channels = deviceChannels.subList(index, index + parentPlatform.getCatalogGroup());
}else { }else {
channels = deviceChannels.subList(index, deviceChannels.size()); channels = deviceChannels.subList(index, deviceChannels.size());

4
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/CatalogNotifyMessageHandler.java

@ -79,7 +79,7 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple
deviceChannel.setParental(1); deviceChannel.setParental(1);
deviceChannel.setParentId(catalog.getParentId()); deviceChannel.setParentId(catalog.getParentId());
deviceChannel.setRegisterWay(1); deviceChannel.setRegisterWay(1);
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6)); deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
deviceChannel.setModel("live"); deviceChannel.setModel("live");
deviceChannel.setOwner("wvp-pro"); deviceChannel.setOwner("wvp-pro");
deviceChannel.setSecrecy("0"); deviceChannel.setSecrecy("0");
@ -116,7 +116,7 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple
deviceChannel.setStatus(1); deviceChannel.setStatus(1);
deviceChannel.setParentId(gbStream.getCatalogId()); deviceChannel.setParentId(gbStream.getCatalogId());
deviceChannel.setRegisterWay(1); deviceChannel.setRegisterWay(1);
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6)); deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
deviceChannel.setModel("live"); deviceChannel.setModel("live");
deviceChannel.setOwner("wvp-pro"); deviceChannel.setOwner("wvp-pro");
deviceChannel.setParental(0); deviceChannel.setParental(0);

4
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/query/cmd/CatalogQueryMessageHandler.java

@ -93,7 +93,7 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem
deviceChannel.setParental(1); deviceChannel.setParental(1);
deviceChannel.setParentId(catalog.getParentId()); deviceChannel.setParentId(catalog.getParentId());
deviceChannel.setRegisterWay(1); deviceChannel.setRegisterWay(1);
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6)); deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
deviceChannel.setModel("live"); deviceChannel.setModel("live");
deviceChannel.setOwner("wvp-pro"); deviceChannel.setOwner("wvp-pro");
deviceChannel.setSecrecy("0"); deviceChannel.setSecrecy("0");
@ -130,7 +130,7 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem
deviceChannel.setStatus(1); deviceChannel.setStatus(1);
deviceChannel.setParentId(gbStream.getCatalogId()); deviceChannel.setParentId(gbStream.getCatalogId());
deviceChannel.setRegisterWay(1); deviceChannel.setRegisterWay(1);
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6)); deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
deviceChannel.setModel("live"); deviceChannel.setModel("live");
deviceChannel.setOwner("wvp-pro"); deviceChannel.setOwner("wvp-pro");
deviceChannel.setParental(0); deviceChannel.setParental(0);

3
src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java

@ -420,9 +420,6 @@ public class StreamPushServiceImpl implements IStreamPushService {
continue; continue;
} }
streamPushItemForPlatform.setPlatformId(platFormInfoArray[0]); streamPushItemForPlatform.setPlatformId(platFormInfoArray[0]);
if (platFormInfoArray[0].equals("34020000002110000001")) {
System.out.println(111);
}
List<GbStream> gbStreamList = platformForEvent.get(platFormInfoArray[0]); List<GbStream> gbStreamList = platformForEvent.get(platFormInfoArray[0]);
if (gbStreamList == null) { if (gbStreamList == null) {
gbStreamList = new ArrayList<>(); gbStreamList = new ArrayList<>();

4
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java

@ -524,7 +524,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
parentPlatform.setCatalogGroup(1); parentPlatform.setCatalogGroup(1);
} }
if (parentPlatform.getAdministrativeDivision() == null) { if (parentPlatform.getAdministrativeDivision() == null) {
parentPlatform.setAdministrativeDivision(parentPlatform.getDeviceGBId().substring(0,6)); parentPlatform.setAdministrativeDivision(parentPlatform.getAdministrativeDivision());
} }
ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getServerGBId()); // .getDeviceGBId()); ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getServerGBId()); // .getDeviceGBId());
if (parentPlatform.getId() == null ) { if (parentPlatform.getId() == null ) {
@ -1081,7 +1081,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
deviceChannel.setParentId(catalog.getParentId()); deviceChannel.setParentId(catalog.getParentId());
deviceChannel.setRegisterWay(1); deviceChannel.setRegisterWay(1);
// 行政区划应该是Domain的前八位 // 行政区划应该是Domain的前八位
deviceChannel.setCivilCode(parentPlatByServerGBId.getDeviceGBId().substring(0,6)); deviceChannel.setCivilCode(parentPlatByServerGBId.getAdministrativeDivision());
deviceChannel.setModel("live"); deviceChannel.setModel("live");
deviceChannel.setOwner("wvp-pro"); deviceChannel.setOwner("wvp-pro");
deviceChannel.setSecrecy("0"); deviceChannel.setSecrecy("0");

11
web_src/src/components/dialog/platformEdit.vue

@ -44,6 +44,9 @@
<el-form-item label="SIP认证用户名" prop="username"> <el-form-item label="SIP认证用户名" prop="username">
<el-input v-model="platform.username"></el-input> <el-input v-model="platform.username"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="行政区划" prop="administrativeDivision">
<el-input v-model="platform.administrativeDivision" clearable></el-input>
</el-form-item>
<el-form-item label="SIP认证密码" prop="password"> <el-form-item label="SIP认证密码" prop="password">
<el-input v-model="platform.password" ></el-input> <el-input v-model="platform.password" ></el-input>
</el-form-item> </el-form-item>
@ -153,6 +156,7 @@ export default {
shareAllLiveStream: false, shareAllLiveStream: false,
startOfflinePush: false, startOfflinePush: false,
catalogGroup: 1, catalogGroup: 1,
administrativeDivision: null,
}, },
rules: { rules: {
name: [{ required: true, message: "请输入平台名称", trigger: "blur" }], name: [{ required: true, message: "请输入平台名称", trigger: "blur" }],
@ -190,6 +194,7 @@ export default {
that.platform.devicePort = res.data.devicePort; that.platform.devicePort = res.data.devicePort;
that.platform.username = res.data.username; that.platform.username = res.data.username;
that.platform.password = res.data.password; that.platform.password = res.data.password;
that.platform.administrativeDivision = res.data.username.substr(0, 6);
}).catch(function (error) { }).catch(function (error) {
console.log(error); console.log(error);
}); });
@ -216,6 +221,7 @@ export default {
this.platform.catalogId = platform.catalogId; this.platform.catalogId = platform.catalogId;
this.platform.startOfflinePush = platform.startOfflinePush; this.platform.startOfflinePush = platform.startOfflinePush;
this.platform.catalogGroup = platform.catalogGroup; this.platform.catalogGroup = platform.catalogGroup;
this.platform.administrativeDivision = platform.administrativeDivision;
this.onSubmit_text = "保存"; this.onSubmit_text = "保存";
this.saveUrl = "/api/platform/save"; this.saveUrl = "/api/platform/save";
} }
@ -230,6 +236,10 @@ export default {
deviceGBIdChange: function () { deviceGBIdChange: function () {
this.platform.username = this.platform.deviceGBId ; this.platform.username = this.platform.deviceGBId ;
if (this.platform.administrativeDivision == null) {
this.platform.administrativeDivision = this.platform.deviceGBId.substr(0, 6);
}
}, },
onSubmit: function () { onSubmit: function () {
var that = this; var that = this;
@ -270,6 +280,7 @@ export default {
rtcp: false, rtcp: false,
name: null, name: null,
serverGBId: null, serverGBId: null,
administrativeDivision: null,
serverGBDomain: null, serverGBDomain: null,
serverIP: null, serverIP: null,
serverPort: null, serverPort: null,

Loading…
Cancel
Save