DD.WellWorkover.Cloud/AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanFunctionsDamperExportService.cs

30 lines
1.2 KiB
C#
Raw Normal View History

2024-06-26 13:01:06 +05:00
using AsbCloudApp.Data.ProcessMaps;
using AsbCloudApp.Repositories;
using AsbCloudApp.Requests;
using AsbCloudApp.Requests.ExportOptions;
using AsbCloudApp.Services;
using AsbCloudInfrastructure.Services.ExcelServices.Templates;
using AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
using System.Threading;
using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
public class ProcessMapPlanFunctionsDamperExportService : ProcessMapPlanExportService<ProcessMapPlanFunctionsDamperDto>
{
public ProcessMapPlanFunctionsDamperExportService(
IChangeLogRepository<ProcessMapPlanFunctionsDamperDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
IWellService wellService)
: base(processMapPlanRepository, wellService)
{
}
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanFunctionsDamperTemplate();
protected override async Task<string> BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token)
{
var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token);
return $"{caption}_РТК_План_демпфер.xlsx";
}
}