修复目录订阅的状态异常
This commit is contained in:
parent
4bda14b098
commit
394c40d8bb
@ -203,12 +203,6 @@ public class XmlUtil {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
deviceChannel.setChannelId(channelId);
|
deviceChannel.setChannelId(channelId);
|
||||||
int channelTypeCode = Integer.parseInt(channelId.substring(10, 13));
|
|
||||||
if (channelTypeCode == 136 || channelTypeCode == 137 || channelTypeCode == 138) {
|
|
||||||
deviceChannel.setHasAudio(true);
|
|
||||||
}else {
|
|
||||||
deviceChannel.setHasAudio(false);
|
|
||||||
}
|
|
||||||
if (event != null && !event.equals(CatalogEvent.ADD) && !event.equals(CatalogEvent.UPDATE)) {
|
if (event != null && !event.equals(CatalogEvent.ADD) && !event.equals(CatalogEvent.UPDATE)) {
|
||||||
// 除了ADD和update情况下需要识别全部内容,
|
// 除了ADD和update情况下需要识别全部内容,
|
||||||
return deviceChannel;
|
return deviceChannel;
|
||||||
@ -217,17 +211,26 @@ public class XmlUtil {
|
|||||||
ChannelType channelType = ChannelType.Other;
|
ChannelType channelType = ChannelType.Other;
|
||||||
if (channelId.length() <= 8) {
|
if (channelId.length() <= 8) {
|
||||||
channelType = ChannelType.CivilCode;
|
channelType = ChannelType.CivilCode;
|
||||||
|
deviceChannel.setHasAudio(false);
|
||||||
}else {
|
}else {
|
||||||
if (channelId.length() == 20) {
|
if (channelId.length() == 20) {
|
||||||
int code = Integer.parseInt(channelId.substring(10, 13));
|
int code = Integer.parseInt(channelId.substring(10, 13));
|
||||||
switch (code){
|
switch (code){
|
||||||
case 215:
|
case 215:
|
||||||
channelType = ChannelType.BusinessGroup;
|
channelType = ChannelType.BusinessGroup;
|
||||||
|
deviceChannel.setHasAudio(false);
|
||||||
break;
|
break;
|
||||||
case 216:
|
case 216:
|
||||||
channelType = ChannelType.VirtualOrganization;
|
channelType = ChannelType.VirtualOrganization;
|
||||||
|
deviceChannel.setHasAudio(false);
|
||||||
|
break;
|
||||||
|
case 136:
|
||||||
|
case 137:
|
||||||
|
case 138:
|
||||||
|
deviceChannel.setHasAudio(true);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
deviceChannel.setHasAudio(false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -19,11 +19,11 @@ public interface DeviceChannelMapper {
|
|||||||
@Insert("INSERT INTO device_channel (channelId, deviceId, name, manufacture, model, owner, civilCode, block, " +
|
@Insert("INSERT INTO device_channel (channelId, deviceId, name, manufacture, model, owner, civilCode, block, " +
|
||||||
"address, parental, parentId, safetyWay, registerWay, certNum, certifiable, errCode, secrecy, " +
|
"address, parental, parentId, safetyWay, registerWay, certNum, certifiable, errCode, secrecy, " +
|
||||||
"ipAddress, port, password, PTZType, status, streamId, longitude, latitude, longitudeGcj02, latitudeGcj02, " +
|
"ipAddress, port, password, PTZType, status, streamId, longitude, latitude, longitudeGcj02, latitudeGcj02, " +
|
||||||
"longitudeWgs84, latitudeWgs84, createTime, updateTime, businessGroupId, gpsTime) " +
|
"longitudeWgs84, latitudeWgs84, hasAudio, createTime, updateTime, businessGroupId, gpsTime) " +
|
||||||
"VALUES ('${channelId}', '${deviceId}', '${name}', '${manufacture}', '${model}', '${owner}', '${civilCode}', '${block}'," +
|
"VALUES ('${channelId}', '${deviceId}', '${name}', '${manufacture}', '${model}', '${owner}', '${civilCode}', '${block}'," +
|
||||||
"'${address}', ${parental}, '${parentId}', ${safetyWay}, ${registerWay}, '${certNum}', ${certifiable}, ${errCode}, '${secrecy}', " +
|
"'${address}', ${parental}, '${parentId}', ${safetyWay}, ${registerWay}, '${certNum}', ${certifiable}, ${errCode}, '${secrecy}', " +
|
||||||
"'${ipAddress}', ${port}, '${password}', ${PTZType}, ${status}, '${streamId}', ${longitude}, ${latitude}, ${longitudeGcj02}, " +
|
"'${ipAddress}', ${port}, '${password}', ${PTZType}, ${status}, '${streamId}', ${longitude}, ${latitude}, ${longitudeGcj02}, " +
|
||||||
"${latitudeGcj02}, ${longitudeWgs84}, ${latitudeWgs84},'${createTime}', '${updateTime}', '${businessGroupId}', '${gpsTime}')")
|
"${latitudeGcj02}, ${longitudeWgs84}, ${latitudeWgs84}, ${hasAudio}, '${createTime}', '${updateTime}', '${businessGroupId}', '${gpsTime}')")
|
||||||
int add(DeviceChannel channel);
|
int add(DeviceChannel channel);
|
||||||
|
|
||||||
@Update(value = {" <script>" +
|
@Update(value = {" <script>" +
|
||||||
|
@ -133,7 +133,6 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
|
|||||||
deviceChannel.setStreamId(allChannelMap.get(deviceChannel.getChannelId()).getStreamId());
|
deviceChannel.setStreamId(allChannelMap.get(deviceChannel.getChannelId()).getStreamId());
|
||||||
deviceChannel.setHasAudio(allChannelMap.get(deviceChannel.getChannelId()).isHasAudio());
|
deviceChannel.setHasAudio(allChannelMap.get(deviceChannel.getChannelId()).isHasAudio());
|
||||||
}
|
}
|
||||||
|
|
||||||
channels.add(deviceChannel);
|
channels.add(deviceChannel);
|
||||||
if (!ObjectUtils.isEmpty(deviceChannel.getParentId())) {
|
if (!ObjectUtils.isEmpty(deviceChannel.getParentId())) {
|
||||||
if (subContMap.get(deviceChannel.getParentId()) == null) {
|
if (subContMap.get(deviceChannel.getParentId()) == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user