|
|
@@ -66,30 +66,30 @@ namespace DataVAPI.Tool.IOT |
|
|
|
/// </summary> |
|
|
|
public class IOTDevSXModel |
|
|
|
{ |
|
|
|
/// <summary> |
|
|
|
/// 硬件状态 |
|
|
|
/// </summary> |
|
|
|
public string HardwareStatus { get; set; } |
|
|
|
/// <summary> |
|
|
|
/// 扩展属性 |
|
|
|
/// </summary> |
|
|
|
public string KZSX { get; set; } |
|
|
|
/// <summary> |
|
|
|
/// 基本属性 |
|
|
|
/// </summary> |
|
|
|
public string JBSX { get; set; } |
|
|
|
///// <summary> |
|
|
|
///// 硬件状态 |
|
|
|
///// </summary> |
|
|
|
//public string HardwareStatus { get; set; } |
|
|
|
///// <summary> |
|
|
|
///// 扩展属性 |
|
|
|
///// </summary> |
|
|
|
//public string KZSX { get; set; } |
|
|
|
///// <summary> |
|
|
|
///// 基本属性 |
|
|
|
///// </summary> |
|
|
|
//public string JBSX { get; set; } |
|
|
|
/// <summary> |
|
|
|
/// 节点状态 |
|
|
|
/// </summary> |
|
|
|
public string NodeStatus { get; set; } |
|
|
|
/// <summary> |
|
|
|
/// 运行日志 |
|
|
|
/// </summary> |
|
|
|
public string SZXX { get; set; } |
|
|
|
/// <summary> |
|
|
|
/// 运行告警 |
|
|
|
/// </summary> |
|
|
|
public string GJXX { get; set; } |
|
|
|
///// <summary> |
|
|
|
///// 运行日志 |
|
|
|
///// </summary> |
|
|
|
//public string SZXX { get; set; } |
|
|
|
///// <summary> |
|
|
|
///// 运行告警 |
|
|
|
///// </summary> |
|
|
|
//public string GJXX { get; set; } |
|
|
|
/// <summary> |
|
|
|
/// Model |
|
|
|
/// </summary> |
|
|
@@ -114,87 +114,87 @@ namespace DataVAPI.Tool.IOT |
|
|
|
return string.Empty; |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 设置基本属性 |
|
|
|
/// </summary> |
|
|
|
/// <param name="devSX"></param> |
|
|
|
/// <returns></returns> |
|
|
|
public void SetJBSX(DevSX devSX) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
JBSX = Tools.JsonConvertTools(devSX); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
JBSX = string.Empty; |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 设置基本属性状态 |
|
|
|
/// </summary> |
|
|
|
/// <param name="devSX"></param> |
|
|
|
/// <returns></returns> |
|
|
|
public void SetJBSXStatus(DevSXBase sXBase, bool Status) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
if (sXBase == null) return; |
|
|
|
DevSX dev = Tools.JsonToObjectTools<DevSX>(JBSX); |
|
|
|
dev.data?.ForEach(x => |
|
|
|
{ |
|
|
|
if (x.SXMC == sXBase.SXMC && x.SXLX == sXBase.SXLX) |
|
|
|
{ |
|
|
|
x.SXStatus = Status; |
|
|
|
} |
|
|
|
}); |
|
|
|
JBSX = Tools.JsonConvertTools(dev); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
JBSX = string.Empty; |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 设置扩展属性 |
|
|
|
/// </summary> |
|
|
|
/// <param name="devSX"></param> |
|
|
|
public void SetKZSX(DevSX devSX) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
KZSX = Tools.JsonConvertTools(devSX); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
KZSX = string.Empty; |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 设置扩展属性状态 |
|
|
|
/// </summary> |
|
|
|
/// <param name="devSX"></param> |
|
|
|
/// <returns></returns> |
|
|
|
public void SetKZSXStatus(DevSXBase sXBase, bool Status) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
if (sXBase == null) return; |
|
|
|
DevSX dev = Tools.JsonToObjectTools<DevSX>(KZSX); |
|
|
|
dev.data?.ForEach(x => |
|
|
|
{ |
|
|
|
if (x.SXMC == sXBase.SXMC && x.SXLX == sXBase.SXLX) |
|
|
|
{ |
|
|
|
x.SXStatus = Status; |
|
|
|
} |
|
|
|
}); |
|
|
|
KZSX = Tools.JsonConvertTools(dev); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
KZSX = string.Empty; |
|
|
|
} |
|
|
|
} |
|
|
|
///// <summary> |
|
|
|
///// 设置基本属性 |
|
|
|
///// </summary> |
|
|
|
///// <param name="devSX"></param> |
|
|
|
///// <returns></returns> |
|
|
|
//public void SetJBSX(DevSX devSX) |
|
|
|
//{ |
|
|
|
// try |
|
|
|
// { |
|
|
|
// JBSX = Tools.JsonConvertTools(devSX); |
|
|
|
// } |
|
|
|
// catch (Exception ex) |
|
|
|
// { |
|
|
|
// JBSX = string.Empty; |
|
|
|
// } |
|
|
|
//} |
|
|
|
///// <summary> |
|
|
|
///// 设置基本属性状态 |
|
|
|
///// </summary> |
|
|
|
///// <param name="devSX"></param> |
|
|
|
///// <returns></returns> |
|
|
|
//public void SetJBSXStatus(DevSXBase sXBase, bool Status) |
|
|
|
//{ |
|
|
|
// try |
|
|
|
// { |
|
|
|
// if (sXBase == null) return; |
|
|
|
// DevSX dev = Tools.JsonToObjectTools<DevSX>(JBSX); |
|
|
|
// dev.data?.ForEach(x => |
|
|
|
// { |
|
|
|
// if (x.SXMC == sXBase.SXMC && x.SXLX == sXBase.SXLX) |
|
|
|
// { |
|
|
|
// x.SXStatus = Status; |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// JBSX = Tools.JsonConvertTools(dev); |
|
|
|
// } |
|
|
|
// catch (Exception ex) |
|
|
|
// { |
|
|
|
// JBSX = string.Empty; |
|
|
|
// } |
|
|
|
//} |
|
|
|
///// <summary> |
|
|
|
///// 设置扩展属性 |
|
|
|
///// </summary> |
|
|
|
///// <param name="devSX"></param> |
|
|
|
//public void SetKZSX(DevSX devSX) |
|
|
|
//{ |
|
|
|
// try |
|
|
|
// { |
|
|
|
// KZSX = Tools.JsonConvertTools(devSX); |
|
|
|
// } |
|
|
|
// catch (Exception ex) |
|
|
|
// { |
|
|
|
// KZSX = string.Empty; |
|
|
|
// } |
|
|
|
//} |
|
|
|
///// <summary> |
|
|
|
///// 设置扩展属性状态 |
|
|
|
///// </summary> |
|
|
|
///// <param name="devSX"></param> |
|
|
|
///// <returns></returns> |
|
|
|
//public void SetKZSXStatus(DevSXBase sXBase, bool Status) |
|
|
|
//{ |
|
|
|
// try |
|
|
|
// { |
|
|
|
// if (sXBase == null) return; |
|
|
|
// DevSX dev = Tools.JsonToObjectTools<DevSX>(KZSX); |
|
|
|
// dev.data?.ForEach(x => |
|
|
|
// { |
|
|
|
// if (x.SXMC == sXBase.SXMC && x.SXLX == sXBase.SXLX) |
|
|
|
// { |
|
|
|
// x.SXStatus = Status; |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// KZSX = Tools.JsonConvertTools(dev); |
|
|
|
// } |
|
|
|
// catch (Exception ex) |
|
|
|
// { |
|
|
|
// KZSX = string.Empty; |
|
|
|
// } |
|
|
|
//} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 告警消息 |
|
|
|