2023-11-30 09:40:51 +05:00
|
|
|
|
using AsbCloudApp.Data.Trajectory;
|
|
|
|
|
using ClosedXML.Excel;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudInfrastructure.Services.Trajectory.Import
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public class TrajectoryFactManualParserService : TrajectoryParserService<TrajectoryGeoFactDto>
|
|
|
|
|
{
|
|
|
|
|
public override string templateFileName { get; } = "TrajectoryFactManualTemplate.xlsx";
|
|
|
|
|
public override string usingTemplateFile { get; } = "AsbCloudInfrastructure.Services.Trajectory.Templates";
|
2023-11-30 15:08:58 +05:00
|
|
|
|
public override string sheetName { get; } = "Фактическая траектория";
|
2023-11-30 09:40:51 +05:00
|
|
|
|
public override int headerRowsCount { get; } = 2;
|
|
|
|
|
|
|
|
|
|
protected override TrajectoryGeoFactDto ParseRow(IXLRow row)
|
|
|
|
|
{
|
|
|
|
|
var trajectoryRow = new TrajectoryGeoFactDto
|
|
|
|
|
{
|
|
|
|
|
WellboreDepth = row.Cell(1).GetCellValue<double>(),
|
|
|
|
|
ZenithAngle = row.Cell(2).GetCellValue<double>(),
|
|
|
|
|
AzimuthGeo = row.Cell(3).GetCellValue<double>(),
|
|
|
|
|
AzimuthMagnetic = row.Cell(4).GetCellValue<double>(),
|
|
|
|
|
VerticalDepth = row.Cell(5).GetCellValue<double>(),
|
|
|
|
|
Comment = row.Cell(6).GetCellValue<string?>()
|
|
|
|
|
};
|
|
|
|
|
//TODO: Добавить валидацию модели IValidatableObject
|
|
|
|
|
return trajectoryRow;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|