Обновление холостого хода

This commit is contained in:
Olga Nemt 2024-06-29 21:16:32 +05:00
parent cf1f8f305b
commit 9fac4edaf6
11 changed files with 67 additions and 60 deletions

View File

@ -0,0 +1,27 @@
using System.ComponentModel.DataAnnotations;
namespace AsbCloudApp.Data.ProcessMaps;
/// <summary>
/// РТК план противоаварийное вращение
/// </summary>
public class ProcessMapPlanAntiCrashRotationDto : ProcessMapPlanBaseDto
{
/// <summary>
/// Минимальные обороты ВСП, об/мин
/// </summary>
[Range(0.0, 250.0, ErrorMessage = "Минимальные обороты ВСП, об/мин., должно быть в пределах от 0 до 250")]
public double TopDriveRpmMin { get; set; }
/// <summary>
/// Минимальный расход для запуска оборотов ВСП, л/сек
/// </summary>
[Range(0.0, 100.0, ErrorMessage = "Минимальный расход для запуска оборотов ВСП, л/сек., должно быть в пределах от 0 до 100")]
public double TopDriveStartMinFlowRate { get; set; }
/// <summary>
/// Максимально допустимый момент на ВСП при противоаварийном вращении, кН*м
/// </summary>
[Range(1.0, 35.0, ErrorMessage = "Максимально допустимый момент на ВСП при противоаварийном вращении, кН*м., должно быть в пределах от 1 до 35")]
public double TopDriveTorqueMax { get; set; }
}

View File

@ -1,20 +0,0 @@
using System.ComponentModel.DataAnnotations;
namespace AsbCloudApp.Data.ProcessMaps;
/// <summary>
/// РТК план обновление холостого хода
/// </summary>
public class ProcessMapPlanFunctionsUpgradeNoloadDto : ProcessMapPlanBaseDto
{
/// <summary>
/// СПУСК ОК Да/Нет
/// </summary>
public bool IdDeclineSocketColumn { get; set; }
/// <summary>
/// Примечание
/// </summary>
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
public string Note { get; set; } = string.Empty;
}

View File

@ -36,7 +36,7 @@ namespace AsbCloudDb.Model
public virtual DbSet<ProcessMapPlanFunctionsDamper> ProcessMapPlanFunctionsDamper => Set<ProcessMapPlanFunctionsDamper>();
public virtual DbSet<ProcessMapPlanFunctionsAutoHold> ProcessMapPlanFunctionsAutoHold => Set<ProcessMapPlanFunctionsAutoHold>();
public virtual DbSet<ProcessMapPlanFunctionsJarrDrillTool> ProcessMapPlanFunctionsJarrDrillTool => Set<ProcessMapPlanFunctionsJarrDrillTool>();
public virtual DbSet<ProcessMapPlanFunctionsUpgradeNoload> ProcessMapPlanFunctionsUpgradeNoload => Set<ProcessMapPlanFunctionsUpgradeNoload>();
public virtual DbSet<ProcessMapPlanUpdatingNoloadParameters> ProcessMapPlanFunctionsUpgradeNoload => Set<ProcessMapPlanUpdatingNoloadParameters>();
public virtual DbSet<ProcessMapPlanFunctionsOscillation> ProcessMapPlanFunctionsOscillation => Set<ProcessMapPlanFunctionsOscillation>();
public virtual DbSet<ProcessMapPlanAntiCrashRotation> ProcessMapPlanFunctionsAnticrashRotation => Set<ProcessMapPlanAntiCrashRotation>();
public virtual DbSet<ProcessMapPlanFunctionsStaticMeasure> ProcessMapPlanFunctionsStaticMeasure => Set<ProcessMapPlanFunctionsStaticMeasure>();
@ -543,7 +543,7 @@ namespace AsbCloudDb.Model
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
modelBuilder.Entity<ProcessMapPlanFunctionsUpgradeNoload>()
modelBuilder.Entity<ProcessMapPlanUpdatingNoloadParameters>()
.HasOne(p => p.Author)
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
@ -643,7 +643,7 @@ namespace AsbCloudDb.Model
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
modelBuilder.Entity<ProcessMapPlanFunctionsUpgradeNoload>()
modelBuilder.Entity<ProcessMapPlanUpdatingNoloadParameters>()
.HasOne(p => p.Editor)
.WithMany()
.OnDelete(DeleteBehavior.Restrict);

View File

@ -97,7 +97,7 @@ namespace AsbCloudDb.Model
DbSet<ProcessMapPlanFunctionsDamper> ProcessMapPlanFunctionsDamper { get; }
DbSet<ProcessMapPlanFunctionsAutoHold> ProcessMapPlanFunctionsAutoHold { get; }
DbSet<ProcessMapPlanFunctionsJarrDrillTool> ProcessMapPlanFunctionsJarrDrillTool { get; }
DbSet<ProcessMapPlanFunctionsUpgradeNoload> ProcessMapPlanFunctionsUpgradeNoload { get; }
DbSet<ProcessMapPlanUpdatingNoloadParameters> ProcessMapPlanFunctionsUpgradeNoload { get; }
DbSet<ProcessMapPlanFunctionsOscillation> ProcessMapPlanFunctionsOscillation { get; }
DbSet<ProcessMapPlanAntiCrashRotation> ProcessMapPlanFunctionsAnticrashRotation { get; }
DbSet<ProcessMapPlanFunctionsStaticMeasure> ProcessMapPlanFunctionsStaticMeasure { get; }

View File

@ -5,8 +5,8 @@ using Microsoft.EntityFrameworkCore;
namespace AsbCloudDb.Model.ProcessMaps;
[Table("t_process_map_plan_functions_upgrade_no_load"), Comment("Обновление холостого хода")]
public class ProcessMapPlanFunctionsUpgradeNoload : ProcessMapPlanBase
[Table("t_process_map_plan_updating_noload_parameters"), Comment("Обновление холостого хода")]
public class ProcessMapPlanUpdatingNoloadParameters : ProcessMapPlanBase
{
[Column("id_decline_socket_column"), Comment("СПУСК ОК Да/Нет")]
public bool IdDeclineSocketColumn { get; set; }
@ -15,5 +15,5 @@ public class ProcessMapPlanFunctionsUpgradeNoload : ProcessMapPlanBase
public string Note { get; set; } = string.Empty;
[ForeignKey(nameof(IdPrevious))]
public virtual ProcessMapPlanFunctionsUpgradeNoload? Previous { get; set; }
public virtual ProcessMapPlanUpdatingNoloadParameters? Previous { get; set; }
}

View File

@ -244,11 +244,11 @@ namespace AsbCloudInfrastructure
Item = src.Adapt<ProcessMapPlanFunctionsJarrDrillToolDto>()
});
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanFunctionsUpgradeNoloadDto>>.NewConfig()
.Include<ProcessMapPlanFunctionsUpgradeNoload, ChangeLogDto<ProcessMapPlanFunctionsUpgradeNoloadDto>>()
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanFunctionsUpgradeNoloadDto>()
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanUpdatingNoloadParametersDto>>.NewConfig()
.Include<ProcessMapPlanUpdatingNoloadParameters, ChangeLogDto<ProcessMapPlanUpdatingNoloadParametersDto>>()
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanUpdatingNoloadParametersDto>()
{
Item = src.Adapt<ProcessMapPlanFunctionsUpgradeNoloadDto>()
Item = src.Adapt<ProcessMapPlanUpdatingNoloadParametersDto>()
});
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanFunctionsOscillationDto>>.NewConfig()
@ -443,7 +443,7 @@ namespace AsbCloudInfrastructure
services.AddTransient<ProcessMapPlanFunctionsDamperParser>();
services.AddTransient<ProcessMapPlanFunctionsAutoHoldParser>();
services.AddTransient<ProcessMapPlanFunctionsJarrDrillToolParser>();
services.AddTransient<ProcessMapPlanFunctionsUpgradeNoloadParser>();
services.AddTransient<ProcessMapPlanUpdatingNoloadParametersParser>();
services.AddTransient<ProcessMapPlanFunctionsOscillationParser>();
services.AddTransient<ProcessMapPlanAntiCrashRotationParser>();
services.AddTransient<ProcessMapPlanFunctionsStaticMeasureParser>();
@ -469,7 +469,7 @@ namespace AsbCloudInfrastructure
services.AddTransient<ProcessMapPlanFunctionsDamperExportService>();
services.AddTransient<ProcessMapPlanFunctionsAutoHoldExportService>();
services.AddTransient<ProcessMapPlanFunctionsJarrDrillToolExportService>();
services.AddTransient<ProcessMapPlanFunctionsUpgradeNoloadExportService>();
services.AddTransient<ProcessMapPlanUpdatingNoloadParametersExportService>();
services.AddTransient<ProcessMapPlanFunctionsOscillationExportService>();
services.AddTransient<ProcessMapPlanAntiCrashRotationExportService>();
services.AddTransient<ProcessMapPlanFunctionsStaticMeasureExportService>();
@ -551,8 +551,8 @@ namespace AsbCloudInfrastructure
ProcessMapPlanBaseRepository<ProcessMapPlanFunctionsJarrDrillTool, ProcessMapPlanFunctionsJarrDrillToolDto>>();
services.AddTransient<
IChangeLogRepository<ProcessMapPlanFunctionsUpgradeNoloadDto, ProcessMapPlanBaseRequestWithWell>,
ProcessMapPlanBaseRepository<ProcessMapPlanFunctionsUpgradeNoload, ProcessMapPlanFunctionsUpgradeNoloadDto>>();
IChangeLogRepository<ProcessMapPlanUpdatingNoloadParametersDto, ProcessMapPlanBaseRequestWithWell>,
ProcessMapPlanBaseRepository<ProcessMapPlanUpdatingNoloadParameters, ProcessMapPlanUpdatingNoloadParametersDto>>();
services.AddTransient<
IChangeLogRepository<ProcessMapPlanFunctionsOscillationDto, ProcessMapPlanBaseRequestWithWell>,
@ -582,7 +582,7 @@ namespace AsbCloudInfrastructure
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsDamperDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsAutoHoldDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsJarrDrillToolDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsUpgradeNoloadDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanUpdatingNoloadParametersDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsOscillationDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanAntiCrashRotationDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsStaticMeasureDto>>();

View File

@ -2,13 +2,13 @@ using System.Collections.Generic;
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
public class ProcessMapPlanFunctionsUpgradeNoloadTemplate : ITemplateParameters
public class ProcessMapPlanUpdatingNoloadParametersTemplate : ITemplateParameters
{
public string SheetName => "Обновление холостого хода";
public int HeaderRowsCount => 2;
public string FileName => "ProcessMapPlanFunctionsUpgradeNoloadTemplate.xlsx";
public string FileName => "ProcessMapPlanUpdatingNoloadParametersTemplate.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 ProcessMapPlanFunctionsUpgradeNoloadExportService : ProcessMapPlanExportService<ProcessMapPlanFunctionsUpgradeNoloadDto>
public class ProcessMapPlanUpdatingNoloadParametersExportService : ProcessMapPlanExportService<ProcessMapPlanUpdatingNoloadParametersDto>
{
public ProcessMapPlanFunctionsUpgradeNoloadExportService(
IChangeLogRepository<ProcessMapPlanFunctionsUpgradeNoloadDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
public ProcessMapPlanUpdatingNoloadParametersExportService(
IChangeLogRepository<ProcessMapPlanUpdatingNoloadParametersDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
IWellService wellService)
: base(processMapPlanRepository, wellService)
{
}
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanFunctionsUpgradeNoloadTemplate();
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanUpdatingNoloadParametersTemplate();
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 ProcessMapPlanFunctionsUpgradeNoloadParser : ProcessMapPlanParser<ProcessMapPlanFunctionsUpgradeNoloadDto>
public class ProcessMapPlanUpdatingNoloadParametersParser : ProcessMapPlanParser<ProcessMapPlanUpdatingNoloadParametersDto>
{
public ProcessMapPlanFunctionsUpgradeNoloadParser(IWellOperationRepository wellOperationRepository)
public ProcessMapPlanUpdatingNoloadParametersParser(IWellOperationRepository wellOperationRepository)
: base(wellOperationRepository)
{
}
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanFunctionsUpgradeNoloadTemplate();
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanUpdatingNoloadParametersTemplate();
protected override ProcessMapPlanFunctionsUpgradeNoloadDto BuildDto(IDictionary<string, object?> row, int rowNumber)
protected override ProcessMapPlanUpdatingNoloadParametersDto BuildDto(IDictionary<string, object?> row, int rowNumber)
{
var dto = base.BuildDto(row, rowNumber);

View File

@ -15,13 +15,13 @@ namespace AsbCloudWebApi.Controllers.ProcessMaps;
/// <summary>
/// РТК план обновление холостого хода
/// </summary>
public class ProcessMapPlanFunctionsUpgradeNoloadControllerTest :
ProcessMapPlanBaseControllerTest<ProcessMapPlanFunctionsUpgradeNoload, ProcessMapPlanFunctionsUpgradeNoloadDto>
public class ProcessMapPlanUpdatingNoloadParametersControllerTest :
ProcessMapPlanBaseControllerTest<ProcessMapPlanUpdatingNoloadParameters, ProcessMapPlanUpdatingNoloadParametersDto>
{
public ProcessMapPlanFunctionsUpgradeNoloadControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanFunctionsUpgradeNoload")
public ProcessMapPlanUpdatingNoloadParametersControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanFunctionsUpgradeNoload")
{
}
private readonly ProcessMapPlanFunctionsUpgradeNoloadDto dto = new ProcessMapPlanFunctionsUpgradeNoloadDto()
private readonly ProcessMapPlanUpdatingNoloadParametersDto dto = new ProcessMapPlanUpdatingNoloadParametersDto()
{
IdWell = 1,
DepthStart = 1,
@ -32,7 +32,7 @@ public class ProcessMapPlanFunctionsUpgradeNoloadControllerTest :
Note = "1"
};
private readonly ProcessMapPlanFunctionsUpgradeNoload entity = new ProcessMapPlanFunctionsUpgradeNoload()
private readonly ProcessMapPlanUpdatingNoloadParameters entity = new ProcessMapPlanUpdatingNoloadParameters()
{
IdWell = 1,
DepthEnd = 10,
@ -52,17 +52,17 @@ public class ProcessMapPlanFunctionsUpgradeNoloadControllerTest :
await Get(entity, dto);
}
protected override ProcessMapPlanFunctionsUpgradeNoload GetByNote(DbSet<ProcessMapPlanFunctionsUpgradeNoload> dbSet, ProcessMapPlanFunctionsUpgradeNoloadDto dto)
protected override ProcessMapPlanUpdatingNoloadParameters GetByNote(DbSet<ProcessMapPlanUpdatingNoloadParameters> dbSet, ProcessMapPlanUpdatingNoloadParametersDto dto)
{
throw new NotImplementedException();
}
protected override ProcessMapPlanFunctionsUpgradeNoloadDto GetByNote(IEnumerable<ProcessMapPlanFunctionsUpgradeNoloadDto> dtos, ProcessMapPlanFunctionsUpgradeNoloadDto dto)
protected override ProcessMapPlanUpdatingNoloadParametersDto GetByNote(IEnumerable<ProcessMapPlanUpdatingNoloadParametersDto> dtos, ProcessMapPlanUpdatingNoloadParametersDto dto)
{
throw new NotImplementedException();
}
protected override ProcessMapPlanFunctionsUpgradeNoload? GetByWellId()
protected override ProcessMapPlanUpdatingNoloadParameters? GetByWellId()
{
throw new NotImplementedException();
}

View File

@ -11,15 +11,15 @@ namespace AsbCloudWebApi.Controllers.ProcessMaps;
/// <summary>
/// РТК план обновление холостого хода
/// </summary>
public class ProcessMapPlanFunctionsUpgradeNoloadController :
ProcessMapPlanBaseController<ProcessMapPlanFunctionsUpgradeNoload, ProcessMapPlanFunctionsUpgradeNoloadDto>
public class ProcessMapPlanUpdatingNoloadParametersController :
ProcessMapPlanBaseController<ProcessMapPlanUpdatingNoloadParameters, ProcessMapPlanUpdatingNoloadParametersDto>
{
public ProcessMapPlanFunctionsUpgradeNoloadController(
IChangeLogRepository<ProcessMapPlanFunctionsUpgradeNoloadDto, ProcessMapPlanBaseRequestWithWell> repository,
public ProcessMapPlanUpdatingNoloadParametersController(
IChangeLogRepository<ProcessMapPlanUpdatingNoloadParametersDto, ProcessMapPlanBaseRequestWithWell> repository,
IWellService wellService,
ProcessMapPlanFunctionsUpgradeNoloadParser parserService,
ProcessMapPlanUpdatingNoloadParametersParser parserService,
ITelemetryService telemetryService,
ProcessMapPlanFunctionsUpgradeNoloadExportService processMapPlanExportService)
ProcessMapPlanUpdatingNoloadParametersExportService processMapPlanExportService)
: base(repository, wellService, parserService, processMapPlanExportService, telemetryService)
{
}