forked from ddrilling/AsbCloudServer
Reviewed-on: http://test.digitaldrilling.ru:8080/DDrilling/AsbCloudServer/pulls/101
This commit is contained in:
commit
27a478dbea
@ -33,16 +33,6 @@ public abstract class TrajectoryGeoDto
|
||||
/// Глубина вертикальная
|
||||
/// </summary>
|
||||
public double? VerticalDepth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Север отн- но устья
|
||||
/// </summary>
|
||||
public double? NorthOrifice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Восток отн- но устья
|
||||
/// </summary>
|
||||
public double? EastOrifice { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -20,42 +20,7 @@ namespace AsbCloudApp.Data
|
||||
/// ИД пользователя
|
||||
/// </summary>
|
||||
public int IdUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Абсолютная отметка
|
||||
/// </summary>
|
||||
public double AbsoluteMark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Восток картографический
|
||||
/// </summary>
|
||||
public double EastCartographic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Север картографический
|
||||
/// </summary>
|
||||
public double NorthCartographic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Пространственная интенсивность
|
||||
/// </summary>
|
||||
public double SpatialIntensity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Интенсивность по углу
|
||||
/// </summary>
|
||||
public double AngleIntensity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Интенсивность по азимуту
|
||||
/// </summary>
|
||||
public double AzimuthIntensity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Смещение от устья
|
||||
/// </summary>
|
||||
public double OrificeOffset { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Радиус цели
|
||||
/// </summary>
|
||||
|
8346
AsbCloudDb/Migrations/20230821110455_Update_PlannedTrajectory.Designer.cs
generated
Normal file
8346
AsbCloudDb/Migrations/20230821110455_Update_PlannedTrajectory.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
123
AsbCloudDb/Migrations/20230821110455_Update_PlannedTrajectory.cs
Normal file
123
AsbCloudDb/Migrations/20230821110455_Update_PlannedTrajectory.cs
Normal file
@ -0,0 +1,123 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class Update_PlannedTrajectory : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "absolute_mark",
|
||||
table: "t_planned_trajectory");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "angle_intensity",
|
||||
table: "t_planned_trajectory");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "azimuth_intensity",
|
||||
table: "t_planned_trajectory");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "east_cartographic",
|
||||
table: "t_planned_trajectory");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "east_orifice",
|
||||
table: "t_planned_trajectory");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "north_cartographic",
|
||||
table: "t_planned_trajectory");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "north_orifice",
|
||||
table: "t_planned_trajectory");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "orifice_offset",
|
||||
table: "t_planned_trajectory");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "spatial_intensity",
|
||||
table: "t_planned_trajectory");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "absolute_mark",
|
||||
table: "t_planned_trajectory",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
defaultValue: 0.0,
|
||||
comment: "Абсолютная отметка");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "angle_intensity",
|
||||
table: "t_planned_trajectory",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
defaultValue: 0.0,
|
||||
comment: "Интенсивность по углу");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "azimuth_intensity",
|
||||
table: "t_planned_trajectory",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
defaultValue: 0.0,
|
||||
comment: "Интенсивность по азимуту");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "east_cartographic",
|
||||
table: "t_planned_trajectory",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
defaultValue: 0.0,
|
||||
comment: "Восток картографический");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "east_orifice",
|
||||
table: "t_planned_trajectory",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
defaultValue: 0.0,
|
||||
comment: "Восток отн-но устья");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "north_cartographic",
|
||||
table: "t_planned_trajectory",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
defaultValue: 0.0,
|
||||
comment: "Север картографический");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "north_orifice",
|
||||
table: "t_planned_trajectory",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
defaultValue: 0.0,
|
||||
comment: "Север отн-но устья");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "orifice_offset",
|
||||
table: "t_planned_trajectory",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
defaultValue: 0.0,
|
||||
comment: "Смещение от устья");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "spatial_intensity",
|
||||
table: "t_planned_trajectory",
|
||||
type: "double precision",
|
||||
nullable: false,
|
||||
defaultValue: 0.0,
|
||||
comment: "Пространственная интенсивность");
|
||||
}
|
||||
}
|
||||
}
|
@ -2187,26 +2187,11 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<double>("AbsoluteMark")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("absolute_mark")
|
||||
.HasComment("Абсолютная отметка");
|
||||
|
||||
b.Property<double>("AngleIntensity")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("angle_intensity")
|
||||
.HasComment("Интенсивность по углу");
|
||||
|
||||
b.Property<double>("AzimuthGeo")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("azimuth_geo")
|
||||
.HasComment("Азимут Географ.");
|
||||
|
||||
b.Property<double>("AzimuthIntensity")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("azimuth_intensity")
|
||||
.HasComment("Интенсивность по азимуту");
|
||||
|
||||
b.Property<double>("AzimuthMagnetic")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("azimuth_magnetic")
|
||||
@ -2217,16 +2202,6 @@ namespace AsbCloudDb.Migrations
|
||||
.HasColumnName("comment")
|
||||
.HasComment("Комментарии");
|
||||
|
||||
b.Property<double>("EastCartographic")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("east_cartographic")
|
||||
.HasComment("Восток картографический");
|
||||
|
||||
b.Property<double>("EastOrifice")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("east_orifice")
|
||||
.HasComment("Восток отн-но устья");
|
||||
|
||||
b.Property<int>("IdUser")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("id_user")
|
||||
@ -2237,31 +2212,11 @@ namespace AsbCloudDb.Migrations
|
||||
.HasColumnName("id_well")
|
||||
.HasComment("ID скважины");
|
||||
|
||||
b.Property<double>("NorthCartographic")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("north_cartographic")
|
||||
.HasComment("Север картографический");
|
||||
|
||||
b.Property<double>("NorthOrifice")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("north_orifice")
|
||||
.HasComment("Север отн-но устья");
|
||||
|
||||
b.Property<double>("OrificeOffset")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("orifice_offset")
|
||||
.HasComment("Смещение от устья");
|
||||
|
||||
b.Property<double?>("Radius")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("radius")
|
||||
.HasComment("Радиус цели");
|
||||
|
||||
b.Property<double>("SpatialIntensity")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("spatial_intensity")
|
||||
.HasComment("Пространственная интенсивность");
|
||||
|
||||
b.Property<DateTimeOffset>("UpdateDate")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("update_date")
|
||||
|
@ -35,33 +35,6 @@ namespace AsbCloudDb.Model
|
||||
[Column("vertical_depth"), Comment("Глубина вертикальная")]
|
||||
public double VerticalDepth { get; set; }
|
||||
|
||||
[Column("absolute_mark"), Comment("Абсолютная отметка")]
|
||||
public double AbsoluteMark { get; set; }
|
||||
|
||||
[Column("north_orifice"), Comment("Север отн-но устья")]
|
||||
public double NorthOrifice { get; set; }
|
||||
|
||||
[Column("east_orifice"), Comment("Восток отн-но устья")]
|
||||
public double EastOrifice { get; set; }
|
||||
|
||||
[Column("east_cartographic"), Comment("Восток картографический")]
|
||||
public double EastCartographic { get; set; }
|
||||
|
||||
[Column("north_cartographic"), Comment("Север картографический")]
|
||||
public double NorthCartographic { get; set; }
|
||||
|
||||
[Column("spatial_intensity"), Comment("Пространственная интенсивность")]
|
||||
public double SpatialIntensity { get; set; }
|
||||
|
||||
[Column("angle_intensity"), Comment("Интенсивность по углу")]
|
||||
public double AngleIntensity { get; set; }
|
||||
|
||||
[Column("azimuth_intensity"), Comment("Интенсивность по азимуту")]
|
||||
public double AzimuthIntensity { get; set; }
|
||||
|
||||
[Column("orifice_offset"), Comment("Смещение от устья")]
|
||||
public double OrificeOffset { get; set; }
|
||||
|
||||
[Column("comment"), Comment("Комментарии")]
|
||||
public string? Comment { get; set; }
|
||||
|
||||
|
@ -41,8 +41,6 @@ namespace AsbCloudInfrastructure.Repository
|
||||
IdWell = idWell,
|
||||
AzimuthMagnetic = coord.Svymtf,
|
||||
VerticalDepth = coord.Deptsvyv,
|
||||
NorthOrifice = coord.Svyns,
|
||||
EastOrifice = coord.Svyew,
|
||||
WellboreDepth = coord.Deptsvym!.Value,
|
||||
ZenithAngle = coord.Svyinc!.Value,
|
||||
AzimuthGeo = coord.Svyazc!.Value
|
||||
|
@ -30,16 +30,8 @@ namespace AsbCloudInfrastructure.Services.Trajectory
|
||||
private const int ColumnAzimuthGeo = 3;
|
||||
private const int ColumnAzimuthMagnetic = 4;
|
||||
private const int ColumnVerticalDepth = 5;
|
||||
private const int ColumnAbsoluteMark = 6;
|
||||
private const int ColumnNorthOrifice = 7;
|
||||
private const int ColumnEastOrifice = 8;
|
||||
private const int ColumnEastCartographic = 9;
|
||||
private const int ColumnNorthCartographic = 10;
|
||||
private const int ColumnSpatialIntensity = 11;
|
||||
private const int ColumnAngleIntensity = 12;
|
||||
private const int ColumnAzimuthIntensity = 13;
|
||||
private const int ColumnOrificeOffset = 14;
|
||||
private const int ColumnComment = 15;
|
||||
private const int ColumnRadius = 6;
|
||||
private const int ColumnComment = 7;
|
||||
|
||||
public PlannedTrajectoryImportService(IWellService wellService, ITrajectoryPlanRepository plannedTrajectoryService)
|
||||
{
|
||||
@ -107,15 +99,7 @@ namespace AsbCloudInfrastructure.Services.Trajectory
|
||||
row.Cell(ColumnAzimuthGeo).Value = trajectory.AzimuthGeo;
|
||||
row.Cell(ColumnAzimuthMagnetic).Value = trajectory.AzimuthMagnetic;
|
||||
row.Cell(ColumnVerticalDepth).Value = trajectory.VerticalDepth;
|
||||
row.Cell(ColumnAbsoluteMark).Value = trajectory.AbsoluteMark;
|
||||
row.Cell(ColumnNorthOrifice).Value = trajectory.NorthOrifice;
|
||||
row.Cell(ColumnEastOrifice).Value = trajectory.EastOrifice;
|
||||
row.Cell(ColumnEastCartographic).Value = trajectory.EastCartographic;
|
||||
row.Cell(ColumnNorthCartographic).Value = trajectory.NorthCartographic;
|
||||
row.Cell(ColumnSpatialIntensity).Value = trajectory.SpatialIntensity;
|
||||
row.Cell(ColumnAngleIntensity).Value = trajectory.AngleIntensity;
|
||||
row.Cell(ColumnAzimuthIntensity).Value = trajectory.AzimuthIntensity;
|
||||
row.Cell(ColumnOrificeOffset).Value = trajectory.OrificeOffset;
|
||||
row.Cell(ColumnRadius).Value = trajectory.Radius;
|
||||
row.Cell(ColumnComment).Value = trajectory.Comment;
|
||||
}
|
||||
|
||||
@ -158,7 +142,7 @@ namespace AsbCloudInfrastructure.Services.Trajectory
|
||||
|
||||
private IEnumerable<TrajectoryGeoPlanDto> ParseSheet(IXLWorksheet sheet)
|
||||
{
|
||||
if (sheet.RangeUsed().RangeAddress.LastAddress.ColumnNumber < 15)
|
||||
if (sheet.RangeUsed().RangeAddress.LastAddress.ColumnNumber < 7)
|
||||
throw new FileFormatException($"Лист {sheet.Name} содержит меньшее количество столбцов.");
|
||||
|
||||
var count = sheet.RowsUsed().Count() - headerRowsCount;
|
||||
@ -194,15 +178,7 @@ namespace AsbCloudInfrastructure.Services.Trajectory
|
||||
var _azimuthGeo = row.Cell(ColumnAzimuthGeo).Value;
|
||||
var _azimuthMagnetic = row.Cell(ColumnAzimuthMagnetic).Value;
|
||||
var _verticalDepth = row.Cell(ColumnVerticalDepth).Value;
|
||||
var _absoluteMark = row.Cell(ColumnAbsoluteMark).Value;
|
||||
var _northOrifice = row.Cell(ColumnNorthOrifice).Value;
|
||||
var _eastOrifice = row.Cell(ColumnEastOrifice).Value;
|
||||
var _eastCartographic = row.Cell(ColumnEastCartographic).Value;
|
||||
var _northCartographic = row.Cell(ColumnNorthCartographic).Value;
|
||||
var _spatialIntensity = row.Cell(ColumnSpatialIntensity).Value;
|
||||
var _angleIntensity = row.Cell(ColumnAngleIntensity).Value;
|
||||
var _azimuthIntensity = row.Cell(ColumnAzimuthIntensity).Value;
|
||||
var _orificeOffset = row.Cell(ColumnOrificeOffset).Value;
|
||||
var _radius = row.Cell(ColumnRadius).Value;
|
||||
var _comment = row.Cell(ColumnComment).Value;
|
||||
|
||||
var trajectoryRow = new TrajectoryGeoPlanDto();
|
||||
@ -219,15 +195,8 @@ namespace AsbCloudInfrastructure.Services.Trajectory
|
||||
trajectoryRow.AzimuthGeo = getDoubleValue(_azimuthGeo, "Азимут географический", row);
|
||||
trajectoryRow.AzimuthMagnetic = getDoubleValue(_azimuthMagnetic, "Азимут магнитный", row);
|
||||
trajectoryRow.VerticalDepth = getDoubleValue(_verticalDepth, "Глубина вертикальная", row);
|
||||
trajectoryRow.AbsoluteMark = getDoubleValue(_absoluteMark, "Абсолютная отметка", row);
|
||||
trajectoryRow.NorthOrifice = getDoubleValue(_northOrifice, "Север относительно устья", row);
|
||||
trajectoryRow.EastOrifice = getDoubleValue(_eastOrifice, "Восток относительно устья", row);
|
||||
trajectoryRow.EastCartographic = getDoubleValue(_eastCartographic, "Восток картографический", row);
|
||||
trajectoryRow.NorthCartographic = getDoubleValue(_northCartographic, "Север картографический", row);
|
||||
trajectoryRow.SpatialIntensity = getDoubleValue(_spatialIntensity, "Простр. интенсивность", row);
|
||||
trajectoryRow.AngleIntensity = getDoubleValue(_angleIntensity, "Интенсивность по углу", row);
|
||||
trajectoryRow.AzimuthIntensity = getDoubleValue(_azimuthIntensity, "Интенсивность по азимуту", row);
|
||||
trajectoryRow.OrificeOffset = getDoubleValue(_orificeOffset, "Смещение от устья", row);
|
||||
trajectoryRow.Radius = getDoubleValue(_radius, "Радиус цели", row);
|
||||
|
||||
if (_comment is not null)
|
||||
trajectoryRow.Comment = _comment.ToString();
|
||||
return trajectoryRow;
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user