2024-03-14 10:30:25 +05:00
|
|
|
|
using AsbCloudApp.Data.ProcessMaps;
|
|
|
|
|
using AsbCloudApp.Repositories;
|
|
|
|
|
using AsbCloudApp.Requests;
|
2024-03-14 15:18:02 +05:00
|
|
|
|
using AsbCloudApp.Requests.ExportOptions;
|
2024-03-14 10:30:25 +05:00
|
|
|
|
using AsbCloudApp.Services;
|
|
|
|
|
using AsbCloudInfrastructure.Services.ExcelServices.Templates;
|
|
|
|
|
using AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
|
2024-06-21 17:22:29 +05:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2024-03-14 10:30:25 +05:00
|
|
|
|
|
|
|
|
|
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
|
|
|
|
|
|
2024-06-21 09:53:45 +05:00
|
|
|
|
public class ProcessMapPlanSlideExportService : ProcessMapPlanExportService<ProcessMapPlanSlideDto>
|
2024-03-14 10:30:25 +05:00
|
|
|
|
{
|
2024-06-21 17:22:29 +05:00
|
|
|
|
public ProcessMapPlanSlideExportService(
|
|
|
|
|
IChangeLogRepository<ProcessMapPlanSlideDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
|
|
|
|
IWellService wellService)
|
|
|
|
|
: base(processMapPlanRepository, wellService)
|
|
|
|
|
{
|
|
|
|
|
}
|
2024-03-14 10:30:25 +05:00
|
|
|
|
|
2024-06-21 17:22:29 +05:00
|
|
|
|
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanSlideTemplate();
|
2024-03-14 10:30:25 +05:00
|
|
|
|
|
2024-06-21 17:22:29 +05:00
|
|
|
|
protected override async Task<string> BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token)
|
|
|
|
|
{
|
|
|
|
|
var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token);
|
2024-03-14 11:05:58 +05:00
|
|
|
|
|
2024-06-21 17:22:29 +05:00
|
|
|
|
return $"{caption}_РТК_План_бурение_слайд.xlsx";
|
|
|
|
|
}
|
2024-03-14 10:30:25 +05:00
|
|
|
|
}
|