2024-07-04 11:02:45 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
2022-09-08 12:05:56 +05:00
|
|
|
|
using AsbCloudInfrastructure.Services.Email;
|
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
namespace AsbCloudInfrastructure;
|
2023-04-18 16:22:53 +05:00
|
|
|
|
|
2022-09-08 12:05:56 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
class WellFinalDocumentMailBodyFactory : BaseFactory
|
|
|
|
|
{
|
2022-09-08 12:05:56 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
public WellFinalDocumentMailBodyFactory(IConfiguration configuration)
|
|
|
|
|
: base(configuration)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
2022-09-08 12:05:56 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
public override string MakeSubject(WellDto well, string action)
|
|
|
|
|
=> $"{well.Deposit}, {well.Cluster}, {well.Caption}. Дело скважины. {action}";
|
2023-04-18 16:22:53 +05:00
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
|
public string MakeMailBodyForWellFinalDocument(WellDto well, string publisherName, string message)
|
|
|
|
|
{
|
|
|
|
|
var body = $"<html><body><h2>Здравствуйте, {publisherName}.</h2>" +
|
|
|
|
|
$"На портале {platformName} {message}," +
|
|
|
|
|
$" куст {well.Cluster}, месторождение {well.Deposit}." +
|
|
|
|
|
MakeSignatue() +
|
|
|
|
|
$"</body></html>";
|
|
|
|
|
return body;
|
|
|
|
|
}
|
2022-09-08 12:05:56 +05:00
|
|
|
|
}
|