From c34f8f93417c5a0125f9c55ba3d347411995ac13 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周二, 10 9月 2024 15:05:32 +0800 Subject: [PATCH] 1 --- DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/SystemValue.cs | 32 +++++++++++++++++--------------- 1 files changed, 17 insertions(+), 15 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 57528cd..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; } @@ -62,9 +62,9 @@ public static string SystemStartGuid = string.Empty; /// <summary> - /// 妯″紡鏄惁鍚姩 + /// 妯℃嫙妯″紡鏄惁鍚姩 /// </summary> - public static bool isStartedModel = false; + public static bool isStartedImitateModel = false; /// <summary> /// 寤惰繜绾跨▼鎵ц鐨勬椂闂达紙姣锛� @@ -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; @@ -446,15 +448,15 @@ /// <summary> /// OP10宸ュ簭娴嬭瘯瀹屾垚鏍囪鍊� /// </summary> - public static string value_OP1002 = string.Empty; + public static string value_OP1002 = "FALSE";//娉ㄦ剰锛氶粯璁ゆ槸FALSE 銆怑ditby shaocx,2024-09-05銆� /// <summary> /// OP10宸ュ簭鎺ㄥ嚭鏍囪鍊� /// </summary> - public static string value_OP1003 = string.Empty; + public static string value_OP1003 = "FALSE";//娉ㄦ剰锛氶粯璁ゆ槸FALSE 銆怑ditby shaocx,2024-09-05銆� /// <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