protected virtual void SendSMS(AlarmHandleContext context, EBaseAlertReport report) { this.SendSMS(report.GetReceiveMobiles(), report.DownSendOrderCode, report.GetSMSParamters(), report.TenantCode, ConsumeType.SMSAlert, report.GetReceiveUsers()); }
protected virtual void SendWebSiteSMS(AlarmHandleContext context, EBaseAlertReport report) { try { var arrUser = report.GetReceiveUsers(); if (arrUser == null || arrUser.Length == 0) return; string title = report.GetAlertTitle(); string content = report.GetAlertMessage(); if (report.EnumAlertState == EnumAlertState.Resume) { title = report.GetResumeAlertTitle(); content = report.GetResumeAlertMessage(); } DateTime dt1 = DateTime.Now; EWebSMSInfo webSMS = GPSServiceFacade.Alarm.WebSMS.Add(arrUser, title, content, report.VehicleCode, report.EnumSMSInfoType); Logger.Info(string.Format("Static_WebSMSManager.Add()共花销{0}毫秒", (DateTime.Now - dt1).TotalMilliseconds), "Users", string.Join(",", arrUser)); if (report.EnumAlarmGrade == EnumAlarmGrade.Alarm) { DateTime dt2 = DateTime.Now; GPSServiceFacade.Alarm.AlarmInfo.Add(this.CreateAlarmEntity(context, report, webSMS)); Logger.Info(string.Format("Static_AlarmInfoManager.Add()共花销{0}毫秒", (DateTime.Now - dt2).TotalMilliseconds)); } Logger.Info(string.Format("WebSiteSMS [{0}],{1},{2}", title, content, report.ReceiveUserList)); } catch (Exception ex) { Logger.Error(ex); } }