1
schangxiang@126.com
2024-12-09 2ef8eda1ea4ef302d86dff34d722da0cce950eff
SDA/iWareSda/Devices/1-Srm/SrmModel/SrmEntity.cs
@@ -624,40 +624,7 @@
        /// <summary>
        /// 获取当前报警信息
        /// </summary>
        /// <returns></returns>
        public List<DeviceWarningInfo> GetAlertDatas()
        {
            List<DeviceWarningInfo> db_warningList = new List<DeviceWarningInfo>();
            try
            {
                string _dbValue;
                var isHasAlert = false;
                IDictionary<string, string> srmAlertDict = new Dictionary<string, string>();
                srmAlertDict = WareSdaStruct.SrmAlertDict;
                foreach (var item in srmAlertDict)
                {
                    _dbValue = item.Key;
                    isHasAlert = Convert.ToBoolean(this.plcService.ReadValuePoint(Srm_CacheEntity.R_DBHeader_Alert, item.Key, typeof(bool)));
                    if (isHasAlert)
                    {
                        db_warningList.Add(new DeviceWarningInfo()
                        {
                            Address = item.Key,
                            Code = item.Key,
                            Context = item.Value.Trim()
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return db_warningList;
        }
        #endregion