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

This commit is contained in:
648540858
2022-04-18 17:38:49 +08:00
parent 93d69d5476
commit 91515f1b05
7 changed files with 20 additions and 14 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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