diff --git a/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanLoadCapacityDto.cs b/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanLoadCapacityDto.cs
new file mode 100644
index 00000000..55be2bb1
--- /dev/null
+++ b/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanLoadCapacityDto.cs
@@ -0,0 +1,35 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace AsbCloudApp.Data.ProcessMaps;
+
+///
+/// РТК план выработка нагрузки
+///
+public class ProcessMapPlanLoadCapacityDto : ProcessMapPlanBaseDto
+{
+ ///
+ /// Время выработки минимальное, сек
+ ///
+ [Range(0.0, 800.0, ErrorMessage = "Время выработки минимальное, сек., должно быть в пределах от 0 до 800")]
+ public double TimeLoadCapacityMin { get; set; }
+
+ ///
+ /// Перепад давления минимальный, атм
+ ///
+ [Range(0.1, 400.0, ErrorMessage = "Перепад давления минимальный, атм., должно быть в пределах от 0.1 до 400")]
+ public double DifferentialPressureMin { get; set; }
+
+ ///
+ /// Нагрузка минимальная, т
+ ///
+ [Range(0.1, 99.0, ErrorMessage = "Нагрузка минимальная, т, должно быть в пределах от 0.1 до 99")]
+ public double WeightOnBitMin { get; set; }
+
+ ///
+ /// Примечание
+ ///
+ [StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
+ public string Note { get; set; } = string.Empty;
+
+
+}
\ No newline at end of file
diff --git a/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanOperationSwitchingToTheModeDto.cs b/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanOperationSwitchingToTheModeDto.cs
deleted file mode 100644
index 7351afdc..00000000
--- a/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanOperationSwitchingToTheModeDto.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace AsbCloudApp.Data.ProcessMaps;
-
-///
-/// РТК план выход на плановый расход
-///
-public class ProcessMapPlanOperationSwitchingToTheModeDto : ProcessMapPlanBaseDto
-{
- ///
- /// Время выхода буровых насосов на плановый расход, сек.
- ///
- [Range(0.0, 3600.0, ErrorMessage = "Время выхода буровых насосов на плановый расход, сек., должно быть в пределах от 0 до 3600")]
- public double RampTime { get; set; }
-
- ///
- /// Расход, л/с
- ///
- [Range(0.0, 100.0, ErrorMessage = "Расход, л/с., должно быть в пределах от 0 до 100")]
- public double FlowRate { get; set; }
-
- ///
- /// Максимально допустимое давление, атм.
- ///
- [Range(0.0, 400.0, ErrorMessage = "Максимально допустимое давление, атм., должно быть в пределах от 0 до 400")]
- public double PressureMax { get; set; }
-
- ///
- /// Примечание
- ///
- [StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
- public string Note { get; set; } = string.Empty;
-}
\ No newline at end of file
diff --git a/AsbCloudDb/Model/AsbCloudDbContext.cs b/AsbCloudDb/Model/AsbCloudDbContext.cs
index 8e0fae1b..d762f7cc 100644
--- a/AsbCloudDb/Model/AsbCloudDbContext.cs
+++ b/AsbCloudDb/Model/AsbCloudDbContext.cs
@@ -30,7 +30,7 @@ namespace AsbCloudDb.Model
public virtual DbSet ProcessMapPlanOperationDeterminationOfOscillationAngles => Set();
public virtual DbSet ProcessMapPlanOperationTFOrientation => Set();
public virtual DbSet ProcessMapPlanOperationSwitchPump => Set();
- public virtual DbSet ProcessMapPlanOperationSwitchMode => Set();
+ public virtual DbSet ProcessMapPlanOperationSwitchMode => Set();
public virtual DbSet ProcessMapPlanFunctionsDrillTest => Set();
public virtual DbSet ProcessMapPlanFunctionsShockTest => Set();
public virtual DbSet ProcessMapPlanFunctionsDamper => Set();
@@ -513,7 +513,7 @@ namespace AsbCloudDb.Model
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
- modelBuilder.Entity()
+ modelBuilder.Entity()
.HasOne(p => p.Author)
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
@@ -613,7 +613,7 @@ namespace AsbCloudDb.Model
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
- modelBuilder.Entity()
+ modelBuilder.Entity()
.HasOne(p => p.Editor)
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
diff --git a/AsbCloudDb/Model/IAsbCloudDbContext.cs b/AsbCloudDb/Model/IAsbCloudDbContext.cs
index 54ee4c6d..e5ba56de 100644
--- a/AsbCloudDb/Model/IAsbCloudDbContext.cs
+++ b/AsbCloudDb/Model/IAsbCloudDbContext.cs
@@ -91,7 +91,7 @@ namespace AsbCloudDb.Model
DbSet ProcessMapPlanOperationDeterminationOfOscillationAngles { get; }
DbSet ProcessMapPlanOperationTFOrientation { get; }
DbSet ProcessMapPlanOperationSwitchPump { get; }
- DbSet ProcessMapPlanOperationSwitchMode { get; }
+ DbSet ProcessMapPlanOperationSwitchMode { get; }
DbSet ProcessMapPlanFunctionsDrillTest { get; }
DbSet ProcessMapPlanFunctionsShockTest { get; }
DbSet ProcessMapPlanFunctionsDamper { get; }
diff --git a/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanOperationSwitchingToTheMode.cs b/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanSwitchingToTheMode.cs
similarity index 81%
rename from AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanOperationSwitchingToTheMode.cs
rename to AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanSwitchingToTheMode.cs
index 00572092..94baf32a 100644
--- a/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanOperationSwitchingToTheMode.cs
+++ b/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanSwitchingToTheMode.cs
@@ -5,8 +5,8 @@ using Microsoft.EntityFrameworkCore;
namespace AsbCloudDb.Model.ProcessMaps;
-[Table("t_process_map_plan_operation_switch_mode"), Comment("Выход на плановый расход")]
-public class ProcessMapPlanOperationSwitchingToTheMode : ProcessMapPlanBase
+[Table("t_process_map_plan_switching_to_the_mode"), Comment("Выход на плановый расход")]
+public class ProcessMapPlanSwitchingToTheMode : ProcessMapPlanBase
{
[Column("ramp_time"), Comment("Время выхода буровых насосов на плановый расход, сек.")]
[Range(0.0, 3600.0)]
@@ -28,5 +28,5 @@ public class ProcessMapPlanOperationSwitchingToTheMode : ProcessMapPlanBase
public string Note { get; set; } = string.Empty;
[ForeignKey(nameof(IdPrevious))]
- public virtual ProcessMapPlanOperationSwitchingToTheMode? Previous { get; set; }
+ public virtual ProcessMapPlanSwitchingToTheMode? Previous { get; set; }
}
\ No newline at end of file
diff --git a/AsbCloudInfrastructure/DependencyInjection.cs b/AsbCloudInfrastructure/DependencyInjection.cs
index 652c5d3c..f1b7dc6a 100644
--- a/AsbCloudInfrastructure/DependencyInjection.cs
+++ b/AsbCloudInfrastructure/DependencyInjection.cs
@@ -202,22 +202,22 @@ namespace AsbCloudInfrastructure
Item = src.Adapt()
});
- TypeAdapterConfig>.NewConfig()
- .Include>()
- .Map(dest => dest, src => new ChangeLogDto()
+ TypeAdapterConfig>.NewConfig()
+ .Include>()
+ .Map(dest => dest, src => new ChangeLogDto()
{
- Item = src.Adapt()
+ Item = src.Adapt()
});
TypeAdapterConfig>.NewConfig()
- .Include>()
+ .Include>()
.Map(dest => dest, src => new ChangeLogDto()
{
Item = src.Adapt()
});
TypeAdapterConfig>.NewConfig()
- .Include>()
+ .Include>()
.Map(dest => dest, src => new ChangeLogDto()
{
Item = src.Adapt()
@@ -437,7 +437,7 @@ namespace AsbCloudInfrastructure
services.AddTransient();
services.AddTransient();
services.AddTransient();
- services.AddTransient();
+ services.AddTransient();
services.AddTransient();
services.AddTransient();
services.AddTransient();
@@ -463,7 +463,7 @@ namespace AsbCloudInfrastructure
services.AddTransient();
services.AddTransient();
services.AddTransient();
- services.AddTransient();
+ services.AddTransient();
services.AddTransient();
services.AddTransient();
services.AddTransient();
@@ -527,8 +527,8 @@ namespace AsbCloudInfrastructure
ProcessMapPlanBaseRepository>();
services.AddTransient<
- IChangeLogRepository,
- ProcessMapPlanBaseRepository>();
+ IChangeLogRepository,
+ ProcessMapPlanBaseRepository>();
services.AddTransient<
IChangeLogRepository,
@@ -576,7 +576,7 @@ namespace AsbCloudInfrastructure
services.AddTransient>();
services.AddTransient>();
services.AddTransient>();
- services.AddTransient>();
+ services.AddTransient>();
services.AddTransient>();
services.AddTransient>();
services.AddTransient>();
diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanOperationSwitchingToTheModeTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanSwitchingToTheModeTemplate.cs
similarity index 66%
rename from AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanOperationSwitchingToTheModeTemplate.cs
rename to AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanSwitchingToTheModeTemplate.cs
index 5eb370ce..ca53ad59 100644
--- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanOperationSwitchingToTheModeTemplate.cs
+++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanSwitchingToTheModeTemplate.cs
@@ -2,13 +2,13 @@ using System.Collections.Generic;
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
-public class ProcessMapPlanOperationSwitchingToTheModeTemplate : ITemplateParameters
+public class ProcessMapPlanSwitchingToTheModeTemplate : ITemplateParameters
{
public string SheetName => "Выход на плановый расход";
public int HeaderRowsCount => 2;
- public string FileName => "ProcessMapPlanOperationSwitchingToTheModeTemplate.xlsx";
+ public string FileName => "ProcessMapPlanSwitchingToTheModeTemplate.xlsx";
public IDictionary Cells => new Dictionary
{
diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanOperationSwitchingToTheModeExportService.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanSwitchingToTheModeExportService.cs
similarity index 69%
rename from AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanOperationSwitchingToTheModeExportService.cs
rename to AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanSwitchingToTheModeExportService.cs
index 249af1c4..a44c1dfe 100644
--- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanOperationSwitchingToTheModeExportService.cs
+++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanSwitchingToTheModeExportService.cs
@@ -10,16 +10,16 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
-public class ProcessMapPlanOperationSwitchingToTheModeExportService : ProcessMapPlanExportService
+public class ProcessMapPlanSwitchingToTheModeExportService : ProcessMapPlanExportService
{
- public ProcessMapPlanOperationSwitchingToTheModeExportService(
- IChangeLogRepository processMapPlanRepository,
+ public ProcessMapPlanSwitchingToTheModeExportService(
+ IChangeLogRepository processMapPlanRepository,
IWellService wellService)
: base(processMapPlanRepository, wellService)
{
}
- protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanOperationSwitchingToTheModeTemplate();
+ protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanSwitchingToTheModeTemplate();
protected override async Task BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token)
{
diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanOperationSwitchingToTheModeParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSwitchingToTheModeParser.cs
similarity index 71%
rename from AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanOperationSwitchingToTheModeParser.cs
rename to AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSwitchingToTheModeParser.cs
index 2a5e7800..f301a892 100644
--- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanOperationSwitchingToTheModeParser.cs
+++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSwitchingToTheModeParser.cs
@@ -9,16 +9,16 @@ using AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemp
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
-public class ProcessMapPlanOperationSwitchingToTheModeParser : ProcessMapPlanParser
+public class ProcessMapPlanSwitchingToTheModeParser : ProcessMapPlanParser
{
- public ProcessMapPlanOperationSwitchingToTheModeParser(IWellOperationRepository wellOperationRepository)
+ public ProcessMapPlanSwitchingToTheModeParser(IWellOperationRepository wellOperationRepository)
: base(wellOperationRepository)
{
}
- protected override ITemplateParameters TemplateParameters => new ProcessMapPlanOperationSwitchingToTheModeTemplate();
+ protected override ITemplateParameters TemplateParameters => new ProcessMapPlanSwitchingToTheModeTemplate();
- protected override ProcessMapPlanOperationSwitchingToTheModeDto BuildDto(IDictionary row, int rowNumber)
+ protected override ProcessMapPlanSwitchingToTheModeDto BuildDto(IDictionary row, int rowNumber)
{
var dto = base.BuildDto(row, rowNumber);
diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSwitchingToTheModeControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSwitchingToTheModeControllerTest.cs
new file mode 100644
index 00000000..fc9108ce
--- /dev/null
+++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSwitchingToTheModeControllerTest.cs
@@ -0,0 +1,60 @@
+using AsbCloudApp.Data.ProcessMaps;
+using AsbCloudDb.Model.ProcessMaps;
+using AsbCloudWebApi.IntegrationTests;
+using AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan;
+using Microsoft.EntityFrameworkCore;
+using Xunit;
+
+namespace AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan.Operations;
+
+///
+/// РТК план выход на плановый расход
+///
+public class ProcessMapPlanSwitchingToTheModeControllerTest :
+ ProcessMapPlanBaseControllerTest
+{
+ public ProcessMapPlanSwitchingToTheModeControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanOperationSwitchingToTheMode")
+ {
+ }
+ private readonly ProcessMapPlanSwitchingToTheModeDto dto = new ProcessMapPlanSwitchingToTheModeDto()
+ {
+ IdWell = 1,
+ DepthStart = 1,
+ DepthEnd = 2,
+ Id = 0,
+ IdWellSectionType = 1,
+ };
+
+ private readonly ProcessMapPlanSwitchingToTheMode entity = new ProcessMapPlanSwitchingToTheMode()
+ {
+ IdWell = 1,
+ DepthEnd = 10,
+ DepthStart = 2,
+ Id = 0,
+ IdWellSectionType = 1,
+ IdAuthor = 1,
+ IdEditor = 1,
+ Creation = DateTimeOffset.UtcNow,
+ };
+
+ [Fact]
+ public async Task Get_actual_returns_success()
+ {
+ await Get(entity, dto);
+ }
+
+ protected override ProcessMapPlanSwitchingToTheMode GetByNote(DbSet dbSet, ProcessMapPlanSwitchingToTheModeDto dto)
+ {
+ throw new NotImplementedException();
+ }
+
+ protected override ProcessMapPlanSwitchingToTheModeDto GetByNote(IEnumerable dtos, ProcessMapPlanSwitchingToTheModeDto dto)
+ {
+ throw new NotImplementedException();
+ }
+
+ protected override ProcessMapPlanSwitchingToTheMode? GetByWellId()
+ {
+ throw new NotImplementedException();
+ }
+}
\ No newline at end of file
diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanOperationSwitchingToTheModeControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanOperationSwitchingToTheModeControllerTest.cs
deleted file mode 100644
index 278f4e3c..00000000
--- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanOperationSwitchingToTheModeControllerTest.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-using AsbCloudApp.Data.ProcessMaps;
-using AsbCloudDb.Model.ProcessMaps;
-using AsbCloudWebApi.IntegrationTests;
-using AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan;
-using Microsoft.EntityFrameworkCore;
-using Xunit;
-
-namespace AsbCloudWebApi.Controllers.ProcessMaps;
-
-///
-/// РТК план выход на плановый расход
-///
-public class ProcessMapPlanOperationSwitchingToTheModeControllerTest :
- ProcessMapPlanBaseControllerTest
-{
- public ProcessMapPlanOperationSwitchingToTheModeControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanOperationSwitchingToTheMode")
- {
- }
- private readonly ProcessMapPlanOperationSwitchingToTheModeDto dto = new ProcessMapPlanOperationSwitchingToTheModeDto()
- {
- IdWell = 1,
- DepthStart = 1,
- DepthEnd = 2,
- Id = 0,
- IdWellSectionType = 1,
- };
-
- private readonly ProcessMapPlanOperationSwitchingToTheMode entity = new ProcessMapPlanOperationSwitchingToTheMode()
- {
- IdWell = 1,
- DepthEnd = 10,
- DepthStart = 2,
- Id = 0,
- IdWellSectionType = 1,
- IdAuthor = 1,
- IdEditor = 1,
- Creation = DateTimeOffset.UtcNow,
- };
-
- [Fact]
- public async Task Get_actual_returns_success()
- {
- await Get(entity, dto);
- }
-
- protected override ProcessMapPlanOperationSwitchingToTheMode GetByNote(DbSet dbSet, ProcessMapPlanOperationSwitchingToTheModeDto dto)
- {
- throw new NotImplementedException();
- }
-
- protected override ProcessMapPlanOperationSwitchingToTheModeDto GetByNote(IEnumerable dtos, ProcessMapPlanOperationSwitchingToTheModeDto dto)
- {
- throw new NotImplementedException();
- }
-
- protected override ProcessMapPlanOperationSwitchingToTheMode? GetByWellId()
- {
- throw new NotImplementedException();
- }
-}
\ No newline at end of file
diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanOperationSwitchingToTheModeController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSwitchingToTheModeController.cs
similarity index 55%
rename from AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanOperationSwitchingToTheModeController.cs
rename to AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSwitchingToTheModeController.cs
index ada87bf5..8bc88b53 100644
--- a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanOperationSwitchingToTheModeController.cs
+++ b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSwitchingToTheModeController.cs
@@ -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;
///
/// РТК план выход на плановый расход
///
-public class ProcessMapPlanOperationSwitchingToTheModeController :
- ProcessMapPlanBaseController
+public class ProcessMapPlanSwitchingToTheModeController :
+ ProcessMapPlanBaseController
{
- public ProcessMapPlanOperationSwitchingToTheModeController(
- IChangeLogRepository repository,
+ public ProcessMapPlanSwitchingToTheModeController(
+ IChangeLogRepository repository,
IWellService wellService,
- ProcessMapPlanOperationSwitchingToTheModeParser parserService,
+ ProcessMapPlanSwitchingToTheModeParser parserService,
ITelemetryService telemetryService,
- ProcessMapPlanOperationSwitchingToTheModeExportService processMapPlanExportService)
+ ProcessMapPlanSwitchingToTheModeExportService processMapPlanExportService)
: base(repository, wellService, parserService, processMapPlanExportService, telemetryService)
{
}