2024-03-14 10:30:25 +05:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
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;
|
2024-06-04 16:55:44 +05:00
|
|
|
|
using AsbCloudDb.Model.ProcessMaps;
|
2024-03-14 10:30:25 +05:00
|
|
|
|
using AsbCloudInfrastructure.Services.ExcelServices.Templates;
|
|
|
|
|
using AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
|
|
|
|
|
|
2024-06-04 16:55:44 +05:00
|
|
|
|
public class ProcessMapPlanReamExportService : ProcessMapPlanExportService<ProcessMapPlanReam, ProcessMapPlanReamDto>
|
2024-03-14 10:30:25 +05:00
|
|
|
|
{
|
|
|
|
|
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanReamTemplate();
|
|
|
|
|
|
|
|
|
|
public ProcessMapPlanReamExportService(
|
2024-06-04 16:55:44 +05:00
|
|
|
|
IChangeLogRepository<ProcessMapPlanReam, ProcessMapPlanReamDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
2024-03-14 10:30:25 +05:00
|
|
|
|
IWellService wellService)
|
|
|
|
|
: base(processMapPlanRepository, wellService)
|
|
|
|
|
{
|
|
|
|
|
}
|
2024-03-14 15:18:02 +05:00
|
|
|
|
|
|
|
|
|
protected override async Task<string> BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token)
|
2024-03-14 10:30:25 +05:00
|
|
|
|
{
|
2024-03-14 15:18:02 +05:00
|
|
|
|
var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token);
|
2024-03-14 10:30:25 +05:00
|
|
|
|
|
|
|
|
|
return $"{caption}_РТК_План_проработка.xlsx";
|
|
|
|
|
}
|
|
|
|
|
}
|