From 093495ab4c40dc44692d14499a3a74a1573206de Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Sat, 29 Jun 2024 20:46:11 +0500 Subject: [PATCH] =?UTF-8?q?=D0=91=D1=83=D1=80=D0=B5=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D1=80=D0=BE=D1=82=D0=BE=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProcessMaps/ProcessMapPlanRotorDto.cs | 16 ++--- .../ProcessMapPlan/ProcessMapPlanRotor.cs | 31 +++++----- .../ProcessMapPlanRotorTemplate.cs | 16 ++--- .../Report/ProcessMapReportDrillingService.cs | 14 ++--- .../Services/WellInfoService.cs | 4 +- ...sMapPlanOscillationAnglesControllerTest.cs | 6 -- .../ProcessMapPlanRotorControllerTest.cs | 60 +++++++++---------- 7 files changed, 71 insertions(+), 76 deletions(-) diff --git a/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanRotorDto.cs b/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanRotorDto.cs index eb3640dd..8adf60d8 100644 --- a/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanRotorDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanRotorDto.cs @@ -11,13 +11,13 @@ public class ProcessMapPlanRotorDto : ProcessMapPlanBaseDto /// Максимально допустимая скорость, м/ч /// [Range(0, 800.0, ErrorMessage = "Максимально допустимая скорость, м/ч., должно быть в пределах от 0 до 800.0")] - public double RopLimitMax { get; set; } + public double RopMax { get; set; } /// /// Максимально допустимое давление, атм /// [Range(0.0, 400.0, ErrorMessage = "Максимально допустимое давление, атм., должно быть в пределах от 0 до 400.0")] - public double PressureLimitMax { get; set; } + public double PressureMax { get; set; } /// /// Перепад давления, атм. Уставка @@ -29,7 +29,7 @@ public class ProcessMapPlanRotorDto : ProcessMapPlanBaseDto /// Перепад давления, атм. Ограничение /// [Range(0.0, 60.0, ErrorMessage = "Перепад давления, атм., ограничение, должно быть в пределах от 0 до 60.0")] - public double DifferentialPressureLimitMax { get; set; } + public double DifferentialPressureMax { get; set; } /// /// Нагрузка, т. Уставка @@ -41,7 +41,7 @@ public class ProcessMapPlanRotorDto : ProcessMapPlanBaseDto /// Нагрузка, т. Ограничение /// [Range(0.0, 99.0, ErrorMessage = "Нагрузка, т., ограничение, должно быть в пределах от 0 до 99.0")] - public double WeightOnBitLimitMax { get; set; } + public double WeightOnBitMax { get; set; } /// /// Момент на ВСП, кН*м. Уставка @@ -53,19 +53,19 @@ public class ProcessMapPlanRotorDto : ProcessMapPlanBaseDto /// Момент на ВСП, кН*м. Ограничение /// [Range(0.0, 35.0, ErrorMessage = "Момент на ВСП, кН*м., ограничение, должно быть в пределах от 0 до 35.0")] - public double TopDriveTorqueLimit { get; set; } + public double TopDriveTorqueMax { get; set; } /// /// Обороты на ВСП, об/мин. Уставка /// [Range(0.0, 270.0, ErrorMessage = "Обороты на ВСП, об/мин., уставка, должно быть в пределах от 0 до 270.0")] - public double RevolutionsPerMinute { get; set; } + public double Rpm { get; set; } /// /// Обороты на ВСП, об/мин. Ограничение /// [Range(0.0, 270.0, ErrorMessage = "Обороты на ВСП, об/мин., ограничение, должно быть в пределах от 0 до 270.0")] - public double RevolutionsPerMinuteLimitMax { get; set; } + public double RpmMax { get; set; } /// /// Расход л/с. Уставка @@ -77,7 +77,7 @@ public class ProcessMapPlanRotorDto : ProcessMapPlanBaseDto /// Расход л/с. Ограничение /// [Range(0.0, 100.0, ErrorMessage = "Расход л/с., ограничение, должно быть в пределах от 0 до 100.0")] - public double FlowRateLimitMax { get; set; } + public double FlowRateMax { get; set; } /// /// Примечание diff --git a/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanRotor.cs b/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanRotor.cs index c4bec8f4..e2e09f4a 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanRotor.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanRotor.cs @@ -8,12 +8,12 @@ namespace AsbCloudDb.Model.ProcessMaps; [Table("t_process_map_plan_rotor"), Comment("РТК план бурение ротор")] public class ProcessMapPlanRotor : ProcessMapPlanBase { - [Column("rop_limit_max"), Comment("Максимально допустимая скорость, м/ч")] + [Column("rop_max"), Comment("Максимально допустимая скорость, м/ч")] [Range(0, 800.0)] [Required] - public double RopLimitMax { get; set; } + public double RopMax { get; set; } - [Column("pressure_limit_max"), Comment("Максимально допустимое давление, атм")] + [Column("pressure_max"), Comment("Максимально допустимое давление, атм")] [Range(0.0, 400.0)] [Required] public double PressureLimitMax { get; set; } @@ -23,52 +23,53 @@ public class ProcessMapPlanRotor : ProcessMapPlanBase [Required] public double DifferentialPressure { get; set; } - [Column("differential_pressure_limit_max"), Comment("Перепад давления, атм. Ограничение")] + [Column("differential_pressure_max"), Comment("Перепад давления, атм. Ограничение")] [Range(0.0, 60.0)] [Required] - public double DifferentialPressureLimitMax { get; set; } + public double DifferentialPressureMax { get; set; } [Column("weight_on_bit"), Comment("Нагрузка, т. Уставка")] [Range(0.0, 99.0)] [Required] public double WeightOnBit { get; set; } - [Column("weight_on_bit_limit_max"), Comment("Нагрузка, т. Ограничение")] + [Column("weight_on_bit_max"), Comment("Нагрузка, т. Ограничение")] [Range(0.0, 99.0)] [Required] - public double WeightOnBitLimitMax { get; set; } + public double WeightOnBitMax { get; set; } [Column("top_drive_torque"), Comment("Момент на ВСП, кН*м. Уставка")] [Range(0.0, 35.0)] [Required] public double TopDriveTorque { get; set; } - [Column("top_drive_torque_limit_max"), Comment("Момент на ВСП, кН*м. Ограничение")] + [Column("top_drive_torque_max"), Comment("Момент на ВСП, кН*м. Ограничение")] [Range(0.0, 35.0)] [Required] - public double TopDriveTorqueLimit { get; set; } + public double TopDriveTorqueMax { get; set; } - [Column("revolution_per_minute"), Comment("Обороты на ВСП, об/мин. Уставка")] + [Column("rpm"), Comment("Обороты на ВСП, об/мин. Уставка")] [Range(0.0, 270.0)] [Required] - public double RevolutionsPerMinute { get; set; } + public double Rpm { get; set; } - [Column("revolutions_per_minute_limit_max"), Comment("Обороты на ВСП, об/мин. Ограничение")] + [Column("rpm_max"), Comment("Обороты на ВСП, об/мин. Ограничение")] [Range(0.0, 270.0)] [Required] - public double RevolutionsPerMinuteLimitMax { get; set; } + public double RpmMax { get; set; } [Column("flow_rate"), Comment("Расход л/с. Уставка")] [Range(0.0, 100.0)] [Required] public double FlowRate { get; set; } - [Column("flow_rate_limit_max"), Comment("Расход л/с. Ограничение")] + [Column("flow_rate_max"), Comment("Расход л/с. Ограничение")] [Range(0.0, 100.0)] [Required] - public double FlowRateLimitMax { get; set; } + public double FlowRateMax { get; set; } [Column("note"), Comment("Примечание"), StringLength(1024)] + [Required] public string Note { get; set; } = string.Empty; [ForeignKey(nameof(IdPrevious))] diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorTemplate.cs index f7a63207..aa011afd 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorTemplate.cs @@ -16,18 +16,18 @@ public class ProcessMapPlanRotorTemplate : ITemplateParameters { nameof(ProcessMapPlanRotorDto.Section), new Cell(1, typeof(string)) }, { nameof(ProcessMapPlanRotorDto.DepthStart), new Cell(2, typeof(double)) }, { nameof(ProcessMapPlanRotorDto.DepthEnd), new Cell(3, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.RopLimitMax), new Cell(4, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.PressureLimitMax), new Cell(5, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.RopMax), new Cell(4, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.PressureMax), new Cell(5, typeof(double)) }, { nameof(ProcessMapPlanRotorDto.DifferentialPressure), new Cell(6, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.DifferentialPressureLimitMax), new Cell(7, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.DifferentialPressureMax), new Cell(7, typeof(double)) }, { nameof(ProcessMapPlanRotorDto.WeightOnBit), new Cell(8, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.WeightOnBitLimitMax), new Cell(9, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.WeightOnBitMax), new Cell(9, typeof(double)) }, { nameof(ProcessMapPlanRotorDto.TopDriveTorque), new Cell(10, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.TopDriveTorqueLimit), new Cell(11, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.RevolutionsPerMinute), new Cell(12, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.RevolutionsPerMinuteLimitMax), new Cell(13, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.TopDriveTorqueMax), new Cell(11, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.Rpm), new Cell(12, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.RpmMax), new Cell(13, typeof(double)) }, { nameof(ProcessMapPlanRotorDto.FlowRate), new Cell(14, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.FlowRateLimitMax), new Cell(15, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.FlowRateMax), new Cell(15, typeof(double)) }, { nameof(ProcessMapPlanRotorDto.Note), new Cell(16, typeof(double)) }, }; } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMaps/Report/ProcessMapReportDrillingService.cs b/AsbCloudInfrastructure/Services/ProcessMaps/Report/ProcessMapReportDrillingService.cs index 4a0e6c89..4c5132c5 100644 --- a/AsbCloudInfrastructure/Services/ProcessMaps/Report/ProcessMapReportDrillingService.cs +++ b/AsbCloudInfrastructure/Services/ProcessMaps/Report/ProcessMapReportDrillingService.cs @@ -273,16 +273,16 @@ public class ProcessMapReportDrillingService : IProcessMapReportDrillingService if(processMapPlanFilteredByDepth is ProcessMapPlanRotorDto processMapPlanRotorFilteredByDepth) { result.PressureDiff.SetpointPlan = processMapPlanRotorFilteredByDepth.DifferentialPressure; - result.PressureDiff.Limit = processMapPlanRotorFilteredByDepth.DifferentialPressureLimitMax; + result.PressureDiff.Limit = processMapPlanRotorFilteredByDepth.DifferentialPressureMax; result.AxialLoad.SetpointPlan = processMapPlanRotorFilteredByDepth.WeightOnBit; - result.AxialLoad.Limit = processMapPlanRotorFilteredByDepth.WeightOnBitLimitMax; + result.AxialLoad.Limit = processMapPlanRotorFilteredByDepth.WeightOnBitMax; result.TopDriveTorque.SetpointPlan = processMapPlanRotorFilteredByDepth.TopDriveTorque; - result.TopDriveTorque.Limit = processMapPlanRotorFilteredByDepth.TopDriveTorqueLimit; - result.SpeedLimit.SetpointPlan = processMapPlanRotorFilteredByDepth.RopLimitMax; - result.TopDriveSpeed.SetpointPlan = processMapPlanRotorFilteredByDepth.RevolutionsPerMinute; + result.TopDriveTorque.Limit = processMapPlanRotorFilteredByDepth.TopDriveTorqueMax; + result.SpeedLimit.SetpointPlan = processMapPlanRotorFilteredByDepth.RopMax; + result.TopDriveSpeed.SetpointPlan = processMapPlanRotorFilteredByDepth.Rpm; result.Flow.SetpointPlan = processMapPlanRotorFilteredByDepth.FlowRate; - result.Flow.Limit = processMapPlanRotorFilteredByDepth.FlowRateLimitMax; - result.Rop.Plan = processMapPlanRotorFilteredByDepth.RopLimitMax; + result.Flow.Limit = processMapPlanRotorFilteredByDepth.FlowRateMax; + result.Rop.Plan = processMapPlanRotorFilteredByDepth.RopMax; } if (processMapPlanFilteredByDepth is ProcessMapPlanSlideDto processMapPlanSlideFilteredByDepth) { diff --git a/AsbCloudInfrastructure/Services/WellInfoService.cs b/AsbCloudInfrastructure/Services/WellInfoService.cs index b1a635a3..74bea1ef 100644 --- a/AsbCloudInfrastructure/Services/WellInfoService.cs +++ b/AsbCloudInfrastructure/Services/WellInfoService.cs @@ -171,13 +171,13 @@ public class WellInfoService { wellMapInfo.AxialLoad.Plan = processMapPlanRotor?.WeightOnBit; - wellMapInfo.TopDriveSpeed.Plan = processMapPlanRotor?.RevolutionsPerMinute; + wellMapInfo.TopDriveSpeed.Plan = processMapPlanRotor?.Rpm; wellMapInfo.TopDriveTorque.Plan = processMapPlanRotor?.TopDriveTorque; wellMapInfo.Pressure.Plan = processMapPlanRotor?.DifferentialPressure; - wellMapInfo.ROP.Plan = processMapPlanRotor?.RopLimitMax; + wellMapInfo.ROP.Plan = processMapPlanRotor?.RopMax; } if (processMapPlanWellDrilling is ProcessMapPlanSlideDto processMapPlanSlide) diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanOscillationAnglesControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanOscillationAnglesControllerTest.cs index 116dc6b4..7e136671 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanOscillationAnglesControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanOscillationAnglesControllerTest.cs @@ -28,12 +28,6 @@ public class ProcessMapPlanOscillationAnglesControllerTest : DepthEnd = 2, Id = 0, IdWellSectionType = 1, - DifferentialPressure = 1, - MaxPressure = 2, - Reaming1ROPDown = 3, - Reaming1ROPUp = 4, - SetpointsSlackingOff = 5, - SetpointsTight = 6 }; private readonly ProcessMapPlanOscillationAngles entity = new ProcessMapPlanOscillationAngles() diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanRotorControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanRotorControllerTest.cs index 7c2ed101..788d43aa 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanRotorControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanRotorControllerTest.cs @@ -13,18 +13,18 @@ public class ProcessMapPlanRotorControllerTest : ProcessMapPlanBaseControllerTes IdWell = 1, DepthStart = 1, DepthEnd = 2, - RopLimitMax = 3, - PressureLimitMax = 4, + RopMax = 3, + PressureMax = 4, DifferentialPressure = 5, - DifferentialPressureLimitMax = 6, + DifferentialPressureMax = 6, WeightOnBit = 7, - WeightOnBitLimitMax = 8, + WeightOnBitMax = 8, TopDriveTorque = 9, - TopDriveTorqueLimit = 10, - RevolutionsPerMinute = 11, - RevolutionsPerMinuteLimitMax = 12, + TopDriveTorqueMax = 10, + Rpm = 11, + RpmMax = 12, FlowRate = 13, - FlowRateLimitMax = 14, + FlowRateMax = 14, Note = "15", Id = 0, IdWellSectionType = 1, @@ -36,20 +36,20 @@ public class ProcessMapPlanRotorControllerTest : ProcessMapPlanBaseControllerTes DepthEnd = 10, DepthStart = 2, DifferentialPressure = 3, - DifferentialPressureLimitMax = 4, + DifferentialPressureMax = 4, FlowRate = 5, - FlowRateLimitMax = 6, + FlowRateMax = 6, Id = 0, IdWellSectionType = 1, Note = "1", PressureLimitMax = 2, - RevolutionsPerMinute = 3, - RevolutionsPerMinuteLimitMax = 4, - RopLimitMax = 5, + Rpm = 3, + RpmMax = 4, + RopMax = 5, TopDriveTorque = 6, - TopDriveTorqueLimit = 7, + TopDriveTorqueMax = 7, WeightOnBit = 8, - WeightOnBitLimitMax = 9, + WeightOnBitMax = 9, IdAuthor = 1, IdEditor = 1, Creation = DateTimeOffset.UtcNow @@ -65,7 +65,7 @@ public class ProcessMapPlanRotorControllerTest : ProcessMapPlanBaseControllerTes var entity = dbContext .Set() .Where(p => p.WeightOnBit == dto.WeightOnBit) - .Where(p => p.WeightOnBitLimitMax == dto.WeightOnBitLimitMax) + .Where(p => p.WeightOnBitMax == dto.WeightOnBitMax) .Where(p => p.Note == dto.Note) .FirstOrDefault(p => p.IdWell == dto.IdWell); @@ -120,36 +120,36 @@ public class ProcessMapPlanRotorControllerTest : ProcessMapPlanBaseControllerTes var dtoUpdate = dto.Adapt(); dtoUpdate.IdWell = 0; dtoUpdate.Note = "nebuchadnezzar"; - dtoUpdate.DifferentialPressureLimitMax++; + dtoUpdate.DifferentialPressureMax++; dtoUpdate.DifferentialPressure++; dtoUpdate.FlowRate++; - dtoUpdate.FlowRateLimitMax++; - dtoUpdate.RopLimitMax++; + dtoUpdate.FlowRateMax++; + dtoUpdate.RopMax++; dtoUpdate.WeightOnBit++; - dtoUpdate.WeightOnBitLimitMax++; + dtoUpdate.WeightOnBitMax++; dtoUpdate.DepthStart++; dtoUpdate.DepthEnd++; - dtoUpdate.RevolutionsPerMinute++; - dtoUpdate.RevolutionsPerMinuteLimitMax++; + dtoUpdate.Rpm++; + dtoUpdate.RpmMax++; dtoUpdate.TopDriveTorque++; - dtoUpdate.TopDriveTorqueLimit++; + dtoUpdate.TopDriveTorqueMax++; var dtoInsert = dtoUpdate.Adapt(); dtoInsert.Id = 0; dtoInsert.Note = "nebuchad"; - dtoInsert.DifferentialPressureLimitMax++; + dtoInsert.DifferentialPressureMax++; dtoInsert.DifferentialPressure++; dtoInsert.FlowRate++; - dtoInsert.FlowRateLimitMax++; - dtoInsert.RopLimitMax++; + dtoInsert.FlowRateMax++; + dtoInsert.RopMax++; dtoInsert.WeightOnBit++; - dtoInsert.WeightOnBitLimitMax++; + dtoInsert.WeightOnBitMax++; dtoInsert.DepthStart++; dtoInsert.DepthEnd++; - dtoInsert.RevolutionsPerMinute++; - dtoInsert.RevolutionsPerMinuteLimitMax++; + dtoInsert.Rpm++; + dtoInsert.RpmMax++; dtoInsert.TopDriveTorque++; - dtoInsert.TopDriveTorqueLimit++; + dtoInsert.TopDriveTorqueMax++; await UpdateOrInsertRange(entity, dtoUpdate, dtoInsert); }