|
|
|
@ -576,9 +576,29 @@ namespace SlnMesnac.Business
|
|
|
|
|
{
|
|
|
|
|
dmsRecordAlarmInfo.UpdateTime = DateTime.Now;
|
|
|
|
|
dmsRecordAlarmInfo.UpdateBy = "SlnMesnac";
|
|
|
|
|
sqlSugarClient.AsTenant().GetConnection("mes").Updateable(dmsRecordAlarmInfo).ExecuteCommand();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
DmsBaseAlarmRule dmsBaseAlarmRule = sqlSugarClient.AsTenant().GetConnection("mes").Queryable<DmsBaseAlarmRule>().First(x => x.AlarmRuleId == warnRuleId);
|
|
|
|
|
|
|
|
|
|
dmsRecordAlarmInfo = new DmsRecordAlarmInfo();
|
|
|
|
|
dmsRecordAlarmInfo.DeviceId = dmsRecordAlarmTime.DeviceId;
|
|
|
|
|
dmsRecordAlarmInfo.AlarmRuleId = warnRuleId;
|
|
|
|
|
dmsRecordAlarmInfo.AlarmBeginTime = DateTime.Now;
|
|
|
|
|
dmsRecordAlarmInfo.AlarmStatus = "0";
|
|
|
|
|
dmsRecordAlarmInfo.NoticeStatus = "0";
|
|
|
|
|
dmsRecordAlarmInfo.ContinueTime = dmsBaseAlarmRule.ContinueTime;
|
|
|
|
|
dmsRecordAlarmInfo.AlarmReason = dmsBaseAlarmRule.AlarmReason;
|
|
|
|
|
dmsRecordAlarmInfo.AlarmReason = dmsBaseAlarmRule.AlarmReason;
|
|
|
|
|
dmsRecordAlarmInfo.AlarmData = warnStatusEnum.ToString();
|
|
|
|
|
dmsRecordAlarmInfo.HandleSuggest = dmsBaseAlarmRule.HandleSuggest;
|
|
|
|
|
dmsRecordAlarmInfo.CreateBy = "SlnMesnac";
|
|
|
|
|
dmsRecordAlarmInfo.CreateTime = DateTime.Now;
|
|
|
|
|
sqlSugarClient.AsTenant().GetConnection("mes").Insertable(dmsRecordAlarmInfo).ExecuteCommand();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sqlSugarClient.AsTenant().GetConnection("mes").Updateable(dmsRecordAlarmTime).ExecuteCommand();
|
|
|
|
|
sqlSugarClient.AsTenant().GetConnection("mes").Updateable(dmsRecordAlarmInfo).ExecuteCommand();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|