/// <summary> /// 关联前的检查 /// </summary> /// <param name="context"></param> private void CheckRelaTicket(HttpContext context) { var ticketId = context.Request.QueryString["ticket_id"]; var relaTicketId = context.Request.QueryString["rela_ticket_ids"]; bool isDiffCompany = false; bool isHasPro = false; bool isSginInd = false; // 是否关联事故 // if (!string.IsNullOrEmpty(ticketId) && !string.IsNullOrEmpty(relaTicketId)) var stDal = new sdk_task_dal(); var relList = stDal.GetTicketByIds(relaTicketId); var thisTicket = stDal.FindNoDeleteById(long.Parse(ticketId)); if (relList != null && relList.Count > 0 && thisTicket != null) { if (relList.Any(_ => _.account_id != thisTicket.account_id)) { isDiffCompany = true; } if (relList.Any(_ => _.problem_ticket_id != null)) { isHasPro = true; } if (relList.Any(_ => _.ticket_type_id == (int)DTO.DicEnum.TICKET_TYPE.PROBLEM && stDal.GetProCount(_.id) != 0)) { isSginInd = true; } } context.Response.Write(new EMT.Tools.Serialize().SerializeJson(new { diffAcc = isDiffCompany, isHasPro = isHasPro, isSginInd = isSginInd, })); }