diff --git a/BankYouBankrupt/BankYouBankruptBusinessLogic/BusinessLogics/ReportCashierLogic.cs b/BankYouBankrupt/BankYouBankruptBusinessLogic/BusinessLogics/ReportCashierLogic.cs index 7c86c2b..16d7839 100644 --- a/BankYouBankrupt/BankYouBankruptBusinessLogic/BusinessLogics/ReportCashierLogic.cs +++ b/BankYouBankrupt/BankYouBankruptBusinessLogic/BusinessLogics/ReportCashierLogic.cs @@ -71,6 +71,21 @@ namespace BankYouBankruptBusinessLogic.BusinessLogics .ToList(); } + //формирование списка выдаци наличных со счёта за период + public List? GetMoneyTransfers(ReportBindingModel model) + { + return _moneyTransferStorage.GetFilteredList(new MoneyTransferSearchModel { ClientId = model.ClientId, DateFrom = model.DateFrom, DateTo = model.DateTo }) + .Select(x => new ReportCashierViewModel + { + OperationId = x.Id, + DateComplite = x.DateOperation, + AccountPayeeNumber = x.AccountPayeeNumber, + AccountSenderNumber = x.AccountSenderNumber, + SumOperation = x.Sum + }) + .ToList(); + } + //формирование полного имени клиента для отчёта public string GetFullName(ReportBindingModel model) { @@ -91,7 +106,14 @@ namespace BankYouBankruptBusinessLogic.BusinessLogics //Сохранение заготовок с указаеним изделий в файл-Excel public void SaveAccountsToExcelFile(ReportBindingModel model) { - throw new NotImplementedException(); + _saveToExcel.CreateReport(new ExcelInfo + { + FileName = model.FileName, + + Title = "Заявки на счёт", + + Debiting = + }); } //Сохранение заказов в файл-Pdf diff --git a/BankYouBankrupt/BankYouBankruptContracts/BindingModels/ReportBindingModel.cs b/BankYouBankrupt/BankYouBankruptContracts/BindingModels/ReportBindingModel.cs index 6800288..57e07a6 100644 --- a/BankYouBankrupt/BankYouBankruptContracts/BindingModels/ReportBindingModel.cs +++ b/BankYouBankrupt/BankYouBankruptContracts/BindingModels/ReportBindingModel.cs @@ -13,6 +13,8 @@ namespace BankYouBankruptContracts.BindingModels public int? ClientId { get; set; } + public int? AccountId { get; set; } + public List? CardList { get; set; } public string? ClientFullName { get; set; } = string.Empty; diff --git a/BankYouBankrupt/BankYouBankruptRestAPI/Controllers/ReportController.cs b/BankYouBankrupt/BankYouBankruptRestAPI/Controllers/ReportController.cs index adda4d6..e1f641d 100644 --- a/BankYouBankrupt/BankYouBankruptRestAPI/Controllers/ReportController.cs +++ b/BankYouBankrupt/BankYouBankruptRestAPI/Controllers/ReportController.cs @@ -158,11 +158,11 @@ namespace BankYouBankruptRestAPI.Controllers { try { - _reportCashierLogic.SaveToExcelFile(new ReportBindingModel + _reportCashierLogic.SaveAccountsToExcelFile(new ReportBindingModel { FileName = "Отчёт по переводам.xls", - CardList = model.CardList - }, ExcelOperationEnum.Между_cчетами); + AccountId = model.AccountId + }); } catch (Exception ex) {