Позиционирование над забоем

This commit is contained in:
Olga Nemt 2024-06-30 11:46:16 +05:00
parent 7daa8f280c
commit 4c4c0a5041
11 changed files with 135 additions and 57 deletions

View File

@ -1,15 +0,0 @@
using System.ComponentModel.DataAnnotations;
namespace AsbCloudApp.Data.ProcessMaps;
/// <summary>
/// РТК план позиционирования над забоем
/// </summary>
public class ProcessMapPlanOperationPositioningOffTheBottomDto : ProcessMapPlanBaseDto
{
/// <summary>
/// Остановка над забоем, м
/// </summary>
[Range(0.0, 30.0, ErrorMessage = "Остановка над забоем, м., должно быть в пределах от 0 до 30")]
public double StopOffTheBottom { get; set; }
}

View File

@ -0,0 +1,93 @@
using System.ComponentModel.DataAnnotations;
namespace AsbCloudApp.Data.ProcessMaps;
/// <summary>
/// РТК план выставление
/// </summary>
public class ProcessMapPlanTFOrientationDto : ProcessMapPlanBaseDto
{
/// <summary>
/// Задание TF, град.
/// </summary>
[Range(0.0, 360.0, ErrorMessage = "Задание TF, град., должно быть в пределах от 0 до 360")]
public double TFSetpoint { get; set; }
/// <summary>
/// Пружина, град.
/// </summary>
[Range(0.0, 10000.0, ErrorMessage = "Пружина, град., должно быть в пределах от 0 до 10000")]
public double Spring { get; set; }
/// <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 Tight { 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, 99.0, ErrorMessage = "Количество расхаживаний, шт., должно быть в пределах от 0 до 99")]
public int RepetitionsCount { get; set; }
/// <summary>
/// Скорость вверх, м/ч.
/// </summary>
[Range(0.0, 999.0, ErrorMessage = "Скорость вверх, м/ч., должно быть в пределах от 0 до 999")]
public double RopUp { get; set; }
/// <summary>
/// Скорость вниз, м/ч.
/// </summary>
[Range(0.0, 999.0, ErrorMessage = "Скорость вниз, м/ч., должно быть в пределах от 0 до 999")]
public double RopDown { get; set; }
/// <summary>
/// Расход вверх, л/с.
/// </summary>
[Range(0.0, 100.0, ErrorMessage = "Расход вверх, л/с., должно быть в пределах от 0 до 100")]
public double FlowRateUp { get; set; }
/// <summary>
/// Расход вниз, л/с.
/// </summary>
[Range(0.0, 100.0, ErrorMessage = "Расход вниз, л/с., должно быть в пределах от 0 до 100")]
public double FlowRateDown { get; set; }
/// <summary>
/// Интервал расхаживания, м.
/// </summary>
[Range(0.0, 30.0, ErrorMessage = "Интервал расхаживания, м., должно быть в пределах от 0 до 30")]
public double Interval { get; set; }
/// <summary>
/// Остановка над забоем, м.
/// </summary>
[Range(0.0, 10.0, ErrorMessage = "Остановка над забоем, м., должно быть в пределах от 0 до 10")]
public double StopPointOffBottom { get; set; }
}

View File

@ -26,7 +26,7 @@ namespace AsbCloudDb.Model
public virtual DbSet<ProcessMapPlanReamingSlide> ProcessMapPlanOperationReamingSlide => Set<ProcessMapPlanReamingSlide>();
public virtual DbSet<ProcessMapPlanOperationLoadCapacity> ProcessMapPlanOperationLoadCapacity => Set<ProcessMapPlanOperationLoadCapacity>();
public virtual DbSet<ProcessMapPlanSurvey> ProcessMapPlanSurvey => Set<ProcessMapPlanSurvey>();
public virtual DbSet<ProcessMapPlanOperationPositioningOffTheBottom> ProcessMapPlanOperationPositioningOffTheBottom => Set<ProcessMapPlanOperationPositioningOffTheBottom>();
public virtual DbSet<ProcessMapPlanPositioningOffTheBottom> ProcessMapPlanOperationPositioningOffTheBottom => Set<ProcessMapPlanPositioningOffTheBottom>();
public virtual DbSet<ProcessMapPlanOscillationAngles> ProcessMapPlanOperationDeterminationOfOscillationAngles => Set<ProcessMapPlanOscillationAngles>();
public virtual DbSet<ProcessMapPlanTFOrientation> ProcessMapPlanOperationTFOrientation => Set<ProcessMapPlanTFOrientation>();
public virtual DbSet<ProcessMapPlanSwitchingOffThePump> ProcessMapPlanOperationSwitchPump => Set<ProcessMapPlanSwitchingOffThePump>();
@ -493,7 +493,7 @@ namespace AsbCloudDb.Model
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
modelBuilder.Entity<ProcessMapPlanOperationPositioningOffTheBottom>()
modelBuilder.Entity<ProcessMapPlanPositioningOffTheBottom>()
.HasOne(p => p.Author)
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
@ -593,7 +593,7 @@ namespace AsbCloudDb.Model
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
modelBuilder.Entity<ProcessMapPlanOperationPositioningOffTheBottom>()
modelBuilder.Entity<ProcessMapPlanPositioningOffTheBottom>()
.HasOne(p => p.Editor)
.WithMany()
.OnDelete(DeleteBehavior.Restrict);

View File

@ -87,7 +87,7 @@ namespace AsbCloudDb.Model
DbSet<ProcessMapPlanReamingSlide> ProcessMapPlanOperationReamingSlide { get; }
DbSet<ProcessMapPlanOperationLoadCapacity> ProcessMapPlanOperationLoadCapacity { get; }
DbSet<ProcessMapPlanSurvey> ProcessMapPlanSurvey { get; }
DbSet<ProcessMapPlanOperationPositioningOffTheBottom> ProcessMapPlanOperationPositioningOffTheBottom { get; }
DbSet<ProcessMapPlanPositioningOffTheBottom> ProcessMapPlanOperationPositioningOffTheBottom { get; }
DbSet<ProcessMapPlanOscillationAngles> ProcessMapPlanOperationDeterminationOfOscillationAngles { get; }
DbSet<ProcessMapPlanTFOrientation> ProcessMapPlanOperationTFOrientation { get; }
DbSet<ProcessMapPlanSwitchingOffThePump> ProcessMapPlanOperationSwitchPump { get; }

View File

@ -5,8 +5,8 @@ using Microsoft.EntityFrameworkCore;
namespace AsbCloudDb.Model.ProcessMaps;
[Table("t_process_map_plan_operation_positioning_off_the_bottom"), Comment("Позиционирование над забоем")]
public class ProcessMapPlanOperationPositioningOffTheBottom : ProcessMapPlanBase
[Table("t_process_map_plan_positioning_off_the_bottom"), Comment("Позиционирование над забоем")]
public class ProcessMapPlanPositioningOffTheBottom : ProcessMapPlanBase
{
[Column("stop_off_the_bottom"), Comment("Остановка над забоем, м")]
[Range(0.0, 30.0)]
@ -14,5 +14,5 @@ public class ProcessMapPlanOperationPositioningOffTheBottom : ProcessMapPlanBase
public double StopOffTheBottom { get; set; }
[ForeignKey(nameof(IdPrevious))]
public virtual ProcessMapPlanOperationPositioningOffTheBottom? Previous { get; set; }
public virtual ProcessMapPlanPositioningOffTheBottom? Previous { get; set; }
}

View File

@ -174,11 +174,11 @@ namespace AsbCloudInfrastructure
Item = src.Adapt<ProcessMapPlanSurveyDto>()
});
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanOperationPositioningOffTheBottomDto>>.NewConfig()
.Include<ProcessMapPlanOperationPositioningOffTheBottom, ChangeLogDto<ProcessMapPlanOperationPositioningOffTheBottomDto>>()
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanOperationPositioningOffTheBottomDto>()
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanPositioningOffTheBottomDto>>.NewConfig()
.Include<ProcessMapPlanPositioningOffTheBottom, ChangeLogDto<ProcessMapPlanPositioningOffTheBottomDto>>()
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanPositioningOffTheBottomDto>()
{
Item = src.Adapt<ProcessMapPlanOperationPositioningOffTheBottomDto>()
Item = src.Adapt<ProcessMapPlanPositioningOffTheBottomDto>()
});
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanOscillationAnglesDto>>.NewConfig()
@ -433,7 +433,7 @@ namespace AsbCloudInfrastructure
services.AddTransient<ProcessMapPlanReamingSlideParser>();
services.AddTransient<ProcessMapPlanOperationLoadCapacityParser>();
services.AddTransient<ProcessMapPlanSurveyParser>();
services.AddTransient<ProcessMapPlanOperationPositioningOffTheBottomParser>();
services.AddTransient<ProcessMapPlanPositioningOffTheBottomParser>();
services.AddTransient<ProcessMapPlanOscillationAnglesParser>();
services.AddTransient<ProcessMapPlanTFOrientationParser>();
services.AddTransient<ProcessMapPlanSwitchingOffThePumpParser>();
@ -459,7 +459,7 @@ namespace AsbCloudInfrastructure
services.AddTransient<ProcessMapPlanReamingSlideExportService>();
services.AddTransient<ProcessMapPlanOperationLoadCapacityExportService>();
services.AddTransient<ProcessMapPlanSurveyExportService>();
services.AddTransient<ProcessMapPlanOperationPositioningOffTheBottomExportService>();
services.AddTransient<ProcessMapPlanPositioningOffTheBottomExportService>();
services.AddTransient<ProcessMapPlanOscillationAnglesExportService>();
services.AddTransient<ProcessMapPlanTFOrientationExportService>();
services.AddTransient<ProcessMapPlanSwitchingOffThePumpExportService>();
@ -511,8 +511,8 @@ namespace AsbCloudInfrastructure
ProcessMapPlanBaseRepository<ProcessMapPlanSurvey, ProcessMapPlanSurveyDto>>();
services.AddTransient<
IChangeLogRepository<ProcessMapPlanOperationPositioningOffTheBottomDto, ProcessMapPlanBaseRequestWithWell>,
ProcessMapPlanBaseRepository<ProcessMapPlanOperationPositioningOffTheBottom, ProcessMapPlanOperationPositioningOffTheBottomDto>>();
IChangeLogRepository<ProcessMapPlanPositioningOffTheBottomDto, ProcessMapPlanBaseRequestWithWell>,
ProcessMapPlanBaseRepository<ProcessMapPlanPositioningOffTheBottom, ProcessMapPlanPositioningOffTheBottomDto>>();
services.AddTransient<
IChangeLogRepository<ProcessMapPlanOscillationAnglesDto, ProcessMapPlanBaseRequestWithWell>,
@ -572,7 +572,7 @@ namespace AsbCloudInfrastructure
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanReamingSlideDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOperationLoadCapacityDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanSurveyDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOperationPositioningOffTheBottomDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanPositioningOffTheBottomDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOscillationAnglesDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanTFOrientationDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanSwitchingOffThePumpDto>>();

View File

@ -2,13 +2,13 @@ using System.Collections.Generic;
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
public class ProcessMapPlanOperationPositioningOffTheBottomTemplate : ITemplateParameters
public class ProcessMapPlanPositioningOffTheBottomTemplate : ITemplateParameters
{
public string SheetName => "Позиционирование над забоем";
public int HeaderRowsCount => 2;
public string FileName => "ProcessMapPlanOperationPositioningOffTheBottomTemplate.xlsx";
public string FileName => "ProcessMapPlanPositioningOffTheBottomTemplate.xlsx";
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
{

View File

@ -10,16 +10,16 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
public class ProcessMapPlanOperationPositioningOffTheBottomExportService : ProcessMapPlanExportService<ProcessMapPlanOperationPositioningOffTheBottomDto>
public class ProcessMapPlanPositioningOffTheBottomExportService : ProcessMapPlanExportService<ProcessMapPlanPositioningOffTheBottomDto>
{
public ProcessMapPlanOperationPositioningOffTheBottomExportService(
IChangeLogRepository<ProcessMapPlanOperationPositioningOffTheBottomDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
public ProcessMapPlanPositioningOffTheBottomExportService(
IChangeLogRepository<ProcessMapPlanPositioningOffTheBottomDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
IWellService wellService)
: base(processMapPlanRepository, wellService)
{
}
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanOperationPositioningOffTheBottomTemplate();
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanPositioningOffTheBottomTemplate();
protected override async Task<string> BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token)
{

View File

@ -9,16 +9,16 @@ using AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemp
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
public class ProcessMapPlanOperationPositioningOffTheBottomParser : ProcessMapPlanParser<ProcessMapPlanOperationPositioningOffTheBottomDto>
public class ProcessMapPlanPositioningOffTheBottomParser : ProcessMapPlanParser<ProcessMapPlanPositioningOffTheBottomDto>
{
public ProcessMapPlanOperationPositioningOffTheBottomParser(IWellOperationRepository wellOperationRepository)
public ProcessMapPlanPositioningOffTheBottomParser(IWellOperationRepository wellOperationRepository)
: base(wellOperationRepository)
{
}
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanOperationPositioningOffTheBottomTemplate();
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanPositioningOffTheBottomTemplate();
protected override ProcessMapPlanOperationPositioningOffTheBottomDto BuildDto(IDictionary<string, object?> row, int rowNumber)
protected override ProcessMapPlanPositioningOffTheBottomDto BuildDto(IDictionary<string, object?> row, int rowNumber)
{
var dto = base.BuildDto(row, rowNumber);

View File

@ -10,18 +10,18 @@ using AsbCloudWebApi.IntegrationTests;
using Microsoft.EntityFrameworkCore;
using Xunit;
namespace AsbCloudWebApi.Controllers.ProcessMaps;
namespace AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan.Operations;
/// <summary>
/// РТК план позиционирование над забоем
/// </summary>
public class ProcessMapPlanOperationPositioningOffTheBottomControllerTest :
ProcessMapPlanBaseControllerTest<ProcessMapPlanOperationPositioningOffTheBottom, ProcessMapPlanOperationPositioningOffTheBottomDto>
public class ProcessMapPlanPositioningOffTheBottomControllerTest :
ProcessMapPlanBaseControllerTest<ProcessMapPlanPositioningOffTheBottom, ProcessMapPlanPositioningOffTheBottomDto>
{
public ProcessMapPlanOperationPositioningOffTheBottomControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanOperationPositioningOffTheBottom")
public ProcessMapPlanPositioningOffTheBottomControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanOperationPositioningOffTheBottom")
{
}
private readonly ProcessMapPlanOperationPositioningOffTheBottomDto dto = new ProcessMapPlanOperationPositioningOffTheBottomDto()
private readonly ProcessMapPlanPositioningOffTheBottomDto dto = new ProcessMapPlanPositioningOffTheBottomDto()
{
IdWell = 1,
DepthStart = 1,
@ -31,7 +31,7 @@ public class ProcessMapPlanOperationPositioningOffTheBottomControllerTest :
StopOffTheBottom = 1
};
private readonly ProcessMapPlanOperationPositioningOffTheBottom entity = new ProcessMapPlanOperationPositioningOffTheBottom()
private readonly ProcessMapPlanPositioningOffTheBottom entity = new ProcessMapPlanPositioningOffTheBottom()
{
IdWell = 1,
DepthEnd = 10,
@ -50,17 +50,17 @@ public class ProcessMapPlanOperationPositioningOffTheBottomControllerTest :
await Get(entity, dto);
}
protected override ProcessMapPlanOperationPositioningOffTheBottom GetByNote(DbSet<ProcessMapPlanOperationPositioningOffTheBottom> dbSet, ProcessMapPlanOperationPositioningOffTheBottomDto dto)
protected override ProcessMapPlanPositioningOffTheBottom GetByNote(DbSet<ProcessMapPlanPositioningOffTheBottom> dbSet, ProcessMapPlanPositioningOffTheBottomDto dto)
{
throw new NotImplementedException();
}
protected override ProcessMapPlanOperationPositioningOffTheBottomDto GetByNote(IEnumerable<ProcessMapPlanOperationPositioningOffTheBottomDto> dtos, ProcessMapPlanOperationPositioningOffTheBottomDto dto)
protected override ProcessMapPlanPositioningOffTheBottomDto GetByNote(IEnumerable<ProcessMapPlanPositioningOffTheBottomDto> dtos, ProcessMapPlanPositioningOffTheBottomDto dto)
{
throw new NotImplementedException();
}
protected override ProcessMapPlanOperationPositioningOffTheBottom? GetByWellId()
protected override ProcessMapPlanPositioningOffTheBottom? GetByWellId()
{
throw new NotImplementedException();
}

View File

@ -6,20 +6,20 @@ using AsbCloudDb.Model.ProcessMaps;
using AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
using AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
namespace AsbCloudWebApi.Controllers.ProcessMaps;
namespace AsbCloudWebApi.Controllers.ProcessMaps.Operations;
/// <summary>
/// РТК план позиционирование над забоем
/// </summary>
public class ProcessMapPlanOperationPositioningOffTheBottomController :
ProcessMapPlanBaseController<ProcessMapPlanOperationPositioningOffTheBottom, ProcessMapPlanOperationPositioningOffTheBottomDto>
public class ProcessMapPlanPositioningOffTheBottomController :
ProcessMapPlanBaseController<ProcessMapPlanPositioningOffTheBottom, ProcessMapPlanPositioningOffTheBottomDto>
{
public ProcessMapPlanOperationPositioningOffTheBottomController(
IChangeLogRepository<ProcessMapPlanOperationPositioningOffTheBottomDto, ProcessMapPlanBaseRequestWithWell> repository,
public ProcessMapPlanPositioningOffTheBottomController(
IChangeLogRepository<ProcessMapPlanPositioningOffTheBottomDto, ProcessMapPlanBaseRequestWithWell> repository,
IWellService wellService,
ProcessMapPlanOperationPositioningOffTheBottomParser parserService,
ProcessMapPlanPositioningOffTheBottomParser parserService,
ITelemetryService telemetryService,
ProcessMapPlanOperationPositioningOffTheBottomExportService processMapPlanExportService)
ProcessMapPlanPositioningOffTheBottomExportService processMapPlanExportService)
: base(repository, wellService, parserService, processMapPlanExportService, telemetryService)
{
}