schangxiang@126.com
2025-01-02 6f035bae8e9ce978c49941518de57585b77e8d7d
DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_BusinessLogical/BLL/SystemValue.cs
@@ -16,6 +16,11 @@
    /// </summary>
    public class SystemValue
    {
        /// <summary>
        /// OP20的当前检测面值
        /// </summary>
        public static string OP20_Side_Value = "";
        #region PLC链接
        public static object lockPlcService = new object();
@@ -42,7 +47,7 @@
        public static void PLCServiceReconnect(PLCService plcService)
        {
            if(plcService==null)
            if (plcService == null)
            {
                return;
            }
@@ -57,9 +62,9 @@
        public static string SystemStartGuid = string.Empty;
        /// <summary>
        /// 模式是否启动
        /// 模拟模式是否启动
        /// </summary>
        public static bool isStartedModel = false;
        public static bool isStartedImitateModel = false;
        /// <summary>
        /// 延迟线程执行的时间(毫秒)
@@ -73,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);
                    }
@@ -91,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;
@@ -138,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;
@@ -441,15 +448,15 @@
        /// <summary>
        /// OP10工序测试完成标记值
        /// </summary>
        public static string value_OP1002 = string.Empty;
        public static string value_OP1002 = "FALSE";//注意:默认是FALSE 【Editby shaocx,2024-09-05】
        /// <summary>
        /// OP10工序推出标记值
        /// </summary>
        public static string value_OP1003 = string.Empty;
        public static string value_OP1003 = "FALSE";//注意:默认是FALSE 【Editby shaocx,2024-09-05】
        /// <summary>
        /// OP10工序SPC推出标记值
        /// </summary>
        public static string value_OP1004 = string.Empty;
        public static string value_OP1004 = "FALSE";//注意:默认是FALSE 【Editby shaocx,2024-09-05】
        /// <summary>
        /// OP10工序完成标记值
        /// </summary>
@@ -1059,7 +1066,7 @@
                }
            }
        }
        private static object lockOP3501Alert = new object();
        private static object lockOP3502Alert = new object();
        private static object lockOP3503Alert = new object();