using AsbCloudApp.Data.Trajectory; using ClosedXML.Excel; namespace AsbCloudInfrastructure.Services.Trajectory.Import { public class TrajectoryPlanParserService : TrajectoryParserService { public override string templateFileName { get; } = "TrajectoryPlanTemplate.xlsx"; public override string usingTemplateFile { get; } = "AsbCloudInfrastructure.Services.Trajectory.Templates"; public override string sheetName { get; } = "Плановая траектория"; public override int headerRowsCount { get; } = 2; protected override TrajectoryGeoPlanDto ParseRow(IXLRow row) { var trajectoryRow = new TrajectoryGeoPlanDto { WellboreDepth = row.Cell(1).GetCellValue(), ZenithAngle = row.Cell(2).GetCellValue(), AzimuthGeo = row.Cell(3).GetCellValue(), AzimuthMagnetic = row.Cell(4).GetCellValue(), VerticalDepth = row.Cell(5).GetCellValue(), Radius = row.Cell(6).GetCellValue(), Comment = row.Cell(7).GetCellValue() }; //TODO: Добавить валидацию модели IValidatableObject return trajectoryRow; } } }