/// <summary> /// 返回客户的提醒信息 /// </summary> private void GetAccAlert(HttpContext context) { var accountId = context.Request.QueryString["account_id"]; if (!string.IsNullOrEmpty(accountId)) { var alertList = new crm_account_alert_dal().FindByAccount(long.Parse(accountId)); if (alertList != null && alertList.Count > 0) { var accAlert = alertList.FirstOrDefault(_ => _.alert_type_id == (int)DTO.DicEnum.ACCOUNT_ALERT_TYPE.COMPANY_DETAIL_ALERT); var ticketAlert = alertList.FirstOrDefault(_ => _.alert_type_id == (int)DTO.DicEnum.ACCOUNT_ALERT_TYPE.NEW_TICKET_ALERT); var ticketDetail = alertList.FirstOrDefault(_ => _.alert_type_id == (int)DTO.DicEnum.ACCOUNT_ALERT_TYPE.TICKET_DETAIL_ALERT); if (accAlert != null || ticketAlert != null || ticketDetail != null) { context.Response.Write(new Tools.Serialize().SerializeJson(new { hasAccAlert = accAlert != null, accAlert = accAlert == null?"":accAlert.alert_text, hasTicketAlert = ticketAlert != null, ticketAlert = ticketAlert == null ? "" : ticketAlert.alert_text, hasTicketDetail = ticketDetail != null, ticketDetail = ticketDetail == null ? "" : ticketDetail.alert_text, })); } } } }
/// <summary> /// 返回工单的提醒信息---(返回客户告警,外包消息,变更管理消息) /// </summary> private void GetTicketAlert(HttpContext context) { var ticket_id = context.Request.QueryString["ticket_id"]; if (!string.IsNullOrEmpty(ticket_id)) { var thisTicket = new sdk_task_dal().FindNoDeleteById(long.Parse(ticket_id)); if (thisTicket != null) { string accountAlert = ""; // 客户的新建 提醒信息 string outMasg = ""; // 外包消息 string changeMsg = ""; // 变更管理消息 var tickCreateAlert = new crm_account_alert_dal().FindAlert(thisTicket.account_id, DTO.DicEnum.ACCOUNT_ALERT_TYPE.NEW_TICKET_ALERT); if (tickCreateAlert != null) { accountAlert += tickCreateAlert.alert_text + " "; } var tickDetailAlert = new crm_account_alert_dal().FindAlert(thisTicket.account_id, DTO.DicEnum.ACCOUNT_ALERT_TYPE.TICKET_DETAIL_ALERT); if (tickDetailAlert != null) { accountAlert += tickDetailAlert.alert_text + " "; } context.Response.Write(new EMT.Tools.Serialize().SerializeJson(new { accountAlert = accountAlert, outMasg = outMasg, changeMsg = changeMsg })); } } }