From a6aaad96f92dbf9c6ae2c81072509981cc97e6d7 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周三, 03 12月 2025 11:38:45 +0800
Subject: [PATCH] 消警处理
---
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/SystemValue.cs | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/SystemValue.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/SystemValue.cs
index c5aa581..3efe2fa 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/SystemValue.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/SystemValue.cs
@@ -47,7 +47,7 @@
public static void PLCServiceReconnect(PLCService plcService)
{
- if(plcService==null)
+ if (plcService == null)
{
return;
}
@@ -78,16 +78,17 @@
public static char PLCDBADDRESS_SEPARATE = '|';
- public static List<ThreadStatusMonitor> MainList=new List<ThreadStatusMonitor>();
+ public static List<ThreadStatusMonitor> MainList = new List<ThreadStatusMonitor>();
private static object lockMainList = new object();
public static async void UpdateMainList(ThreadStatusMonitor threadinfo)
{
- await Task.Run(() => {
+ await Task.Run(() =>
+ {
lock (lockMainList)
{
var info = MainList.Where(o => o.Threadcode == threadinfo.Threadcode).FirstOrDefault();
- if(info == null)
+ if (info == null)
{
MainList.Add(threadinfo);
}
@@ -96,7 +97,7 @@
DateTime time = DateTime.Now;
info.Remarks = threadinfo.Remarks;
info.Threadendtime = time;//姣忔閮芥洿鏂�
- info.Threadlastmodifytime = threadinfo.Threadlastmodifytime>DateTime.MinValue? threadinfo.Threadlastmodifytime: info.Threadlastmodifytime;//濡傛灉鏈変紶鍙傚垯鏇存柊
+ info.Threadlastmodifytime = threadinfo.Threadlastmodifytime > DateTime.MinValue ? threadinfo.Threadlastmodifytime : info.Threadlastmodifytime;//濡傛灉鏈変紶鍙傚垯鏇存柊
info.ThreadId = threadinfo.ThreadId;
info.ThreadFrequency = threadinfo.ThreadFrequency;
info.UpdatedTime = time;
@@ -143,10 +144,11 @@
/// <summary>
/// 鏄惁鍏佽鎵ц鐩戞帶OP05宸ュ簭鎵撶爜瀹屾垚鏍囪绾跨▼
/// </summary>
- public static bool isAllowRuning_OP0501
- {
- get { return _isAllowRuning_OP0501; }
- set {
+ public static bool isAllowRuning_OP0501
+ {
+ get { return _isAllowRuning_OP0501; }
+ set
+ {
lock (lockOP0501Runing)
{
_isAllowRuning_OP0501 = value;
@@ -454,7 +456,7 @@
/// <summary>
/// OP10宸ュ簭SPC鎺ㄥ嚭鏍囪鍊�
/// </summary>
- public static string value_OP1004 = string.Empty;
+ public static string value_OP1004 = "FALSE";//娉ㄦ剰锛氶粯璁ゆ槸FALSE 銆怑ditby shaocx,2024-09-05銆�
/// <summary>
/// OP10宸ュ簭瀹屾垚鏍囪鍊�
/// </summary>
@@ -1064,7 +1066,7 @@
}
}
}
-
+
private static object lockOP3501Alert = new object();
private static object lockOP3502Alert = new object();
private static object lockOP3503Alert = new object();
--
Gitblit v1.9.3