GetDebitingReport

This commit is contained in:
shadowik 2023-04-04 19:27:13 +04:00
parent 31b4ab19bf
commit 1ed5bd512a

View File

@ -15,32 +15,18 @@ namespace BankYouBankruptBusinessLogic.BusinessLogics
{ {
public class ReportClientLogic : IReportClientLogic public class ReportClientLogic : IReportClientLogic
{ {
private readonly IAccountStorage _accauntStorage;
private readonly ICardStorage _cardStorage;
private readonly ICashierStorage _cashierStorage;
private readonly ICashWithdrawalStorage _cashWithdrawalStorage;
private readonly IClientStorage _clientStorage;
private readonly ICreditingStorage _creditingStorage; private readonly ICreditingStorage _creditingStorage;
private readonly IDebitingStorage _debitingStorage; private readonly IDebitingStorage _debitingStorage;
private readonly IMoneyTransferStorage _moneyTransferStorage;
private readonly AbstractSaveToExcelClient _saveToExcel; private readonly AbstractSaveToExcelClient _saveToExcel;
private readonly AbstractSaveToWordClient _saveToWord; private readonly AbstractSaveToWordClient _saveToWord;
private readonly AbstractSaveToPdfClient _saveToPdf; private readonly AbstractSaveToPdfClient _saveToPdf;
public ReportClientLogic(IAccountStorage accauntStorage, ICardStorage cardStorage, ICashierStorage cashierStorage, public ReportClientLogic(ICreditingStorage creditingStorage, IDebitingStorage debitingStorage,
ICashWithdrawalStorage cashWithdrawalStorage, IClientStorage clientStorage, ICreditingStorage creditingStorage,
IDebitingStorage debitingStorage, IMoneyTransferStorage moneyTransferStorage,
AbstractSaveToExcelClient saveToExcel, AbstractSaveToWordClient saveToWord, AbstractSaveToPdfClient saveToPdf) AbstractSaveToExcelClient saveToExcel, AbstractSaveToWordClient saveToWord, AbstractSaveToPdfClient saveToPdf)
{ {
_accauntStorage = accauntStorage;
_cardStorage = cardStorage;
_cashierStorage = cashierStorage;
_cashWithdrawalStorage = cashWithdrawalStorage;
_clientStorage = clientStorage;
_creditingStorage = creditingStorage; _creditingStorage = creditingStorage;
_debitingStorage = debitingStorage; _debitingStorage = debitingStorage;
_moneyTransferStorage = moneyTransferStorage;
_saveToExcel = saveToExcel; _saveToExcel = saveToExcel;
_saveToWord = saveToWord; _saveToWord = saveToWord;
@ -63,7 +49,16 @@ namespace BankYouBankruptBusinessLogic.BusinessLogics
public List<ReportClientViewModel>? GetDebiting(ReportBindingModel model) public List<ReportClientViewModel>? GetDebiting(ReportBindingModel model)
{ {
throw new NotImplementedException(); return _debitingStorage.GetFilteredList(new DebitingSearchModel
{
dateFrom = model.DateFrom,
dateTo = model.DateTo,
}).Select(x => new ReportClientViewModel
{
CardId = x.CardId,
SumOperation = x.Sum,
DateComplite = x.Date
}).ToList();
} }
public void SaveCreditingToExcelFile(ReportBindingModel model) public void SaveCreditingToExcelFile(ReportBindingModel model)