forked from ddrilling/AsbCloudServer
29 lines
905 B
C#
29 lines
905 B
C#
|
using AsbCloudApp.Data;
|
|||
|
using AsbCloudApp.Data.Trajectory;
|
|||
|
using ClosedXML.Excel;
|
|||
|
|
|||
|
namespace AsbCloudInfrastructure.Services.Trajectory.Parser;
|
|||
|
|
|||
|
public class TrajectoryPlanParserService : TrajectoryParserService<TrajectoryGeoPlanDto>
|
|||
|
{
|
|||
|
protected override ValidationResultDto<TrajectoryGeoPlanDto> ParseRow(IXLRow row)
|
|||
|
{
|
|||
|
var trajectoryRow = new TrajectoryGeoPlanDto
|
|||
|
{
|
|||
|
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>(),
|
|||
|
Radius = row.Cell(6).GetCellValue<double>(),
|
|||
|
Comment = row.Cell(7).GetCellValue<string?>()
|
|||
|
};
|
|||
|
|
|||
|
//TODO: Добавить валидацию модели
|
|||
|
|
|||
|
return new ValidationResultDto<TrajectoryGeoPlanDto>
|
|||
|
{
|
|||
|
Item = trajectoryRow
|
|||
|
};
|
|||
|
}
|
|||
|
}
|