diff --git a/Service/Plc/Client/PlcClient.cs b/Service/Plc/Client/PlcClient.cs index 9aed50e..0254ee2 100644 --- a/Service/Plc/Client/PlcClient.cs +++ b/Service/Plc/Client/PlcClient.cs @@ -221,7 +221,7 @@ public class PlcClient : ModbusTcpMaster { #region 没报警把已处理记录更新并删除实时报警 - var lstEquipAlarmRecord=EquipAlarmRecordRepository.Query(); + var lstEquipAlarmRecord=EquipAlarmRecordRepository.QueryListByClause(i=>i.EquipTypeCode==3); if (lstEquipAlarmRecord.Count > 0) { foreach (var VARIABLE in lstEquipAlarmRecord) @@ -239,7 +239,7 @@ public class PlcClient : ModbusTcpMaster EquipAlarmProcessRecordRepository.Insert(EquipAlarmProcessRecord); } } - EquipAlarmRecordRepository.Delete(i=>i.Id>0); + EquipAlarmRecordRepository.Delete(lstEquipAlarmRecord); #endregion