增加对部分NVR的兼容性处理

This commit is contained in:
648540858 2020-11-25 11:42:51 +08:00
parent c8c2fd23b4
commit 0a70257b4c

View File

@ -184,10 +184,11 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor {
DeviceChannel deviceChannel = new DeviceChannel(); DeviceChannel deviceChannel = new DeviceChannel();
deviceChannel.setName(channelName); deviceChannel.setName(channelName);
deviceChannel.setChannelId(channelDeviceId); deviceChannel.setChannelId(channelDeviceId);
if (status.equals("ON") || status.equals("On")) { // ONLINE OFFLINE 部分NVR的兼容性处理
if (status.equals("ON") || status.equals("On") || status.equals("ONLINE")) {
deviceChannel.setStatus(1); deviceChannel.setStatus(1);
} }
if (status.equals("OFF") || status.equals("Off")) { if (status.equals("OFF") || status.equals("Off") || status.equals("OFFLINE")) {
deviceChannel.setStatus(0); deviceChannel.setStatus(0);
} }