forked from ddrilling/AsbCloudServer
28 lines
863 B
C#
28 lines
863 B
C#
|
using AsbCloudApp.Data;
|
|||
|
using AsbCloudApp.Data.Trajectory;
|
|||
|
using ClosedXML.Excel;
|
|||
|
|
|||
|
namespace AsbCloudInfrastructure.Services.Trajectory.Parser;
|
|||
|
|
|||
|
public class TrajectoryFactManualParserService : TrajectoryParserService<TrajectoryGeoFactDto>
|
|||
|
{
|
|||
|
protected override ValidationResultDto<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: Добавить валидацию модели
|
|||
|
|
|||
|
return new ValidationResultDto<TrajectoryGeoFactDto>
|
|||
|
{
|
|||
|
Item = trajectoryRow
|
|||
|
};
|
|||
|
}
|
|||
|
}
|