public async Task <byte[]> GetAsync(BillingAgingListSearch option, CancellationToken token = default(CancellationToken)) { var companyTask = companyQueryProcessor.GetAsync(new CompanySearch { Id = option.CompanyId, }, token); var columnTask = columnNameSettingQueryProcessor.GetAsync(new ColumnNameSetting { CompanyId = option.CompanyId, TableName = nameof(Billing), ColumnName = nameof(Billing.Note1), }, token); var loadTask = billingAgingListQueryProcessor.GetDetailsAsync(option, token); await Task.WhenAll(companyTask, columnTask, loadTask); var items = loadTask.Result.ToList(); if (!items.Any()) { return(null); } var company = companyTask.Result.First(); var column = columnTask.Result.First(); var title = $"請求残高年齢表(明細){ DateTime.Today:yyyyMMdd}"; var report = new BillingAgingListDetailSectionReport(); report.SetBasicPageSetting(company.Code, company.Name); report.Name = title; report.SetData(items, option.Precision, column); report.Run(); return(report.Convert()); }
public async Task <IEnumerable <BillingAgingListDetail> > GetDetailsAsync(BillingAgingListSearch option, CancellationToken token = default(CancellationToken)) { option.InitializeYearMonthConditions(); return(await billingAgingListQueryProcessor.GetDetailsAsync(option, token)); }