forked from ddrilling/AsbCloudServer
Выключение насоса
This commit is contained in:
parent
2699bdfdd1
commit
fa16335b68
21
AsbCloudApp/Data/ProcessMaps/ProcessMapPlanDamperDto.cs
Normal file
21
AsbCloudApp/Data/ProcessMaps/ProcessMapPlanDamperDto.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace AsbCloudApp.Data.ProcessMaps;
|
||||
|
||||
/// <summary>
|
||||
/// РТК план демпфер
|
||||
/// </summary>
|
||||
public class ProcessMapPlanDamperDto : ProcessMapPlanBaseDto
|
||||
{
|
||||
/// <summary>
|
||||
/// StickSlip
|
||||
/// </summary>
|
||||
[Range(0.0, 1000.0, ErrorMessage = "StickSlip, должно быть в пределах от 0 до 1000")]
|
||||
public double StickSlip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Примечание
|
||||
/// </summary>
|
||||
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
||||
public string Note { get; set; } = string.Empty;
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace AsbCloudApp.Data.ProcessMaps;
|
||||
|
||||
/// <summary>
|
||||
/// РТК план выключение насоса
|
||||
/// </summary>
|
||||
public class ProcessMapPlanOperationSwitchPumpDto : ProcessMapPlanBaseDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Продолжительность, сек.
|
||||
/// </summary>
|
||||
[Range(0.0, 1800.0, ErrorMessage = "Продолжительность, сек., должно быть в пределах от 0 до 1800")]
|
||||
public double Duration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Лимит остаточного давления, атм.
|
||||
/// </summary>
|
||||
[Range(0.0, 100.0, ErrorMessage = "Лимит остаточного давления, атм., должно быть в пределах от 0 до 100")]
|
||||
public double ResidualPressureLimit { get; set; }
|
||||
}
|
51
AsbCloudApp/Data/ProcessMaps/ProcessMapPlanShockTestDto.cs
Normal file
51
AsbCloudApp/Data/ProcessMaps/ProcessMapPlanShockTestDto.cs
Normal file
@ -0,0 +1,51 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace AsbCloudApp.Data.ProcessMaps;
|
||||
|
||||
/// <summary>
|
||||
/// РТК план shocktest
|
||||
/// </summary>
|
||||
public class ProcessMapPlanShockTestDto : ProcessMapPlanBaseDto
|
||||
{
|
||||
/// <summary>
|
||||
/// StickSlip
|
||||
/// </summary>
|
||||
[Range(0.0, 1000.0, ErrorMessage = "StickSlip, должно быть в пределах от 0 до 1000")]
|
||||
public double StickSlip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whirl
|
||||
/// </summary>
|
||||
[Range(0.0, 1000.0, ErrorMessage = "Whirl, должно быть в пределах от 0 до 1000")]
|
||||
public double Whirl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Осевые вибрации
|
||||
/// </summary>
|
||||
[Range(0.0, 1000.0, ErrorMessage = "Осевые вибрации, должно быть в пределах от 0 до 1000")]
|
||||
public double AxialVibrations { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Комбинированные вибрации
|
||||
/// </summary>
|
||||
[Range(0.0, 1000.0, ErrorMessage = "Комбинированные вибрации, должно быть в пределах от 0 до 1000")]
|
||||
public double CombinedVibrations { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Нагрузка минимальная, т
|
||||
/// </summary>
|
||||
[Range(0.0, 30.0, ErrorMessage = "Комбинированные вибрации, должно быть в пределах от 1 до 30")]
|
||||
public double WeightOnBitMin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Минимальные обороты на ВСП, об/мин.
|
||||
/// </summary>
|
||||
[Range(5, 200, ErrorMessage = "Минимальные обороты на ВСП, об/мин., должно быть в пределах от 5 до 200")]
|
||||
public double RpmMin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Примечание
|
||||
/// </summary>
|
||||
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
||||
public string Note { get; set; } = string.Empty;
|
||||
}
|
@ -29,7 +29,7 @@ namespace AsbCloudDb.Model
|
||||
public virtual DbSet<ProcessMapPlanOperationPositioningOffTheBottom> ProcessMapPlanOperationPositioningOffTheBottom => Set<ProcessMapPlanOperationPositioningOffTheBottom>();
|
||||
public virtual DbSet<ProcessMapPlanOscillationAngles> ProcessMapPlanOperationDeterminationOfOscillationAngles => Set<ProcessMapPlanOscillationAngles>();
|
||||
public virtual DbSet<ProcessMapPlanOperationTFOrientation> ProcessMapPlanOperationTFOrientation => Set<ProcessMapPlanOperationTFOrientation>();
|
||||
public virtual DbSet<ProcessMapPlanOperationSwitchPump> ProcessMapPlanOperationSwitchPump => Set<ProcessMapPlanOperationSwitchPump>();
|
||||
public virtual DbSet<ProcessMapPlanSwitchingOffThePump> ProcessMapPlanOperationSwitchPump => Set<ProcessMapPlanSwitchingOffThePump>();
|
||||
public virtual DbSet<ProcessMapPlanOperationSwitchingToTheMode> ProcessMapPlanOperationSwitchMode => Set<ProcessMapPlanOperationSwitchingToTheMode>();
|
||||
public virtual DbSet<ProcessMapPlanDrillTest> ProcessMapPlanFunctionsDrillTest => Set<ProcessMapPlanDrillTest>();
|
||||
public virtual DbSet<ProcessMapPlanShockTest> ProcessMapPlanFunctionsShockTest => Set<ProcessMapPlanShockTest>();
|
||||
@ -508,7 +508,7 @@ namespace AsbCloudDb.Model
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
modelBuilder.Entity<ProcessMapPlanOperationSwitchPump>()
|
||||
modelBuilder.Entity<ProcessMapPlanSwitchingOffThePump>()
|
||||
.HasOne(p => p.Author)
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
@ -608,7 +608,7 @@ namespace AsbCloudDb.Model
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
modelBuilder.Entity<ProcessMapPlanOperationSwitchPump>()
|
||||
modelBuilder.Entity<ProcessMapPlanSwitchingOffThePump>()
|
||||
.HasOne(p => p.Editor)
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
@ -90,7 +90,7 @@ namespace AsbCloudDb.Model
|
||||
DbSet<ProcessMapPlanOperationPositioningOffTheBottom> ProcessMapPlanOperationPositioningOffTheBottom { get; }
|
||||
DbSet<ProcessMapPlanOscillationAngles> ProcessMapPlanOperationDeterminationOfOscillationAngles { get; }
|
||||
DbSet<ProcessMapPlanOperationTFOrientation> ProcessMapPlanOperationTFOrientation { get; }
|
||||
DbSet<ProcessMapPlanOperationSwitchPump> ProcessMapPlanOperationSwitchPump { get; }
|
||||
DbSet<ProcessMapPlanSwitchingOffThePump> ProcessMapPlanOperationSwitchPump { get; }
|
||||
DbSet<ProcessMapPlanOperationSwitchingToTheMode> ProcessMapPlanOperationSwitchMode { get; }
|
||||
DbSet<ProcessMapPlanDrillTest> ProcessMapPlanFunctionsDrillTest { get; }
|
||||
DbSet<ProcessMapPlanShockTest> ProcessMapPlanFunctionsShockTest { get; }
|
||||
|
@ -5,8 +5,8 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace AsbCloudDb.Model.ProcessMaps;
|
||||
|
||||
[Table("t_process_map_plan_operation_switch_pump"), Comment("Выключение насоса")]
|
||||
public class ProcessMapPlanOperationSwitchPump : ProcessMapPlanBase
|
||||
[Table("t_process_map_plan_operation_switching_off_the_pump"), Comment("Выключение насоса")]
|
||||
public class ProcessMapPlanSwitchingOffThePump : ProcessMapPlanBase
|
||||
{
|
||||
[Column("duration"), Comment("Продолжительность, сек.")]
|
||||
[Range(0.0, 1800.0)]
|
||||
@ -18,5 +18,5 @@ public class ProcessMapPlanOperationSwitchPump : ProcessMapPlanBase
|
||||
public double ResidualPressureLimit { get; set; }
|
||||
|
||||
[ForeignKey(nameof(IdPrevious))]
|
||||
public virtual ProcessMapPlanOperationSwitchPump? Previous { get; set; }
|
||||
public virtual ProcessMapPlanSwitchingOffThePump? Previous { get; set; }
|
||||
}
|
@ -195,11 +195,11 @@ namespace AsbCloudInfrastructure
|
||||
Item = src.Adapt<ProcessMapPlanOperationTFOrientationDto>()
|
||||
});
|
||||
|
||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanOperationSwitchPumpDto>>.NewConfig()
|
||||
.Include<ProcessMapPlanOperationSwitchPump, ChangeLogDto<ProcessMapPlanOperationSwitchPumpDto>>()
|
||||
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanOperationSwitchPumpDto>()
|
||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanSwitchingOffThePumpDto>>.NewConfig()
|
||||
.Include<ProcessMapPlanSwitchingOffThePump, ChangeLogDto<ProcessMapPlanSwitchingOffThePumpDto>>()
|
||||
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanSwitchingOffThePumpDto>()
|
||||
{
|
||||
Item = src.Adapt<ProcessMapPlanOperationSwitchPumpDto>()
|
||||
Item = src.Adapt<ProcessMapPlanSwitchingOffThePumpDto>()
|
||||
});
|
||||
|
||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanOperationSwitchingToTheModeDto>>.NewConfig()
|
||||
@ -436,7 +436,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<ProcessMapPlanOperationPositioningOffTheBottomParser>();
|
||||
services.AddTransient<ProcessMapPlanOscillationAnglesParser>();
|
||||
services.AddTransient<ProcessMapPlanOperationTFOrientationParser>();
|
||||
services.AddTransient<ProcessMapPlanOperationSwitchPumpParser>();
|
||||
services.AddTransient<ProcessMapPlanSwitchingOffThePumpParser>();
|
||||
services.AddTransient<ProcessMapPlanOperationSwitchingToTheModeParser>();
|
||||
services.AddTransient<ProcessMapPlanDrillTestParser>();
|
||||
services.AddTransient<ProcessMapPlanShockTestParser>();
|
||||
@ -462,7 +462,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<ProcessMapPlanOperationPositioningOffTheBottomExportService>();
|
||||
services.AddTransient<ProcessMapPlanOscillationAnglesExportService>();
|
||||
services.AddTransient<ProcessMapPlanOperationTFOrientationExportService>();
|
||||
services.AddTransient<ProcessMapPlanOperationSwitchPumpExportService>();
|
||||
services.AddTransient<ProcessMapPlanSwitchingOffThePumpExportService>();
|
||||
services.AddTransient<ProcessMapPlanOperationSwitchingToTheModeExportService>();
|
||||
services.AddTransient<ProcessMapPlanDrillTestExportService>();
|
||||
services.AddTransient<ProcessMapPlanShockTestExportService>();
|
||||
@ -523,8 +523,8 @@ namespace AsbCloudInfrastructure
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanOperationTFOrientation, ProcessMapPlanOperationTFOrientationDto>>();
|
||||
|
||||
services.AddTransient<
|
||||
IChangeLogRepository<ProcessMapPlanOperationSwitchPumpDto, ProcessMapPlanBaseRequestWithWell>,
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanOperationSwitchPump, ProcessMapPlanOperationSwitchPumpDto>>();
|
||||
IChangeLogRepository<ProcessMapPlanSwitchingOffThePumpDto, ProcessMapPlanBaseRequestWithWell>,
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanSwitchingOffThePump, ProcessMapPlanSwitchingOffThePumpDto>>();
|
||||
|
||||
services.AddTransient<
|
||||
IChangeLogRepository<ProcessMapPlanOperationSwitchingToTheModeDto, ProcessMapPlanBaseRequestWithWell>,
|
||||
@ -575,7 +575,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOperationPositioningOffTheBottomDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOscillationAnglesDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOperationTFOrientationDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOperationSwitchPumpDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanSwitchingOffThePumpDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOperationSwitchingToTheModeDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanDrillTestDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanShockTestDto>>();
|
||||
|
@ -2,13 +2,13 @@ using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
|
||||
|
||||
public class ProcessMapPlanOperationSwitchPumpTemplate : ITemplateParameters
|
||||
public class ProcessMapPlanSwitchingOffThePumpTemplate : ITemplateParameters
|
||||
{
|
||||
public string SheetName => "Выключение насоса";
|
||||
|
||||
public int HeaderRowsCount => 2;
|
||||
|
||||
public string FileName => "ProcessMapPlanOperationSwitchPumpTemplate.xlsx";
|
||||
public string FileName => "ProcessMapPlanSwitchingOffThePumpTemplate.xlsx";
|
||||
|
||||
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
|
||||
{
|
@ -10,16 +10,16 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
|
||||
|
||||
public class ProcessMapPlanOperationSwitchPumpExportService : ProcessMapPlanExportService<ProcessMapPlanOperationSwitchPumpDto>
|
||||
public class ProcessMapPlanSwitchingOffThePumpExportService : ProcessMapPlanExportService<ProcessMapPlanSwitchingOffThePumpDto>
|
||||
{
|
||||
public ProcessMapPlanOperationSwitchPumpExportService(
|
||||
IChangeLogRepository<ProcessMapPlanOperationSwitchPumpDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
||||
public ProcessMapPlanSwitchingOffThePumpExportService(
|
||||
IChangeLogRepository<ProcessMapPlanSwitchingOffThePumpDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
||||
IWellService wellService)
|
||||
: base(processMapPlanRepository, wellService)
|
||||
{
|
||||
}
|
||||
|
||||
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanOperationSwitchPumpTemplate();
|
||||
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanSwitchingOffThePumpTemplate();
|
||||
|
||||
protected override async Task<string> BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token)
|
||||
{
|
@ -9,16 +9,16 @@ using AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemp
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
|
||||
|
||||
public class ProcessMapPlanOperationSwitchPumpParser : ProcessMapPlanParser<ProcessMapPlanOperationSwitchPumpDto>
|
||||
public class ProcessMapPlanSwitchingOffThePumpParser : ProcessMapPlanParser<ProcessMapPlanSwitchingOffThePumpDto>
|
||||
{
|
||||
public ProcessMapPlanOperationSwitchPumpParser(IWellOperationRepository wellOperationRepository)
|
||||
public ProcessMapPlanSwitchingOffThePumpParser(IWellOperationRepository wellOperationRepository)
|
||||
: base(wellOperationRepository)
|
||||
{
|
||||
}
|
||||
|
||||
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanOperationSwitchPumpTemplate();
|
||||
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanSwitchingOffThePumpTemplate();
|
||||
|
||||
protected override ProcessMapPlanOperationSwitchPumpDto BuildDto(IDictionary<string, object?> row, int rowNumber)
|
||||
protected override ProcessMapPlanSwitchingOffThePumpDto BuildDto(IDictionary<string, object?> row, int rowNumber)
|
||||
{
|
||||
var dto = base.BuildDto(row, rowNumber);
|
||||
|
@ -15,13 +15,13 @@ namespace AsbCloudWebApi.Controllers.ProcessMaps;
|
||||
/// <summary>
|
||||
/// РТК план выключение насоса
|
||||
/// </summary>
|
||||
public class ProcessMapPlanOperationSwitchPumpControllerTest :
|
||||
ProcessMapPlanBaseControllerTest<ProcessMapPlanOperationSwitchPump, ProcessMapPlanOperationSwitchPumpDto>
|
||||
public class ProcessMapPlanSwitchingOffThePumpControllerTest :
|
||||
ProcessMapPlanBaseControllerTest<ProcessMapPlanSwitchingOffThePump, ProcessMapPlanSwitchingOffThePumpDto>
|
||||
{
|
||||
public ProcessMapPlanOperationSwitchPumpControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanOperationSwitchPump")
|
||||
public ProcessMapPlanSwitchingOffThePumpControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanOperationSwitchPump")
|
||||
{
|
||||
}
|
||||
private readonly ProcessMapPlanOperationSwitchPumpDto dto = new ProcessMapPlanOperationSwitchPumpDto()
|
||||
private readonly ProcessMapPlanSwitchingOffThePumpDto dto = new ProcessMapPlanSwitchingOffThePumpDto()
|
||||
{
|
||||
IdWell = 1,
|
||||
DepthStart = 1,
|
||||
@ -32,7 +32,7 @@ public class ProcessMapPlanOperationSwitchPumpControllerTest :
|
||||
ResidualPressureLimit = 1,
|
||||
};
|
||||
|
||||
private readonly ProcessMapPlanOperationSwitchPump entity = new ProcessMapPlanOperationSwitchPump()
|
||||
private readonly ProcessMapPlanSwitchingOffThePump entity = new ProcessMapPlanSwitchingOffThePump()
|
||||
{
|
||||
IdWell = 1,
|
||||
DepthEnd = 10,
|
||||
@ -52,17 +52,17 @@ public class ProcessMapPlanOperationSwitchPumpControllerTest :
|
||||
await Get(entity, dto);
|
||||
}
|
||||
|
||||
protected override ProcessMapPlanOperationSwitchPump GetByNote(DbSet<ProcessMapPlanOperationSwitchPump> dbSet, ProcessMapPlanOperationSwitchPumpDto dto)
|
||||
protected override ProcessMapPlanSwitchingOffThePump GetByNote(DbSet<ProcessMapPlanSwitchingOffThePump> dbSet, ProcessMapPlanSwitchingOffThePumpDto dto)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override ProcessMapPlanOperationSwitchPumpDto GetByNote(IEnumerable<ProcessMapPlanOperationSwitchPumpDto> dtos, ProcessMapPlanOperationSwitchPumpDto dto)
|
||||
protected override ProcessMapPlanSwitchingOffThePumpDto GetByNote(IEnumerable<ProcessMapPlanSwitchingOffThePumpDto> dtos, ProcessMapPlanSwitchingOffThePumpDto dto)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override ProcessMapPlanOperationSwitchPump? GetByWellId()
|
||||
protected override ProcessMapPlanSwitchingOffThePump? GetByWellId()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
@ -11,15 +11,15 @@ namespace AsbCloudWebApi.Controllers.ProcessMaps;
|
||||
/// <summary>
|
||||
/// РТК план выключение насоса
|
||||
/// </summary>
|
||||
public class ProcessMapPlanOperationSwitchPumpController :
|
||||
ProcessMapPlanBaseController<ProcessMapPlanOperationSwitchPump, ProcessMapPlanOperationSwitchPumpDto>
|
||||
public class ProcessMapPlanSwitchingOffThePumpController :
|
||||
ProcessMapPlanBaseController<ProcessMapPlanSwitchingOffThePump, ProcessMapPlanSwitchingOffThePumpDto>
|
||||
{
|
||||
public ProcessMapPlanOperationSwitchPumpController(
|
||||
IChangeLogRepository<ProcessMapPlanOperationSwitchPumpDto, ProcessMapPlanBaseRequestWithWell> repository,
|
||||
public ProcessMapPlanSwitchingOffThePumpController(
|
||||
IChangeLogRepository<ProcessMapPlanSwitchingOffThePumpDto, ProcessMapPlanBaseRequestWithWell> repository,
|
||||
IWellService wellService,
|
||||
ProcessMapPlanOperationSwitchPumpParser parserService,
|
||||
ProcessMapPlanSwitchingOffThePumpParser parserService,
|
||||
ITelemetryService telemetryService,
|
||||
ProcessMapPlanOperationSwitchPumpExportService processMapPlanExportService)
|
||||
ProcessMapPlanSwitchingOffThePumpExportService processMapPlanExportService)
|
||||
: base(repository, wellService, parserService, processMapPlanExportService, telemetryService)
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue
Block a user