diff --git a/AsbCloudApp/Data/ProcessMaps/Operations/RotorRpmAccelerationDto.cs b/AsbCloudApp/Data/ProcessMaps/Operations/RotorRpmAccelerationDto.cs deleted file mode 100644 index 9f59ab06..00000000 --- a/AsbCloudApp/Data/ProcessMaps/Operations/RotorRpmAccelerationDto.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace AsbCloudApp.Data.ProcessMaps.Operations; - -/// -/// РТК план выход на обороты перед ротором -/// -public class RotorRpmAccelerationDto : ProcessMapPlanBaseDto -{ - /// - /// Зенитный угол, градусы - /// - [Range(0.0, 100.0, ErrorMessage = "Зенитный угол, градусы, должно быть в пределах от 0 до 100")] - public double ZenithAngle { get; set; } - - /// - /// Складывание, м - /// - [Range(0.0, 20.0, ErrorMessage = "Складывание, м., должно быть в пределах от 0 до 20")] - public double Buckling { get; set; } - - /// - /// Примечание - /// - [StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")] - public string Note { get; set; } = string.Empty; -} \ No newline at end of file diff --git a/AsbCloudInfrastructure/DependencyInjection.cs b/AsbCloudInfrastructure/DependencyInjection.cs index 5c72ef65..db254a7b 100644 --- a/AsbCloudInfrastructure/DependencyInjection.cs +++ b/AsbCloudInfrastructure/DependencyInjection.cs @@ -240,11 +240,11 @@ 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() @@ -410,8 +410,8 @@ namespace AsbCloudInfrastructure ProcessMapPlanBaseRepository>(); services.AddTransient< - IChangeLogRepository, - ProcessMapPlanBaseRepository>(); + IChangeLogRepository, + ProcessMapPlanBaseRepository>(); services.AddTransient< IChangeLogRepository, @@ -498,7 +498,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/ProcessMapPlanAntiCrashRotationTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanAntiCrashRotationTemplate.cs index 18cf79a0..48cbfc9c 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanAntiCrashRotationTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanAntiCrashRotationTemplate.cs @@ -8,7 +8,7 @@ public class ProcessMapPlanAntiCrashRotationTemplate : ITemplateParameters { public string SheetName => "Противоаварийное вращение"; - public int HeaderRowsCount => 2; + public int HeaderRowsCount => 3; public string FileName => "ProcessMapPlanAntiCrashRotationTemplate.xlsx"; diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanLoadCapacityTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanLoadCapacityTemplate.cs index 386aded1..c7a395ef 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanLoadCapacityTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanLoadCapacityTemplate.cs @@ -1,3 +1,5 @@ +using AsbCloudApp.Data.ProcessMaps.Functions; +using AsbCloudApp.Data.ProcessMaps.Operations; using System.Collections.Generic; namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates; @@ -6,12 +8,18 @@ public class ProcessMapPlanLoadCapacityTemplate : ITemplateParameters { public string SheetName => "Выработка нагрузки"; - public int HeaderRowsCount => 2; + public int HeaderRowsCount => 3; public string FileName => "ProcessMapPlanLoadCapacityTemplate.xlsx"; public IDictionary Cells => new Dictionary { - + { nameof(ProcessMapPlanLoadCapacityDto.Section), new Cell(1, typeof(string)) }, + { nameof(ProcessMapPlanLoadCapacityDto.DepthStart), new Cell(2, typeof(double)) }, + { nameof(ProcessMapPlanLoadCapacityDto.DepthEnd), new Cell(3, typeof(double)) }, + { nameof(ProcessMapPlanLoadCapacityDto.TimeLoadCapacityMin), new Cell(4, typeof(double)) }, + { nameof(ProcessMapPlanLoadCapacityDto.DifferentialPressureMin), new Cell(5, typeof(double)) }, + { nameof(ProcessMapPlanLoadCapacityDto.WeightOnBitMin), new Cell(6, typeof(double)) }, + { nameof(ProcessMapPlanLoadCapacityDto.Note), new Cell(7, typeof(string)) }, }; } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanOscillationTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanOscillationTemplate.cs index 6990aa1a..b6d1e595 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanOscillationTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanOscillationTemplate.cs @@ -1,3 +1,4 @@ +using AsbCloudApp.Data.ProcessMaps.Functions; using System.Collections.Generic; namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates; @@ -6,12 +7,21 @@ public class ProcessMapPlanOscillationTemplate : ITemplateParameters { public string SheetName => "Осцилляция"; - public int HeaderRowsCount => 2; + public int HeaderRowsCount => 3; public string FileName => "ProcessMapPlanOscillationTemplate.xlsx"; public IDictionary Cells => new Dictionary { - + { nameof(ProcessMapPlanOscillationDto.Section), new Cell(1, typeof(string)) }, + { nameof(ProcessMapPlanOscillationDto.DepthStart), new Cell(2, typeof(double)) }, + { nameof(ProcessMapPlanOscillationDto.DepthEnd), new Cell(3, typeof(double)) }, + { nameof(ProcessMapPlanOscillationDto.OptimalOscillationAngle), new Cell(4, typeof(double)) }, + { nameof(ProcessMapPlanOscillationDto.RpmRight), new Cell(5, typeof(double)) }, + { nameof(ProcessMapPlanOscillationDto.RpmLeft), new Cell(6, typeof(double)) }, + { nameof(ProcessMapPlanOscillationDto.TorqueMaxRight), new Cell(7, typeof(double)) }, + { nameof(ProcessMapPlanOscillationDto.TorqueMaxLeft), new Cell(8, typeof(double)) }, + { nameof(ProcessMapPlanOscillationDto.Mode), new Cell(10, typeof(int)) }, + { nameof(ProcessMapPlanOscillationDto.Note), new Cell(11, typeof(string)) }, }; } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorLoweringBitTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorLoweringBitTemplate.cs index 043e76f8..ae97f183 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorLoweringBitTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorLoweringBitTemplate.cs @@ -1,3 +1,4 @@ +using AsbCloudApp.Data.ProcessMaps.Operations; using System.Collections.Generic; namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates; @@ -6,12 +7,18 @@ public class ProcessMapPlanRotorLoweringBitTemplate : ITemplateParameters { public string SheetName => "Подход к забою в роторе"; - public int HeaderRowsCount => 2; + public int HeaderRowsCount => 3; public string FileName => "ProcessMapPlanRotorLoweringBitTemplate.xlsx"; public IDictionary Cells => new Dictionary { - + { nameof(ProcessMapPlanRotorLoweringBitDto.Section), new Cell(1, typeof(string)) }, + { nameof(ProcessMapPlanRotorLoweringBitDto.DepthStart), new Cell(2, typeof(double)) }, + { nameof(ProcessMapPlanRotorLoweringBitDto.DepthEnd), new Cell(3, typeof(double)) }, + { nameof(ProcessMapPlanRotorLoweringBitDto.PressureMax), new Cell(4, typeof(double)) }, + { nameof(ProcessMapPlanRotorLoweringBitDto.DifferentialPressure), new Cell(5, typeof(double)) }, + { nameof(ProcessMapPlanRotorLoweringBitDto.SlackingOff), new Cell(6, typeof(double)) }, + { nameof(ProcessMapPlanRotorLoweringBitDto.Note), new Cell(7, typeof(string)) }, }; } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorRpmAccelerationTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorRpmAccelerationTemplate.cs index d36bd7a6..a0647385 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorRpmAccelerationTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorRpmAccelerationTemplate.cs @@ -1,3 +1,6 @@ +using AsbCloudApp.Data.ProcessMaps.Functions; +using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudDb.Model.ProcessMapPlan.Operations; using System.Collections.Generic; namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates; @@ -12,6 +15,9 @@ public class ProcessMapPlanRotorRpmAccelerationTemplate : ITemplateParameters public IDictionary Cells => new Dictionary { - + { nameof(ProcessMapPlanRotorRpmAccelerationDto.Section), new Cell(1, typeof(string)) }, + { nameof(ProcessMapPlanRotorRpmAccelerationDto.DepthStart), new Cell(2, typeof(double)) }, + { nameof(ProcessMapPlanRotorRpmAccelerationDto.DepthEnd), new Cell(3, typeof(double)) }, + { nameof(ProcessMapPlanRotorRpmAccelerationDto.Note), new Cell(11, typeof(string)) }, }; } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanSwitchingToTheModeTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanSwitchingToTheModeTemplate.cs index ca53ad59..938f5872 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanSwitchingToTheModeTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanSwitchingToTheModeTemplate.cs @@ -1,3 +1,6 @@ +using AsbCloudApp.Data.ProcessMaps.Functions; +using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudDb.Model.ProcessMapPlan.Operations; using System.Collections.Generic; namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates; @@ -6,12 +9,18 @@ public class ProcessMapPlanSwitchingToTheModeTemplate : ITemplateParameters { public string SheetName => "Выход на плановый расход"; - public int HeaderRowsCount => 2; + public int HeaderRowsCount => 3; public string FileName => "ProcessMapPlanSwitchingToTheModeTemplate.xlsx"; public IDictionary Cells => new Dictionary { - + { nameof(ProcessMapPlanSwitchingToTheModeDto.Section), new Cell(1, typeof(string)) }, + { nameof(ProcessMapPlanSwitchingToTheModeDto.DepthStart), new Cell(2, typeof(double)) }, + { nameof(ProcessMapPlanSwitchingToTheModeDto.DepthEnd), new Cell(3, typeof(double)) }, + { nameof(ProcessMapPlanSwitchingToTheModeDto.RampTime), new Cell(4, typeof(double)) }, + { nameof(ProcessMapPlanSwitchingToTheModeDto.FlowRate), new Cell(5, typeof(double)) }, + { nameof(ProcessMapPlanSwitchingToTheModeDto.PressureMax), new Cell(6, typeof(double)) }, + { nameof(ProcessMapPlanAntiCrashRotationDto.Note), new Cell(7, typeof(string)) }, }; } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanRotorRpmAccelerationExportService.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanRotorRpmAccelerationExportService.cs index 11927880..9796994d 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanRotorRpmAccelerationExportService.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanRotorRpmAccelerationExportService.cs @@ -10,10 +10,10 @@ using System.Threading.Tasks; namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Export; -public class ProcessMapPlanRotorRpmAccelerationExportService : ProcessMapPlanExportService +public class ProcessMapPlanRotorRpmAccelerationExportService : ProcessMapPlanExportService { public ProcessMapPlanRotorRpmAccelerationExportService( - IChangeLogRepository processMapPlanRepository, + IChangeLogRepository processMapPlanRepository, IWellService wellService) : base(processMapPlanRepository, wellService) { diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanRotorRpmAccelerationParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanRotorRpmAccelerationParser.cs index 82667797..4141813f 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanRotorRpmAccelerationParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanRotorRpmAccelerationParser.cs @@ -10,7 +10,7 @@ using AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemp namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; -public class ProcessMapPlanRotorRpmAccelerationParser : ProcessMapPlanParser +public class ProcessMapPlanRotorRpmAccelerationParser : ProcessMapPlanParser { public ProcessMapPlanRotorRpmAccelerationParser(IWellOperationRepository wellOperationRepository) : base(wellOperationRepository) @@ -19,7 +19,7 @@ public class ProcessMapPlanRotorRpmAccelerationParser : ProcessMapPlanParser new ProcessMapPlanRotorRpmAccelerationTemplate(); - protected override RotorRpmAccelerationDto BuildDto(IDictionary row, int rowNumber) + protected override ProcessMapPlanRotorRpmAccelerationDto BuildDto(IDictionary row, int rowNumber) { var dto = base.BuildDto(row, rowNumber); diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRotorRpmAccelerationControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRotorRpmAccelerationControllerTest.cs index 20ae09c9..3e268550 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRotorRpmAccelerationControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRotorRpmAccelerationControllerTest.cs @@ -16,12 +16,12 @@ namespace AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan.Operations; /// РТК план встряхивание бурового инструмента /// public class ProcessMapPlanRotorRpmAccelerationControllerTest : - ProcessMapPlanBaseControllerTest + ProcessMapPlanBaseControllerTest { public ProcessMapPlanRotorRpmAccelerationControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanFunctionsJarrDrillTool") { } - private readonly RotorRpmAccelerationDto dto = new RotorRpmAccelerationDto() + private readonly ProcessMapPlanRotorRpmAccelerationDto dto = new ProcessMapPlanRotorRpmAccelerationDto() { IdWell = 1, DepthStart = 1, @@ -54,12 +54,12 @@ public class ProcessMapPlanRotorRpmAccelerationControllerTest : await Get(entity, dto); } - protected override ProcessMapPlanRotorRpmAcceleration GetByNote(DbSet dbSet, RotorRpmAccelerationDto dto) + protected override ProcessMapPlanRotorRpmAcceleration GetByNote(DbSet dbSet, ProcessMapPlanRotorRpmAccelerationDto dto) { throw new NotImplementedException(); } - protected override RotorRpmAccelerationDto GetByNote(IEnumerable dtos, RotorRpmAccelerationDto dto) + protected override ProcessMapPlanRotorRpmAccelerationDto GetByNote(IEnumerable dtos, ProcessMapPlanRotorRpmAccelerationDto dto) { throw new NotImplementedException(); } diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanRotorRpmAccelerationController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanRotorRpmAccelerationController.cs index 3d95708f..0f76ef54 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanRotorRpmAccelerationController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanRotorRpmAccelerationController.cs @@ -12,10 +12,10 @@ namespace AsbCloudWebApi.Controllers.ProcessMaps.Operations; /// РТК план выход на обороты перед ротором /// public class ProcessMapPlanRotorRpmAccelerationController : - ProcessMapPlanBaseController + ProcessMapPlanBaseController { public ProcessMapPlanRotorRpmAccelerationController( - IChangeLogRepository repository, + IChangeLogRepository repository, IWellService wellService, ProcessMapPlanRotorRpmAccelerationParser parserService, ITelemetryService telemetryService,