РТК план подход к забою в роторе

This commit is contained in:
Olga Nemt 2024-06-30 20:01:40 +05:00
parent 1ffe0d6df8
commit b84bb9f45b
5 changed files with 116 additions and 10 deletions

View File

@ -0,0 +1,60 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudApp.Data.ProcessMaps;
/// <summary>
/// РТК план подход к забою в роторе
/// </summary>
public class ProcessMapPlanRotorLoweringBitDto : ProcessMapPlanBaseDto
{
/// <summary>
/// Максимально допустимое давление, атм.
/// </summary>
[Range(0.0, 400.0, ErrorMessage = "Максимально допустимое давление, атм., должно быть в пределах от 0 до 400")]
public double PressureMax { get; set; }
/// <summary>
/// Перепад давления уставка, атм.
/// </summary>
[Range(0.0, 60.0, ErrorMessage = "Перепад давления уставка, атм., должно быть в пределах от 0 до 60")]
public double DifferentialPressure { get; set; }
/// <summary>
/// Посадка, т.
/// </summary>
[Range(0.0, 20.0, ErrorMessage = "Посадка, т., должно быть в пределах от 0 до 20")]
public double SlackingOff { get; set; }
/// <summary>
/// Максимально допустимый момент, кН*м.
/// </summary>
[Range(0.0, 35.0, ErrorMessage = "Максимально допустимый момент, кН*м., должно быть в пределах от 0 до 35")]
public double TorqueMax { get; set; }
/// <summary>
/// Скорость вниз, м/ч.
/// </summary>
[Range(0.0, 999.0, ErrorMessage = "Скорость вниз, м/ч., должно быть в пределах от 0 до 999")]
public double RopDown { get; set; }
/// <summary>
/// Обороты вниз, об/мин.
/// </summary>
[Range(0.0, 270.0, ErrorMessage = "Обороты вниз, об/мин., должно быть в пределах от 0 до 270")]
public double RpmDown { get; set; }
/// <summary>
/// Расход вниз, л/с.
/// </summary>
[Range(0.0, 100.0, ErrorMessage = "Расход вниз, л/с., должно быть в пределах от 0 до 100")]
public double FlowRateDown { get; set; }
/// <summary>
/// Примечание
/// </summary>
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
public string Note { get; set; } = string.Empty;
}

View File

@ -40,6 +40,7 @@ namespace AsbCloudDb.Model
public virtual DbSet<ProcessMapPlanOscillation> ProcessMapPlanFunctionsOscillation => Set<ProcessMapPlanOscillation>();
public virtual DbSet<ProcessMapPlanAntiCrashRotation> ProcessMapPlanFunctionsAnticrashRotation => Set<ProcessMapPlanAntiCrashRotation>();
public virtual DbSet<ProcessMapPlanStaticMeasurementOutput> ProcessMapPlanFunctionsStaticMeasure => Set<ProcessMapPlanStaticMeasurementOutput>();
public virtual DbSet<ProcessMapPlanRotorLoweringBit> ProcessMapPlanRotorLoweringBit => Set<ProcessMapPlanRotorLoweringBit>();
public virtual DbSet<DrillingProgramPart> DrillingProgramParts => Set<DrillingProgramPart>();
public virtual DbSet<FileCategory> FileCategories => Set<FileCategory>();
@ -563,6 +564,11 @@ namespace AsbCloudDb.Model
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
modelBuilder.Entity<ProcessMapPlanRotorLoweringBit>()
.HasOne(p => p.Author)
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
modelBuilder.Entity<ProcessMapPlanRotor>()
.HasOne(p => p.Editor)
.WithMany()
@ -663,6 +669,11 @@ namespace AsbCloudDb.Model
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
modelBuilder.Entity<ProcessMapPlanRotorLoweringBit>()
.HasOne(p => p.Editor)
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
DefaultData.DefaultContextData.Fill(modelBuilder);
}

View File

@ -101,6 +101,7 @@ namespace AsbCloudDb.Model
DbSet<ProcessMapPlanOscillation> ProcessMapPlanFunctionsOscillation { get; }
DbSet<ProcessMapPlanAntiCrashRotation> ProcessMapPlanFunctionsAnticrashRotation { get; }
DbSet<ProcessMapPlanStaticMeasurementOutput> ProcessMapPlanFunctionsStaticMeasure { get; }
DbSet<ProcessMapPlanRotorLoweringBit> ProcessMapPlanRotorLoweringBit { get; }
Task<int> RefreshMaterializedViewAsync(string mwName, CancellationToken token);
Task<int> RefreshMaterializedViewAsync<TEntity>(CancellationToken token) where TEntity : class;

View File

@ -8,24 +8,44 @@ namespace AsbCloudDb.Model.ProcessMaps;
[Table("t_process_map_plan_rotor_lowering_bit"), Comment("РТК подход к забою в роторе")]
public class ProcessMapPlanRotorLoweringBit : ProcessMapPlanBase
{
[Column("time_load_capacity_min"), Comment("Время выработки минимальное, сек")]
[Range(0.0, 800.0)]
[Column("pressure_max"), Comment("Максимально допустимое давление, атм.")]
[Range(0.0, 400.0)]
[Required]
public double TimeLoadCapacityMin { get; set; }
public double PressureMax { get; set; }
[Column("differential_pressure_min"), Comment("Перепад давления минимальный, атм")]
[Range(0.1, 400.0)]
[Column("differential_pressure"), Comment("Перепад давления уставка, атм.")]
[Range(0.0, 60.0)]
[Required]
public double DifferentialPressureMin { get; set; }
public double DifferentialPressure { get; set; }
[Column("weight_on_bit_min"), Comment("Нагрузка минимальная, т")]
[Range(0.1, 99.0)]
[Column("slacking_off"), Comment("Посадка, т.")]
[Range(0.0, 20.0)]
[Required]
public double WeightOnBitMin { get; set; }
public double SlackingOff { get; set; }
[Column("torque_max"), Comment("Максимально допустимый момент, кН*м.")]
[Range(0.0, 35.0)]
[Required]
public double TorqueMax { get; set; }
[Column("rop_down"), Comment("Скорость вниз, м/ч.")]
[Range(0.0, 999.0)]
[Required]
public double RopDown { get; set; }
[Column("rpm_down"), Comment("Обороты вниз, об/мин.")]
[Range(0.0, 270.0)]
[Required]
public double RpmDown { get; set; }
[Column("flow_rate_down"), Comment("Расход вниз, л/с.")]
[Range(0.0, 100.0)]
[Required]
public double FlowRateDown { get; set; }
[Column("note"), Comment("Примечание"), StringLength(1024)]
public string Note { get; set; } = string.Empty;
[ForeignKey(nameof(IdPrevious))]
public virtual ProcessMapPlanLoadCapacity? Previous { get; set; }
public virtual ProcessMapPlanRotorLoweringBit? Previous { get; set; }
}

View File

@ -271,6 +271,13 @@ namespace AsbCloudInfrastructure
{
Item = src.Adapt<ProcessMapPlanStaticMeasurementOutputDto>()
});
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanRotorLoweringBitDto>>.NewConfig()
.Include<ProcessMapPlanRotorLoweringBit, ChangeLogDto<ProcessMapPlanRotorLoweringBitDto>>()
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanRotorLoweringBitDto>()
{
Item = src.Adapt<ProcessMapPlanRotorLoweringBitDto>()
});
}
public static IServiceCollection AddInfrastructure(this IServiceCollection services, IConfiguration configuration)
@ -447,6 +454,7 @@ namespace AsbCloudInfrastructure
services.AddTransient<ProcessMapPlanOscillationParser>();
services.AddTransient<ProcessMapPlanAntiCrashRotationParser>();
services.AddTransient<ProcessMapPlanStaticMeasurementOutputParser>();
services.AddTransient<ProcessMapPlanRotorLoweringBitParser>();
services.AddTransient<TrajectoryPlanExportService>();
services.AddTransient<TrajectoryFactManualExportService>();
@ -473,6 +481,7 @@ namespace AsbCloudInfrastructure
services.AddTransient<ProcessMapPlanOscillationExportService>();
services.AddTransient<ProcessMapPlanAntiCrashRotationExportService>();
services.AddTransient<ProcessMapPlanStaticMeasurementOutputExportService>();
services.AddTransient<ProcessMapPlanRotorLoweringBitExportService>();
services.AddTransient<WellOperationParserFactory>();
services.AddTransient<WellOperationExportServiceFactory>();
@ -566,6 +575,10 @@ namespace AsbCloudInfrastructure
IChangeLogRepository<ProcessMapPlanStaticMeasurementOutputDto, ProcessMapPlanBaseRequestWithWell>,
ProcessMapPlanBaseRepository<ProcessMapPlanStaticMeasurementOutput, ProcessMapPlanStaticMeasurementOutputDto>>();
services.AddTransient<
IChangeLogRepository<ProcessMapPlanRotorLoweringBitDto, ProcessMapPlanBaseRequestWithWell>,
ProcessMapPlanBaseRepository<ProcessMapPlanRotorLoweringBit, ProcessMapPlanRotorLoweringBitDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanRotorDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanSlideDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanReamingRotorDto>>();
@ -586,6 +599,7 @@ namespace AsbCloudInfrastructure
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOscillationDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanAntiCrashRotationDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanStaticMeasurementOutputDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanRotorLoweringBitDto>>();
return services;
}