From de390d39825469c4ba0bf1fda2a6383fc1a3cb47 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 28 五月 2024 10:16:46 +0800
Subject: [PATCH] Merge branch 'refs/heads/2.7.1'
---
src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java b/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java
index 9de1ef2..6596f53 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java
@@ -532,16 +532,17 @@
String status = getText(itemDevice, "Status");
if (status != null) {
// ONLINE OFFLINE HIKVISION DS-7716N-E4 NVR鐨勫吋瀹规�у鐞�
- if (status.equals("ON") || status.equals("On") || status.equals("ONLINE") || status.equals("OK")) {
+ if (status.equalsIgnoreCase("ON") || status.equalsIgnoreCase("On") || status.equalsIgnoreCase("ONLINE") || status.equalsIgnoreCase("OK")) {
deviceChannel.setStatus(true);
}
- if (status.equals("OFF") || status.equals("Off") || status.equals("OFFLINE")) {
+ if (status.equalsIgnoreCase("OFF") || status.equalsIgnoreCase("Off") || status.equalsIgnoreCase("OFFLINE")) {
deviceChannel.setStatus(false);
}
}else {
deviceChannel.setStatus(true);
}
-
+// logger.info("鐘舵�佸瓧绗︿覆锛� {}", status);
+// logger.info("鐘舵�佺粨鏋滐細 {}", deviceChannel.isStatus());
// 缁忓害
String longitude = getText(itemDevice, "Longitude");
if (NumericUtil.isDouble(longitude)) {
@@ -568,14 +569,14 @@
String ptzTypeFromInfo = XmlUtil.getText(info, "PTZType");
if(!ObjectUtils.isEmpty(ptzTypeFromInfo)){
try {
- deviceChannel.setPTZType(Integer.parseInt(ptzTypeFromInfo));
+ deviceChannel.setPtzType(Integer.parseInt(ptzTypeFromInfo));
}catch (NumberFormatException e){
logger.warn("[xml瑙f瀽] 浠庨�氶亾鏁版嵁info涓幏鍙朠TZType澶辫触锛� {}", ptzTypeFromInfo);
}
}
} else {
try {
- deviceChannel.setPTZType(Integer.parseInt(ptzType));
+ deviceChannel.setPtzType(Integer.parseInt(ptzType));
}catch (NumberFormatException e){
logger.warn("[xml瑙f瀽] 浠庨�氶亾鏁版嵁涓幏鍙朠TZType澶辫触锛� {}", ptzType);
}
--
Gitblit v1.8.0