Compare commits
5 Commits
33c5e2928c
...
4ded692e1e
Author | SHA1 | Date | |
---|---|---|---|
4ded692e1e | |||
ee36069742 | |||
e2778811b4 | |||
fb498c94ba | |||
e1f8f9042d |
@ -13,13 +13,14 @@ namespace ServiceStationRestApi.Controllers
|
||||
private readonly IExecutorReportLogic _executorReportLogic;
|
||||
private readonly IGuarantorReportLogic _guarantorReportLogic;
|
||||
private readonly AbstractMailWorker _mailWorker;
|
||||
private readonly IGuarantorReportLogic _guarantorReportLogic;
|
||||
|
||||
public ReportController(ILogger<ReportController> logger, IExecutorReportLogic executorReportLogic, IGuarantorReportLogic guarantorReportLogic)
|
||||
public ReportController(ILogger<ReportController> logger, IExecutorReportLogic executorReportLogic, AbstractMailWorker abstractMailWorker, IGuarantorLogic guarantorReportLogic)
|
||||
{
|
||||
_logger = logger;
|
||||
_executorReportLogic = executorReportLogic;
|
||||
_mailWorker = abstractMailWorker;
|
||||
_guarantorReportLogic = guarantorReportLogic;
|
||||
_mailWorker = mailWorker;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
@ -67,6 +68,19 @@ namespace ServiceStationRestApi.Controllers
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void SendPdfToMail(MailSendInfoBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_mailWorker.MailSendAsync(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка отправки письма");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public void CreateGuarantorReportToWord(ReportGuarantorBindingModel model)
|
||||
@ -115,18 +129,6 @@ namespace ServiceStationRestApi.Controllers
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public void SendPdfToMail(MailSendInfoBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_mailWorker.MailSendAsync(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка отправки письма");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user