2024-06-25 17:00:58 +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;
|
|
|
|
|
|
2024-06-25 17:11:30 +05:00
|
|
|
|
public class ProcessMapPlanOperationSwitchModeExportService : ProcessMapPlanExportService<ProcessMapPlanOperationSwitchModeDto>
|
2024-06-25 17:00:58 +05:00
|
|
|
|
{
|
2024-06-25 17:11:30 +05:00
|
|
|
|
public ProcessMapPlanOperationSwitchModeExportService(
|
|
|
|
|
IChangeLogRepository<ProcessMapPlanOperationSwitchModeDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
2024-06-25 17:00:58 +05:00
|
|
|
|
IWellService wellService)
|
|
|
|
|
: base(processMapPlanRepository, wellService)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2024-06-25 17:11:30 +05:00
|
|
|
|
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanOperationSwitchModeTemplate();
|
2024-06-25 17:00:58 +05:00
|
|
|
|
|
|
|
|
|
protected override async Task<string> BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token)
|
|
|
|
|
{
|
|
|
|
|
var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token);
|
|
|
|
|
|
2024-06-25 17:11:30 +05:00
|
|
|
|
return $"{caption}_РТК_План_выход_на_режим.xlsx";
|
2024-06-25 17:00:58 +05:00
|
|
|
|
}
|
|
|
|
|
}
|