Commit 072e84db195ab3399c8bd8b9baaa69c3efab9171
1 parent
ddfe4a7b
fix(SIP): 修复海康NVR无parentId导致分屏监控没办法展开的问题
由于海康NVR通道信息中不带NVR的ID作为parentId。导致通道信息parentId缺失, 在通道信息中判断device信息中的DeviceId如果为NVR的话,将NVR的deviceId设置为通道的parentId
Showing
1 changed file
with
2 additions
and
0 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java
| @@ -255,6 +255,8 @@ public class XmlUtil { | @@ -255,6 +255,8 @@ public class XmlUtil { | ||
| 255 | }else if (deviceChannel.getChannelId().length() == 20) { | 255 | }else if (deviceChannel.getChannelId().length() == 20) { |
| 256 | if (Integer.parseInt(deviceChannel.getChannelId().substring(10, 13)) == 216) { // 虚拟组织 | 256 | if (Integer.parseInt(deviceChannel.getChannelId().substring(10, 13)) == 216) { // 虚拟组织 |
| 257 | deviceChannel.setParentId(businessGroupID); | 257 | deviceChannel.setParentId(businessGroupID); |
| 258 | + }else if (Integer.parseInt(device.getDeviceId().substring(10, 13) )== 118) {//NVR 如果上级设备编号是NVR则直接将NVR的编号设置给通道的上级编号 | ||
| 259 | + deviceChannel.setParentId(device.getDeviceId()); | ||
| 258 | }else if (deviceChannel.getCivilCode() != null) { | 260 | }else if (deviceChannel.getCivilCode() != null) { |
| 259 | // 设备, 无parentId的20位是使用CivilCode表示上级的设备, | 261 | // 设备, 无parentId的20位是使用CivilCode表示上级的设备, |
| 260 | // 注:215 业务分组是需要有parentId的 | 262 | // 注:215 业务分组是需要有parentId的 |