|
@@ -1439,17 +1439,19 @@ namespace IMCS.CCS.Service.Impl
|
|
|
{
|
|
|
//获取机械手报警信息
|
|
|
CcsTagValue plcWarnValue = tagValues.Where(x => x.Ip.Equals(changeEquipment.IP) && x.Address.Equals("DB200.34")).FirstOrDefault();
|
|
|
- ToolDto ccsDictionary = new ToolDto();
|
|
|
- ccsDictionary.Type = "PlcWarnInfo";
|
|
|
- ccsDictionary.state = true;
|
|
|
- ccsDictionary.Code = plcWarnValue.TagValue;
|
|
|
-
|
|
|
- List<ToolDto> dictList = await _dictionaryService.GetList(ccsDictionary);
|
|
|
- if (dictList.Count > 0 && dictList[0]!=null)
|
|
|
+ if (plcWarnValue != null)
|
|
|
{
|
|
|
- if (!string.IsNullOrEmpty(dictList[0].DictValue))
|
|
|
+ ToolDto ccsDictionary = new ToolDto();
|
|
|
+ ccsDictionary.Type = "PlcWarnInfo";
|
|
|
+
|
|
|
+ List<ToolDto> dictList = await _dictionaryService.GetList(ccsDictionary);
|
|
|
+ if (dictList.Count > 0 && dictList[0] != null)
|
|
|
{
|
|
|
- productionStatus.alertMsg = dictList[0].DictValue.Trim();
|
|
|
+ ToolDto dictObj = dictList.Where(x => x.Code.Equals(plcWarnValue.TagValue) && x.state).FirstOrDefault();
|
|
|
+ if (!string.IsNullOrEmpty(dictObj.DictValue.Trim()))
|
|
|
+ {
|
|
|
+ productionStatus.alertMsg = dictObj.DictValue.Trim();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|