public ActionResult StatusReport(StatusReportModel model) { ClientVisitSearchCriteria criteria = new ClientVisitSearchCriteria(); criteria.StatusIds = model.StatusIds; criteria.IsActualInVisitGroup = true; criteria.StatusDateFrom = model.StatusDateFrom; criteria.StetusDateTo = (model.StatusDateTo); //criteria.Lastname = "Иванов1"; //criteria.Firstname = "Иван"; //criteria.Secondname = "Иванович"; List <ClientVisitInfo> clientVisits = clientBusinessLogic.ClientVisit_Find( criteria, new List <SortCriteria <ClientVisitSortField> >(), new PageRequest() { PageNumber = 1, PageSize = int.MaxValue }).Data; var Statuses = ReferencesProvider.GetReferenceItems(Constants.ClientVisitStatusRef); List <string> listStatus = new List <string>(); listStatus = Statuses.Where(item => (model.StatusIds).Contains(item.Id)).Select(a => a.Name).ToList(); StatusReport printedForm = new StatusReport(clientVisits, model.StatusDateFrom, model.StatusDateTo, listStatus); return(File(printedForm.GetExcel(), System.Net.Mime.MediaTypeNames.Application.Octet, string.Format("Отчет по статусам {0}.xlsx", DateTime.Now.ToShortDateString()))); }
public ClientVisitUpdateResultModel(ClientVisit.UpdateResultData data) { ClientId = data.ClientId; UnifiedPolicyNumber = data.UnifiedPolicyNumber; Lastname = data.Lastname; Firstname = data.Firstname; Secondname = data.Secondname; Sex = data.Sex == 1 ? "Мужской" : "Женский"; Birthday = data.Birthday; Status = data.Status == null || data.Status.Id == 0 ? string.Empty : ReferencesProvider.GetReferenceItems(Constants.ClientVisitStatusRef).FirstOrDefault(item => item.Id == data.Status.Id).Name; IsSuccess = data.IsSuccess; Message = data.Message; }
public ClientVisitSaveDataModel SetFlagPrintReport() { //вызов печатных форм после удачного сохранения в статусе "Ожидание подачи" if (this.StatusId == ClientVisitStatuses.SubmitPending.Id) { this.FlagPrintReport = new bool[3] { false, false, false }; //если поле "временное свидетельство" не пустое, то вызывать печатную форму "Временное свидетельство" if (!string.IsNullOrEmpty(this.TemporaryPolicyNumber)) { FlagPrintReport[0] = true; } //если поле "Сценарий" имеет значение NB, CI, RI, CT, RT то вызываем «Заявление на смену СК» List <ReferenceItem> listScenario = ReferencesProvider.GetReferenceItems(Constants.ScenarioRef); foreach (var item in listScenario) { item.Code = item.Code.Trim(); } var tempId = listScenario.Where(a => a.Code == "NB" || a.Code == "CI" || a.Code == "RI" || a.Code == "CT" || a.Code == "RT" ).Select(b => b.Id).Where(c => c == this.ScenarioId).FirstOrDefault(); if (tempId != 0) { FlagPrintReport[1] = true; } //если поле "Сценарий" имеет значение DP, CR, CD, RI, RT то вызываем «Заявление на дубликат» tempId = listScenario.Where(a => a.Code == "DP" || a.Code == "CR" || a.Code == "CD" || a.Code == "RI" || a.Code == "RT" ).Select(b => b.Id).Where(c => c == this.ScenarioId).FirstOrDefault(); if (tempId != 0) { FlagPrintReport[2] = true; } } return(this); }
public ActionResult GetBaseReport(BaseReportModel model) { StatementSearchCriteria criteria = new StatementSearchCriteria(); criteria.CountView = null; criteria.CreateDateFrom = model.DateBaseReportFrom; criteria.CreateDateTo = model.DateBaseReportTo.AddDays(1); criteria.LastStatusDateFrom = model.BaseReportStatusDateFrom; if (model.BaseReportStatusDateTo.HasValue) { criteria.LastStatusDateTo = model.BaseReportStatusDateTo.Value.AddDays(1); } criteria.LastStatementStatusID = model.StatusID; List <Entities.Report.BaseReport> list = reportBusinessLogic.GetBaseReport(criteria); List <ReferenceItem> listSubjectInsurance = ReferencesProvider.GetReferenceItems(Constants.RefSubjectInsurance); List <ReferenceItem> listStatus = ReferencesProvider.GetReferenceItems(Constants.RefStatus); List <User> listUser = userBusinessLogic.Find(" "); PrintedForms.BaseReport printedForm = new PrintedForms.BaseReport(list, listSubjectInsurance, listStatus, listUser); return(File(printedForm.GetExcel(), System.Net.Mime.MediaTypeNames.Application.Octet, "Отчет по обращениям.xlsx")); }