Commit 91515f1b05aca0073b5dd3d4e2b3855d9b69066b
1 parent
93d69d54
添加行政区划功能,修复目录发送数量统计的BUG
Showing
7 changed files
with
20 additions
and
14 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/task/impl/MobilePositionSubscribeHandlerTask.java
| @@ -29,7 +29,6 @@ public class MobilePositionSubscribeHandlerTask implements ISubscribeTask { | @@ -29,7 +29,6 @@ public class MobilePositionSubscribeHandlerTask implements ISubscribeTask { | ||
| 29 | private String key; | 29 | private String key; |
| 30 | 30 | ||
| 31 | public MobilePositionSubscribeHandlerTask(IRedisCatchStorage redisCatchStorage, ISIPCommanderForPlatform sipCommanderForPlatform, IVideoManagerStorage storager, String platformId, String sn, String key, SubscribeHolder subscribeInfo) { | 31 | public MobilePositionSubscribeHandlerTask(IRedisCatchStorage redisCatchStorage, ISIPCommanderForPlatform sipCommanderForPlatform, IVideoManagerStorage storager, String platformId, String sn, String key, SubscribeHolder subscribeInfo) { |
| 32 | - System.out.println("MobilePositionSubscribeHandlerTask 初始化"); | ||
| 33 | this.redisCatchStorage = redisCatchStorage; | 32 | this.redisCatchStorage = redisCatchStorage; |
| 34 | this.storager = storager; | 33 | this.storager = storager; |
| 35 | this.platform = storager.queryParentPlatByServerGBId(platformId); | 34 | this.platform = storager.queryParentPlatByServerGBId(platformId); |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
| @@ -293,12 +293,11 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { | @@ -293,12 +293,11 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { | ||
| 293 | } | 293 | } |
| 294 | try { | 294 | try { |
| 295 | List<DeviceChannel> deviceChannels; | 295 | List<DeviceChannel> deviceChannels; |
| 296 | - if (index + parentPlatform.getCatalogGroup() < channels.size() - 1) { | 296 | + if (index + parentPlatform.getCatalogGroup() < channels.size()) { |
| 297 | deviceChannels = channels.subList(index, index + parentPlatform.getCatalogGroup()); | 297 | deviceChannels = channels.subList(index, index + parentPlatform.getCatalogGroup()); |
| 298 | }else { | 298 | }else { |
| 299 | deviceChannels = channels.subList(index, channels.size()); | 299 | deviceChannels = channels.subList(index, channels.size()); |
| 300 | } | 300 | } |
| 301 | - | ||
| 302 | String catalogXml = getCatalogXml(deviceChannels, sn, parentPlatform, channels.size()); | 301 | String catalogXml = getCatalogXml(deviceChannels, sn, parentPlatform, channels.size()); |
| 303 | // callid | 302 | // callid |
| 304 | CallIdHeader callIdHeader = parentPlatform.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId() | 303 | CallIdHeader callIdHeader = parentPlatform.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId() |
| @@ -445,7 +444,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { | @@ -445,7 +444,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { | ||
| 445 | return true; | 444 | return true; |
| 446 | } | 445 | } |
| 447 | List<DeviceChannel> channels; | 446 | List<DeviceChannel> channels; |
| 448 | - if (index + parentPlatform.getCatalogGroup() < deviceChannels.size() - 1) { | 447 | + if (index + parentPlatform.getCatalogGroup() < deviceChannels.size()) { |
| 449 | channels = deviceChannels.subList(index, index + parentPlatform.getCatalogGroup()); | 448 | channels = deviceChannels.subList(index, index + parentPlatform.getCatalogGroup()); |
| 450 | }else { | 449 | }else { |
| 451 | channels = deviceChannels.subList(index, deviceChannels.size()); | 450 | channels = deviceChannels.subList(index, deviceChannels.size()); |
| @@ -579,7 +578,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { | @@ -579,7 +578,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { | ||
| 579 | return true; | 578 | return true; |
| 580 | } | 579 | } |
| 581 | List<DeviceChannel> channels; | 580 | List<DeviceChannel> channels; |
| 582 | - if (index + parentPlatform.getCatalogGroup() < deviceChannels.size() - 1) { | 581 | + if (index + parentPlatform.getCatalogGroup() < deviceChannels.size()) { |
| 583 | channels = deviceChannels.subList(index, index + parentPlatform.getCatalogGroup()); | 582 | channels = deviceChannels.subList(index, index + parentPlatform.getCatalogGroup()); |
| 584 | }else { | 583 | }else { |
| 585 | channels = deviceChannels.subList(index, deviceChannels.size()); | 584 | channels = deviceChannels.subList(index, deviceChannels.size()); |
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 | @@ -79,7 +79,7 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple | ||
| 79 | deviceChannel.setParental(1); | 79 | deviceChannel.setParental(1); |
| 80 | deviceChannel.setParentId(catalog.getParentId()); | 80 | deviceChannel.setParentId(catalog.getParentId()); |
| 81 | deviceChannel.setRegisterWay(1); | 81 | deviceChannel.setRegisterWay(1); |
| 82 | - deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6)); | 82 | + deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision()); |
| 83 | deviceChannel.setModel("live"); | 83 | deviceChannel.setModel("live"); |
| 84 | deviceChannel.setOwner("wvp-pro"); | 84 | deviceChannel.setOwner("wvp-pro"); |
| 85 | deviceChannel.setSecrecy("0"); | 85 | deviceChannel.setSecrecy("0"); |
| @@ -116,7 +116,7 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple | @@ -116,7 +116,7 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple | ||
| 116 | deviceChannel.setStatus(1); | 116 | deviceChannel.setStatus(1); |
| 117 | deviceChannel.setParentId(gbStream.getCatalogId()); | 117 | deviceChannel.setParentId(gbStream.getCatalogId()); |
| 118 | deviceChannel.setRegisterWay(1); | 118 | deviceChannel.setRegisterWay(1); |
| 119 | - deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6)); | 119 | + deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision()); |
| 120 | deviceChannel.setModel("live"); | 120 | deviceChannel.setModel("live"); |
| 121 | deviceChannel.setOwner("wvp-pro"); | 121 | deviceChannel.setOwner("wvp-pro"); |
| 122 | deviceChannel.setParental(0); | 122 | deviceChannel.setParental(0); |
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 | @@ -93,7 +93,7 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem | ||
| 93 | deviceChannel.setParental(1); | 93 | deviceChannel.setParental(1); |
| 94 | deviceChannel.setParentId(catalog.getParentId()); | 94 | deviceChannel.setParentId(catalog.getParentId()); |
| 95 | deviceChannel.setRegisterWay(1); | 95 | deviceChannel.setRegisterWay(1); |
| 96 | - deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6)); | 96 | + deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision()); |
| 97 | deviceChannel.setModel("live"); | 97 | deviceChannel.setModel("live"); |
| 98 | deviceChannel.setOwner("wvp-pro"); | 98 | deviceChannel.setOwner("wvp-pro"); |
| 99 | deviceChannel.setSecrecy("0"); | 99 | deviceChannel.setSecrecy("0"); |
| @@ -130,7 +130,7 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem | @@ -130,7 +130,7 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem | ||
| 130 | deviceChannel.setStatus(1); | 130 | deviceChannel.setStatus(1); |
| 131 | deviceChannel.setParentId(gbStream.getCatalogId()); | 131 | deviceChannel.setParentId(gbStream.getCatalogId()); |
| 132 | deviceChannel.setRegisterWay(1); | 132 | deviceChannel.setRegisterWay(1); |
| 133 | - deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6)); | 133 | + deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision()); |
| 134 | deviceChannel.setModel("live"); | 134 | deviceChannel.setModel("live"); |
| 135 | deviceChannel.setOwner("wvp-pro"); | 135 | deviceChannel.setOwner("wvp-pro"); |
| 136 | deviceChannel.setParental(0); | 136 | deviceChannel.setParental(0); |
src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java
| @@ -420,9 +420,6 @@ public class StreamPushServiceImpl implements IStreamPushService { | @@ -420,9 +420,6 @@ public class StreamPushServiceImpl implements IStreamPushService { | ||
| 420 | continue; | 420 | continue; |
| 421 | } | 421 | } |
| 422 | streamPushItemForPlatform.setPlatformId(platFormInfoArray[0]); | 422 | streamPushItemForPlatform.setPlatformId(platFormInfoArray[0]); |
| 423 | - if (platFormInfoArray[0].equals("34020000002110000001")) { | ||
| 424 | - System.out.println(111); | ||
| 425 | - } | ||
| 426 | List<GbStream> gbStreamList = platformForEvent.get(platFormInfoArray[0]); | 423 | List<GbStream> gbStreamList = platformForEvent.get(platFormInfoArray[0]); |
| 427 | if (gbStreamList == null) { | 424 | if (gbStreamList == null) { |
| 428 | gbStreamList = new ArrayList<>(); | 425 | gbStreamList = new ArrayList<>(); |
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
| @@ -524,7 +524,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { | @@ -524,7 +524,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { | ||
| 524 | parentPlatform.setCatalogGroup(1); | 524 | parentPlatform.setCatalogGroup(1); |
| 525 | } | 525 | } |
| 526 | if (parentPlatform.getAdministrativeDivision() == null) { | 526 | if (parentPlatform.getAdministrativeDivision() == null) { |
| 527 | - parentPlatform.setAdministrativeDivision(parentPlatform.getDeviceGBId().substring(0,6)); | 527 | + parentPlatform.setAdministrativeDivision(parentPlatform.getAdministrativeDivision()); |
| 528 | } | 528 | } |
| 529 | ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getServerGBId()); // .getDeviceGBId()); | 529 | ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getServerGBId()); // .getDeviceGBId()); |
| 530 | if (parentPlatform.getId() == null ) { | 530 | if (parentPlatform.getId() == null ) { |
| @@ -1081,7 +1081,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { | @@ -1081,7 +1081,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { | ||
| 1081 | deviceChannel.setParentId(catalog.getParentId()); | 1081 | deviceChannel.setParentId(catalog.getParentId()); |
| 1082 | deviceChannel.setRegisterWay(1); | 1082 | deviceChannel.setRegisterWay(1); |
| 1083 | // 行政区划应该是Domain的前八位 | 1083 | // 行政区划应该是Domain的前八位 |
| 1084 | - deviceChannel.setCivilCode(parentPlatByServerGBId.getDeviceGBId().substring(0,6)); | 1084 | + deviceChannel.setCivilCode(parentPlatByServerGBId.getAdministrativeDivision()); |
| 1085 | deviceChannel.setModel("live"); | 1085 | deviceChannel.setModel("live"); |
| 1086 | deviceChannel.setOwner("wvp-pro"); | 1086 | deviceChannel.setOwner("wvp-pro"); |
| 1087 | deviceChannel.setSecrecy("0"); | 1087 | deviceChannel.setSecrecy("0"); |
web_src/src/components/dialog/platformEdit.vue
| @@ -44,6 +44,9 @@ | @@ -44,6 +44,9 @@ | ||
| 44 | <el-form-item label="SIP认证用户名" prop="username"> | 44 | <el-form-item label="SIP认证用户名" prop="username"> |
| 45 | <el-input v-model="platform.username"></el-input> | 45 | <el-input v-model="platform.username"></el-input> |
| 46 | </el-form-item> | 46 | </el-form-item> |
| 47 | + <el-form-item label="行政区划" prop="administrativeDivision"> | ||
| 48 | + <el-input v-model="platform.administrativeDivision" clearable></el-input> | ||
| 49 | + </el-form-item> | ||
| 47 | <el-form-item label="SIP认证密码" prop="password"> | 50 | <el-form-item label="SIP认证密码" prop="password"> |
| 48 | <el-input v-model="platform.password" ></el-input> | 51 | <el-input v-model="platform.password" ></el-input> |
| 49 | </el-form-item> | 52 | </el-form-item> |
| @@ -153,6 +156,7 @@ export default { | @@ -153,6 +156,7 @@ export default { | ||
| 153 | shareAllLiveStream: false, | 156 | shareAllLiveStream: false, |
| 154 | startOfflinePush: false, | 157 | startOfflinePush: false, |
| 155 | catalogGroup: 1, | 158 | catalogGroup: 1, |
| 159 | + administrativeDivision: null, | ||
| 156 | }, | 160 | }, |
| 157 | rules: { | 161 | rules: { |
| 158 | name: [{ required: true, message: "请输入平台名称", trigger: "blur" }], | 162 | name: [{ required: true, message: "请输入平台名称", trigger: "blur" }], |
| @@ -190,6 +194,7 @@ export default { | @@ -190,6 +194,7 @@ export default { | ||
| 190 | that.platform.devicePort = res.data.devicePort; | 194 | that.platform.devicePort = res.data.devicePort; |
| 191 | that.platform.username = res.data.username; | 195 | that.platform.username = res.data.username; |
| 192 | that.platform.password = res.data.password; | 196 | that.platform.password = res.data.password; |
| 197 | + that.platform.administrativeDivision = res.data.username.substr(0, 6); | ||
| 193 | }).catch(function (error) { | 198 | }).catch(function (error) { |
| 194 | console.log(error); | 199 | console.log(error); |
| 195 | }); | 200 | }); |
| @@ -216,6 +221,7 @@ export default { | @@ -216,6 +221,7 @@ export default { | ||
| 216 | this.platform.catalogId = platform.catalogId; | 221 | this.platform.catalogId = platform.catalogId; |
| 217 | this.platform.startOfflinePush = platform.startOfflinePush; | 222 | this.platform.startOfflinePush = platform.startOfflinePush; |
| 218 | this.platform.catalogGroup = platform.catalogGroup; | 223 | this.platform.catalogGroup = platform.catalogGroup; |
| 224 | + this.platform.administrativeDivision = platform.administrativeDivision; | ||
| 219 | this.onSubmit_text = "保存"; | 225 | this.onSubmit_text = "保存"; |
| 220 | this.saveUrl = "/api/platform/save"; | 226 | this.saveUrl = "/api/platform/save"; |
| 221 | } | 227 | } |
| @@ -230,6 +236,10 @@ export default { | @@ -230,6 +236,10 @@ export default { | ||
| 230 | deviceGBIdChange: function () { | 236 | deviceGBIdChange: function () { |
| 231 | 237 | ||
| 232 | this.platform.username = this.platform.deviceGBId ; | 238 | this.platform.username = this.platform.deviceGBId ; |
| 239 | + if (this.platform.administrativeDivision == null) { | ||
| 240 | + this.platform.administrativeDivision = this.platform.deviceGBId.substr(0, 6); | ||
| 241 | + } | ||
| 242 | + | ||
| 233 | }, | 243 | }, |
| 234 | onSubmit: function () { | 244 | onSubmit: function () { |
| 235 | var that = this; | 245 | var that = this; |
| @@ -270,6 +280,7 @@ export default { | @@ -270,6 +280,7 @@ export default { | ||
| 270 | rtcp: false, | 280 | rtcp: false, |
| 271 | name: null, | 281 | name: null, |
| 272 | serverGBId: null, | 282 | serverGBId: null, |
| 283 | + administrativeDivision: null, | ||
| 273 | serverGBDomain: null, | 284 | serverGBDomain: null, |
| 274 | serverIP: null, | 285 | serverIP: null, |
| 275 | serverPort: null, | 286 | serverPort: null, |