| | |
| | | #region 获取当前报警信息 |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取RGV当前报警信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<DeviceWarningInfo> GetRgvAlertDatas() |
| | | { |
| | | List<DeviceWarningInfo> db_warningList = new List<DeviceWarningInfo>(); |
| | | try |
| | | { |
| | | string _dbValue; |
| | | var isHasAlert = false; |
| | | IDictionary<string, string> rgvAlertDict = new Dictionary<string, string>(); |
| | | rgvAlertDict = WareSdaStruct.RgvAlertDict; |
| | | foreach (var item in rgvAlertDict) |
| | | { |
| | | _dbValue = item.Key; |
| | | isHasAlert = Convert.ToBoolean(this.plcService.ReadValuePoint(Rgv_CacheEntity.R_DBHeader_RGV_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; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取输送线当前报警信息 |