DD.WellWorkover.Cloud/AsbCloudInfrastructure/Services/Trajectory/Parser/TrajectoryPlanParser.cs

34 lines
1.3 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using AsbCloudApp.Data.Trajectory;
using AsbCloudApp.Requests.ParserOptions;
using AsbCloudInfrastructure.Services.Parser;
using AsbCloudInfrastructure.Services.Parser.Data;
using ClosedXML.Excel;
namespace AsbCloudInfrastructure.Services.Trajectory.Parser;
public class TrajectoryPlanParser : ParserExcelService<TrajectoryGeoPlanDto, IParserOptionsRequest>
{
public TrajectoryPlanParser(IServiceProvider serviceProvider)
: base(serviceProvider)
{
}
protected override string SheetName => "Плановая траектория";
protected override int HeaderRowsCount => 2;
protected override string TemplateFileName => "TrajectoryPlanTemplate.xlsx";
protected override IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
{
{ nameof(TrajectoryGeoPlanDto.WellboreDepth), new Cell(1, XLDataType.Number) },
{ nameof(TrajectoryGeoPlanDto.ZenithAngle), new Cell(2, XLDataType.Number) },
{ nameof(TrajectoryGeoPlanDto.AzimuthGeo), new Cell(3, XLDataType.Number) },
{ nameof(TrajectoryGeoPlanDto.AzimuthMagnetic), new Cell(4, XLDataType.Number) },
{ nameof(TrajectoryGeoPlanDto.VerticalDepth), new Cell(5, XLDataType.Number) },
{ nameof(TrajectoryGeoPlanDto.Radius), new Cell(6, XLDataType.Number) },
{ nameof(TrajectoryGeoPlanDto.Comment), new Cell(7, XLDataType.Text) }
};
}