42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
using CarServiceContracts.BindingModels;
|
|
using CarServiceContracts.BusinessLogicsContracts;
|
|
using CarServiceContracts.StorageContracts;
|
|
using CarServiceContracts.ViewModels;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace CarServiceBusinessLogic.BusinessLogics
|
|
{
|
|
public class ReportLogic : IReportLogic
|
|
{
|
|
//private readonly ILogger _logger;
|
|
private readonly IWorkStorage _workStorage;
|
|
private readonly IWorkPaymentStorage _workPaymentStorage;
|
|
public ReportLogic(/*ILogger logger,*/ IWorkStorage workStorage, IWorkPaymentStorage workPaymentStorage)
|
|
{
|
|
//_logger = logger;
|
|
_workStorage = workStorage;
|
|
_workPaymentStorage = workPaymentStorage;
|
|
}
|
|
public List<ReportWorkWithRequestsViewModel> GetRequestsByWorks(ReportBindingModel model)
|
|
{
|
|
return _workStorage.GetWorksWithRequest(new() { SelectedWorksIds = model.SelectedWorks });
|
|
}
|
|
public List<ReportWorksWithPaymentsViewModel> GetPayments(ReportBindingModel model)
|
|
{
|
|
return _workPaymentStorage.GetPaymentsByWorks(new() {DateFrom = model.DateFrom, DateTo = model.DateTo });
|
|
}
|
|
public void SaveComponentsToWordFile(ReportBindingModel model)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
public void SaveManufactureComponentToExcelFile(ReportBindingModel model)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
public void SaveOrdersToPdfFile(ReportBindingModel model)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|