|
@@ -1400,7 +1400,7 @@ namespace IMCS.CCS.Service.Impl
|
|
|
if (Result.IsSuccess)
|
|
|
{
|
|
|
ResponseHeidhData responseData = JsonConvert.DeserializeObject<ResponseHeidhData>(Result.Message);
|
|
|
- if (!string.IsNullOrEmpty(responseData.errorsInfo) && !responseData.errorsInfo.Contains("无报警"))
|
|
|
+ if (!string.IsNullOrEmpty(responseData.errorsInfo) && !Result.Message.Contains("无报警"))
|
|
|
{
|
|
|
ProductionStatus productionStatus = new ProductionStatus();
|
|
|
productionStatus.id = alarmEquipment.Id.ToString();
|
|
@@ -1424,7 +1424,7 @@ namespace IMCS.CCS.Service.Impl
|
|
|
if (AlmMsg != null && AlmMsg.Count > 0)
|
|
|
{
|
|
|
var msgs = from o in AlmMsg select o.msg;
|
|
|
- if(msgs != null && !msgs.ToString().Contains("无报警"))
|
|
|
+ if(msgs != null && !Result.Message.Contains("无报警"))
|
|
|
{
|
|
|
ProductionStatus productionStatus = new ProductionStatus();
|
|
|
productionStatus.id = alarmEquipment.Id.ToString();
|
|
@@ -1437,7 +1437,7 @@ namespace IMCS.CCS.Service.Impl
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- else if(alarmEquipment != null)
|
|
|
+ else if(alarmEquipment != null && onlineDevice.ProtocolType == "S7_1500")
|
|
|
{
|
|
|
//缓存取PLCagvalue 值
|
|
|
List<CcsTagValue> tagValues = new List<CcsTagValue>();
|
|
@@ -1461,7 +1461,7 @@ namespace IMCS.CCS.Service.Impl
|
|
|
}
|
|
|
//获取机械手报警信息
|
|
|
CcsTagValue plcWarnValue = tagValues.Where(x => x.Ip == alarmEquipment.IP && x.Address == "DB200.34").FirstOrDefault();
|
|
|
- if (plcWarnValue != null)
|
|
|
+ if (plcWarnValue != null && plcWarnValue.TagValue != "0")
|
|
|
{
|
|
|
ToolDto ccsDictionary = new ToolDto();
|
|
|
ccsDictionary.Type = "PlcWarnInfo";
|
|
@@ -1470,12 +1470,13 @@ namespace IMCS.CCS.Service.Impl
|
|
|
if (dictList.Count > 0 && dictList[0] != null)
|
|
|
{
|
|
|
|
|
|
- ToolDto dictObj = dictList.Where(x => x.Code.Equals(plcWarnValue.TagValue) && x.state).FirstOrDefault();
|
|
|
+ ToolDto dictObj = dictList.Where(x => x.Code.ToString() == plcWarnValue.TagValue && x.state).FirstOrDefault();
|
|
|
if (null != dictObj && !string.IsNullOrEmpty(dictObj.DictValue.Trim()))
|
|
|
{
|
|
|
ProductionStatus productionStatus = new ProductionStatus();
|
|
|
productionStatus.id = alarmEquipment.Id.ToString();
|
|
|
- productionStatus.alertMsg = dictObj.DictValue.Trim();
|
|
|
+ productionStatus.alertMsg = dictObj.Description.Trim();
|
|
|
+ productionStatus.onlineStatus = "1";
|
|
|
productionStatus.alarmState = true; //报警
|
|
|
productionStatusList.Add(productionStatus);
|
|
|
}
|