diff --git a/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanOperationReamingSlideDto.cs b/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanOperationReamingSlideDto.cs deleted file mode 100644 index 9de75d5b..00000000 --- a/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanOperationReamingSlideDto.cs +++ /dev/null @@ -1,209 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace AsbCloudApp.Data.ProcessMaps; - -/// -/// РТК план проработка для слайда -/// -public class ProcessMapPlanOperationReamingSlideDto : ProcessMapPlanBaseDto -{ - /// - /// Максимальное давление, атм - /// - [Range(0.0, 400.0, ErrorMessage = "Максимальное давление, атм., должно быть в пределах от 0 до 400")] - public double MaxPressure { get; set; } - - /// - /// Перепад давления, атм. - /// - [Range(0.0, 60.0, ErrorMessage = "Перепад давления, атм., должно быть в пределах от 0 до 60")] - public double DifferentialPressure { get; set; } - - /// - /// Уставки, т., затяжка - /// - [Range(0.0, 20.0, ErrorMessage = "Уставки, т., затяжка, должно быть в пределах от 0 до 20")] - public double SetpointsTight { get; set; } - - /// - /// Уставки, т., посадка - /// - [Range(0.0, 20.0, ErrorMessage = "Уставки, т., посадка, должно быть в пределах от 0 до 20")] - public double SetpointsSlackingOff { get; set; } - - /// - /// Максимально допустимый момент, кН*м. - /// - [Range(0.0, 35.0, ErrorMessage = "Максимально допустимый момент, кН*м., должно быть в пределах от 0 до 35")] - public double MaxTorque { get; set; } - - /// - /// Проработка 1, Количество повторений, шт. - /// - [Range(0.0, 99.0, ErrorMessage = "Проработка 1, Количество повторений, шт., должно быть в пределах от 0 до 99")] - public double Reaming1NumberOfRepetitions { get; set; } - - /// - /// Проработка 1, Скорость, м/ч., Вверх - /// - [Range(0.0, 999.0, ErrorMessage = "Проработка 1, Скорость, м/ч., Вверх, должно быть в пределах от 0 до 999")] - public double Reaming1ROPUp { get; set; } - - /// - /// Проработка 1, Скорость, м/ч., Вниз - /// - [Range(0.0, 999.0, ErrorMessage = "Проработка 1, Скорость, м/ч., Вниз, должно быть в пределах от 0 до 999")] - public double Reaming1ROPDown { get; set; } - - /// - /// Проработка 1, Обороты, об/мин., Вверх - /// - [Range(0.0, 270.0, ErrorMessage = "Проработка 1, Обороты, об/мин., Вверх, должно быть в пределах от 0 до 270")] - public double Reaming1RPMUp { get; set; } - - /// - /// Проработка 1, Обороты, об/мин., Вниз - /// - [Range(0.0, 270.0, ErrorMessage = "Проработка 1, Обороты, об/мин., Вниз, должно быть в пределах от 0 до 270")] - public double Reaming1RPMDown { get; set; } - - /// - /// Проработка 1, Расход, л/с., Вверх - /// - [Range(0.0, 100.0, ErrorMessage = "Проработка 1, Расход, л/с., Вверх, должно быть в пределах от 0 до 100")] - public double Reaming1FlowRateUp { get; set; } - - /// - /// Проработка 1, Расход, л/с., Вниз - /// - [Range(0.0, 100.0, ErrorMessage = "Проработка 1, Расход, л/с., Вниз, должно быть в пределах от 0 до 100")] - public double Reaming1FlowRateDown { get; set; } - - /// - /// Проработка 1, Интервал проработки, м. - /// - [Range(0.0, 30.0, ErrorMessage = "Проработка 1, Интервал проработки, м., должно быть в пределах от 0 до 30")] - public double Reaming1Interval { get; set; } - - /// - /// Остановка над забоем, м. - /// - [Range(0.0, 10.0, ErrorMessage = "Остановка над забоем, м., должно быть в пределах от 0 до 10")] - public double Reaming1StopPointOffBottom { get; set; } - - /// - /// Проработка 2, Количество повторений, шт. - /// - [Range(0.0, 99.0, ErrorMessage = "Проработка 2, Количество повторений, шт., должно быть в пределах от 0 до 99")] - public double Reaming2NumberOfRepetitions { get; set; } - - /// - /// Проработка 2, Скорость, м/ч., Вверх - /// - [Range(0.0, 999.0, ErrorMessage = "Проработка 2, Скорость, м/ч., Вверх, должно быть в пределах от 0 до 999")] - public double Reaming2ROPUp { get; set; } - - /// - /// Проработка 2, Скорость, м/ч., Вниз - /// - [Range(0.0, 999.0, ErrorMessage = "Проработка 2, Скорость, м/ч., Вниз, должно быть в пределах от 0 до 999")] - public double Reaming2ROPDown { get; set; } - - /// - /// Проработка 2, Обороты, об/мин., Вверх - /// - [Range(0.0, 270.0, ErrorMessage = "Проработка 2, Обороты, об/мин., Вверх, должно быть в пределах от 0 до 270")] - public double Reaming2RPMUp { get; set; } - - /// - /// Проработка 2, Обороты, об/мин., Вниз - /// - [Range(0.0, 270.0, ErrorMessage = "Проработка 2, Обороты, об/мин., Вниз, должно быть в пределах от 0 до 270")] - public double Reaming2RPMDown { get; set; } - - /// - /// Проработка 2, Расход, л/с., Вверх - /// - [Range(0.0, 100.0, ErrorMessage = "Проработка 2, Расход, л/с., Вверх, должно быть в пределах от 0 до 100")] - public double Reaming2FlowRateUp { get; set; } - - /// - /// Проработка 2, Расход, л/с., Вниз - /// - [Range(0.0, 100.0, ErrorMessage = "Проработка 2, Расход, л/с., Вниз, должно быть в пределах от 0 до 100")] - public double Reaming2FlowRateDown { get; set; } - - /// - /// Проработка 2, Интервал проработки, м. - /// - [Range(0.0, 30.0, ErrorMessage = "Проработка 2, Интервал проработки, м., должно быть в пределах от 0 до 30")] - public double Reaming2Interval { get; set; } - - /// - /// Остановка над забоем, м. - /// - [Range(0.0, 10.0, ErrorMessage = "Остановка над забоем, м., должно быть в пределах от 0 до 10")] - public double Reaming2StopPointOffBottom { get; set; } - - /// - /// Проработка 3, Количество повторений, шт. - /// - [Range(0.0, 99.0, ErrorMessage = "Проработка 3, Количество повторений, шт., должно быть в пределах от 0 до 99")] - public double Reaming3NumberOfRepetitions { get; set; } - - /// - /// Проработка 3, Скорость, м/ч., Вверх - /// - [Range(0.0, 999.0, ErrorMessage = "Проработка 3, Скорость, м/ч., Вверх, должно быть в пределах от 0 до 999")] - public double Reaming3ROPUp { get; set; } - - /// - /// Проработка 3, Скорость, м/ч., Вниз - /// - [Range(0.0, 999.0, ErrorMessage = "Проработка 3, Скорость, м/ч., Вниз, должно быть в пределах от 0 до 999")] - public double Reaming3ROPDown { get; set; } - - /// - /// Проработка 3, Обороты, об/мин., Вверх - /// - [Range(0.0, 270.0, ErrorMessage = "Проработка 3, Обороты, об/мин., Вверх, должно быть в пределах от 0 до 270")] - public double Reaming3RPMUp { get; set; } - - /// - /// Проработка 3, Обороты, об/мин., Вниз - /// - [Range(0.0, 270.0, ErrorMessage = "Проработка 3, Обороты, об/мин., Вниз, должно быть в пределах от 0 до 270")] - public double Reaming3RPMDown { get; set; } - - /// - /// Проработка 3, Расход, л/с., Вверх - /// - [Range(0.0, 100.0, ErrorMessage = "Проработка 3, Расход, л/с., Вверх, должно быть в пределах от 0 до 100")] - public double Reaming3FlowRateUp { get; set; } - - /// - /// Проработка 3, Расход, л/с., Вниз - /// - [Range(0.0, 100.0, ErrorMessage = "Проработка 3, Расход, л/с., Вниз, должно быть в пределах от 0 до 100")] - public double Reaming3FlowRateDown { get; set; } - - /// - /// Проработка 3, Интервал проработки, м. - /// - [Range(0.0, 30.0, ErrorMessage = "Проработка 3, Интервал проработки, м., должно быть в пределах от 0 до 30")] - public double Reaming3Interval { get; set; } - - /// - /// Остановка над забоем, м. - /// - [Range(0.0, 10.0, ErrorMessage = "Остановка над забоем, м., должно быть в пределах от 0 до 10")] - public double Reaming3StopPointOffBottom { 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/ProcessMapPlanSwitchingOffThePumpDto.cs b/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanSwitchingOffThePumpDto.cs new file mode 100644 index 00000000..81000490 --- /dev/null +++ b/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanSwitchingOffThePumpDto.cs @@ -0,0 +1,21 @@ +using System.ComponentModel.DataAnnotations; + +namespace AsbCloudApp.Data.ProcessMaps; + +/// +/// РТК план выключение насоса +/// +public class ProcessMapPlanSwitchingOffThePumpDto : ProcessMapPlanBaseDto +{ + /// + /// Продолжительность, сек. + /// + [Range(0.0, 1800.0, ErrorMessage = "Продолжительность, сек., должно быть в пределах от 0 до 1800")] + public double Duration { get; set; } + + /// + /// Лимит остаточного давления, атм. + /// + [Range(0.0, 100.0, ErrorMessage = "Лимит остаточного давления, атм., должно быть в пределах от 0 до 100")] + public double ResidualPressureLimit { get; set; } +} \ No newline at end of file diff --git a/AsbCloudDb/Model/AsbCloudDbContext.cs b/AsbCloudDb/Model/AsbCloudDbContext.cs index 3d7b4451..df7fbb19 100644 --- a/AsbCloudDb/Model/AsbCloudDbContext.cs +++ b/AsbCloudDb/Model/AsbCloudDbContext.cs @@ -23,7 +23,7 @@ namespace AsbCloudDb.Model public virtual DbSet ProcessMapPlanSlide => Set(); public virtual DbSet ProcessMapPlanReams => Set(); public virtual DbSet ProcessMapPlanOperationReamingRotor => Set(); - public virtual DbSet ProcessMapPlanOperationReamingSlide => Set(); + public virtual DbSet ProcessMapPlanOperationReamingSlide => Set(); public virtual DbSet ProcessMapPlanOperationLoadCapacity => Set(); public virtual DbSet ProcessMapPlanSurvey => Set(); public virtual DbSet ProcessMapPlanOperationPositioningOffTheBottom => Set(); @@ -478,7 +478,7 @@ namespace AsbCloudDb.Model .WithMany() .OnDelete(DeleteBehavior.Restrict); - modelBuilder.Entity() + modelBuilder.Entity() .HasOne(p => p.Author) .WithMany() .OnDelete(DeleteBehavior.Restrict); @@ -578,7 +578,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 0e9df4d9..a9597aa1 100644 --- a/AsbCloudDb/Model/IAsbCloudDbContext.cs +++ b/AsbCloudDb/Model/IAsbCloudDbContext.cs @@ -84,7 +84,7 @@ namespace AsbCloudDb.Model DbSet ProcessMapPlanRotor { get; } DbSet ProcessMapPlanSlide { get; } DbSet ProcessMapPlanOperationReamingRotor { get; } - DbSet ProcessMapPlanOperationReamingSlide { get; } + DbSet ProcessMapPlanOperationReamingSlide { get; } DbSet ProcessMapPlanOperationLoadCapacity { get; } DbSet ProcessMapPlanSurvey { get; } DbSet ProcessMapPlanOperationPositioningOffTheBottom { get; } diff --git a/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanOperationReamingSlide.cs b/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanReamingSlide.cs similarity index 68% rename from AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanOperationReamingSlide.cs rename to AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanReamingSlide.cs index a2b38354..5ca53949 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanOperationReamingSlide.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanReamingSlide.cs @@ -5,58 +5,58 @@ using Microsoft.EntityFrameworkCore; namespace AsbCloudDb.Model.ProcessMaps; -[Table("t_process_map_plan_operation_reaming_slide"), Comment("РТК проработка слайд")] -public class ProcessMapPlanOperationReamingSlide : ProcessMapPlanBase +[Table("t_process_map_plan_reaming_slide"), Comment("РТК проработка слайд")] +public class ProcessMapPlanReamingSlide : ProcessMapPlanBase { - [Column("max_pressure"), Comment("Максимальное давление, атм")] + [Column("pressure_max"), Comment("Максимально допустимое давление, атм.")] [Range(0.0, 400.0)] [Required] - public double MaxPressure { get; set; } + public double PressureMax { get; set; } - [Column("differential_pressure"), Comment("Перепад давления, атм.")] + [Column("differential_pressure"), Comment("Перепад давления уставка, атм.")] [Range(0.0, 60.0)] [Required] public double DifferentialPressure { get; set; } - [Column("setpoints_tight"), Comment("Уставки, т., затяжка")] + [Column("tight"), Comment("Затяжка, т.")] [Range(0.0, 20.0)] [Required] - public double SetpointsTight { get; set; } + public double Tight { get; set; } - [Column("setpoints_slacking_off"), Comment("Уставки, т., посадка")] + [Column("slacking_off"), Comment("Посадка, т.")] [Range(0.0, 20.0)] [Required] - public double SetpointsSlackingOff { get; set; } + public double SlackingOff { get; set; } - [Column("max_torque"), Comment("Максимально допустимый момент, кН*м.")] + [Column("torque_max"), Comment("Максимально допустимый момент, кН*м.")] [Range(0.0, 35.0)] [Required] - public double MaxTorque { get; set; } + public double TorqueMax { get; set; } - [Column("reaming1_number_of_repetitions"), Comment("Проработка 1, Количество повторений, шт.")] + [Column("reaming1_repetitions_count"), Comment("Проработка 1. Количество повторений, шт.")] [Range(0.0, 99.0)] [Required] - public double Reaming1NumberOfRepetitions { get; set; } + public double Reaming1RepetitionsCount { get; set; } - [Column("reaming1_rop_up"), Comment("Проработка 1, Скорость, м/ч., Вверх")] + [Column("reaming1_rop_up"), Comment("Проработка 1. Скорость вверх, м/ч.")] [Range(0.0, 999.0)] [Required] - public double Reaming1ROPUp { get; set; } + public double Reaming1RopUp { get; set; } - [Column("reaming1_rop_down"), Comment("Проработка 1, Скорость, м/ч., Вниз")] + [Column("reaming1_rop_down"), Comment("Проработка 1. Скорость вниз, м/ч.")] [Range(0.0, 999.0)] [Required] - public double Reaming1ROPDown { get; set; } + public double Reaming1RopDown { get; set; } [Column("reaming1_rpm_up"), Comment("Проработка 1, Обороты, об/мин., Вверх")] [Range(0.0, 270.0)] [Required] - public double Reaming1RPMUp { get; set; } + public double Reaming1RpmUp { get; set; } [Column("reaming1_rpm_down"), Comment("Проработка 1, Обороты, об/мин., Вниз")] [Range(0.0, 270.0)] [Required] - public double Reaming1RPMDown { get; set; } + public double Reaming1RpmDown { get; set; } [Column("reaming1_flow_rate_up"), Comment("Проработка 1, Расход, л/с., Вверх")] [Range(0.0, 100.0)] @@ -78,25 +78,25 @@ public class ProcessMapPlanOperationReamingSlide : ProcessMapPlanBase [Required] public double Reaming1StopPointOffBottom { get; set; } - [Column("reaming2_number_of_ repetitions"), Comment("Проработка 2, Количество повторений, шт.")] + [Column("reaming2_repetitions_count"), Comment("Проработка 2, Количество повторений, шт.")] [Range(0.0, 99.0)] - public double Reaming2NumberOfRepetitions { get; set; } + public double Reaming2RepetitionsCount { get; set; } [Column("reaming2_rop_up"), Comment("Проработка 2, Скорость, м/ч., Вверх")] [Range(0.0, 999.0)] - public double Reaming2ROPUp { get; set; } + public double Reaming2RopUp { get; set; } [Column("reaming2_rop_down"), Comment("Проработка 2, Скорость, м/ч., Вниз")] [Range(0.0, 999.0)] - public double Reaming2ROPDown { get; set; } + public double Reaming2RopDown { get; set; } [Column("reaming2_rpm_up"), Comment("Проработка 2, Обороты, об/мин., Вверх")] [Range(0.0, 270.0)] - public double Reaming2RPMUp { get; set; } + public double Reaming2RpmUp { get; set; } [Column("reaming2_rpm_down"), Comment("Проработка 2, Обороты, об/мин., Вниз")] [Range(0.0, 270.0)] - public double Reaming2RPMDown { get; set; } + public double Reaming2RpmDown { get; set; } [Column("reaming2_flow_rate_up"), Comment("Проработка 2, Расход, л/с., Вверх")] [Range(0.0, 100.0)] @@ -114,25 +114,25 @@ public class ProcessMapPlanOperationReamingSlide : ProcessMapPlanBase [Range(0.0, 10.0)] public double Reaming2StopPointOffBottom { get; set; } - [Column("reaming3_number_of_ repetitions"), Comment("Проработка 3, Количество повторений, шт.")] + [Column("reaming3_repetitions_count"), Comment("Проработка 3, Количество повторений, шт.")] [Range(0.0, 99.0)] - public double Reaming3NumberOfRepetitions { get; set; } + public double Reaming3RepetitionsCount { get; set; } [Column("reaming3_rop_up"), Comment("Проработка 3, Скорость, м/ч., Вверх")] [Range(0.0, 999.0)] - public double Reaming3ROPUp { get; set; } + public double Reaming3RopUp { get; set; } [Column("reaming3_rop_down"), Comment("Проработка 3, Скорость, м/ч., Вниз")] [Range(0.0, 999.0)] - public double Reaming3ROPDown { get; set; } + public double Reaming3RopDown { get; set; } [Column("reaming3_rpm_up"), Comment("Проработка 3, Обороты, об/мин., Вверх")] [Range(0.0, 270.0)] - public double Reaming3RPMUp { get; set; } + public double Reaming3RpmUp { get; set; } [Column("reaming3_rpm_down"), Comment("Проработка 3, Обороты, об/мин., Вниз")] [Range(0.0, 270.0)] - public double Reaming3RPMDown { get; set; } + public double Reaming3RpmDown { get; set; } [Column("reaming3_flow_rate_up"), Comment("Проработка 3, Расход, л/с., Вверх")] [Range(0.0, 100.0)] @@ -154,5 +154,5 @@ public class ProcessMapPlanOperationReamingSlide : ProcessMapPlanBase public string Note { get; set; } = string.Empty; [ForeignKey(nameof(IdPrevious))] - public virtual ProcessMapPlanOperationReamingSlide? Previous { get; set; } + public virtual ProcessMapPlanReamingSlide? Previous { get; set; } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/DependencyInjection.cs b/AsbCloudInfrastructure/DependencyInjection.cs index 4cdc6805..b80498fe 100644 --- a/AsbCloudInfrastructure/DependencyInjection.cs +++ b/AsbCloudInfrastructure/DependencyInjection.cs @@ -153,11 +153,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() @@ -430,7 +430,7 @@ namespace AsbCloudInfrastructure services.AddTransient(); services.AddTransient(); services.AddTransient(); - services.AddTransient(); + services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); @@ -456,7 +456,7 @@ namespace AsbCloudInfrastructure services.AddTransient(); services.AddTransient(); services.AddTransient(); - services.AddTransient(); + services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); @@ -499,8 +499,8 @@ namespace AsbCloudInfrastructure ProcessMapPlanBaseRepository>(); services.AddTransient< - IChangeLogRepository, - ProcessMapPlanBaseRepository>(); + IChangeLogRepository, + ProcessMapPlanBaseRepository>(); services.AddTransient< IChangeLogRepository, @@ -569,7 +569,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/ProcessMapPlanOperationReamingSlideTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanReamingSlideTemplate.cs similarity index 66% rename from AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanOperationReamingSlideTemplate.cs rename to AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanReamingSlideTemplate.cs index b670bc4e..627ce9aa 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanOperationReamingSlideTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanReamingSlideTemplate.cs @@ -2,13 +2,13 @@ using System.Collections.Generic; namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates; -public class ProcessMapPlanOperationReamingSlideTemplate : ITemplateParameters +public class ProcessMapPlanReamingSlideTemplate : ITemplateParameters { public string SheetName => "Проработка слайд"; public int HeaderRowsCount => 2; - public string FileName => "ProcessMapPlanOperationReamingSlideTemplate.xlsx"; + public string FileName => "ProcessMapPlanReamingSlideTemplate.xlsx"; public IDictionary Cells => new Dictionary { diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanOperationReamingSlideExportService.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanReamingSlideExportService.cs similarity index 70% rename from AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanOperationReamingSlideExportService.cs rename to AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanReamingSlideExportService.cs index d6e4ba73..a30d8f47 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanOperationReamingSlideExportService.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Export/ProcessMapPlanReamingSlideExportService.cs @@ -10,16 +10,16 @@ using System.Threading.Tasks; namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Export; -public class ProcessMapPlanOperationReamingSlideExportService : ProcessMapPlanExportService +public class ProcessMapPlanReamingSlideExportService : ProcessMapPlanExportService { - public ProcessMapPlanOperationReamingSlideExportService( - IChangeLogRepository processMapPlanRepository, + public ProcessMapPlanReamingSlideExportService( + IChangeLogRepository processMapPlanRepository, IWellService wellService) : base(processMapPlanRepository, wellService) { } - protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanOperationReamingSlideTemplate(); + protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanReamingSlideTemplate(); protected override async Task BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token) { diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanOperationReamingSlideParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanReamingSlideParser.cs similarity index 73% rename from AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanOperationReamingSlideParser.cs rename to AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanReamingSlideParser.cs index 5db156c1..8a420d45 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanOperationReamingSlideParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanReamingSlideParser.cs @@ -9,16 +9,16 @@ using AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemp namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; -public class ProcessMapPlanOperationReamingSlideParser : ProcessMapPlanParser +public class ProcessMapPlanReamingSlideParser : ProcessMapPlanParser { - public ProcessMapPlanOperationReamingSlideParser(IWellOperationRepository wellOperationRepository) + public ProcessMapPlanReamingSlideParser(IWellOperationRepository wellOperationRepository) : base(wellOperationRepository) { } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanOperationReamingSlideTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanReamingSlideTemplate(); - protected override ProcessMapPlanOperationReamingSlideDto BuildDto(IDictionary row, int rowNumber) + protected override ProcessMapPlanReamingSlideDto BuildDto(IDictionary row, int rowNumber) { var dto = base.BuildDto(row, rowNumber); diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanReamingSlideControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanReamingSlideControllerTest.cs new file mode 100644 index 00000000..fa18b50d --- /dev/null +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanReamingSlideControllerTest.cs @@ -0,0 +1,131 @@ +using AsbCloudApp.Data.ProcessMaps; +using AsbCloudApp.Repositories; +using AsbCloudApp.Requests; +using AsbCloudApp.Services; +using AsbCloudDb.Model.ProcessMaps; +using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; +using AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; +using AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan; +using AsbCloudWebApi.IntegrationTests; +using Microsoft.EntityFrameworkCore; +using Xunit; + +namespace AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan.Operations; + +/// +/// РТК план проработка для слайда +/// +public class ProcessMapPlanReamingSlideControllerTest : + ProcessMapPlanBaseControllerTest +{ + public ProcessMapPlanReamingSlideControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanOperationReamingSlide") + { + } + private readonly ProcessMapPlanReamingSlideDto dto = new ProcessMapPlanReamingSlideDto() + { + IdWell = 1, + DepthStart = 1, + DepthEnd = 2, + Id = 0, + IdWellSectionType = 1, + SlackingOff = 1, + Reaming3StopPointOffBottom = 2, + Reaming3RopUp = 3, + Reaming3Interval = 4, + Reaming2StopPointOffBottom = 5, + Reaming2RopUp = 6, + Reaming2RepetitionsCount = 7, + Reaming3FlowRateUp = 8, + Reaming2FlowRateUp = 9, + Reaming1StopPointOffBottom = 1, + Reaming1RopUp = 1, + Reaming1Interval = 2, + DifferentialPressure = 3, + PressureMax = 4, + TorqueMax = 5, + Note = "1", + Reaming1FlowRateDown = 6, + Reaming1FlowRateUp = 7, + Reaming1RepetitionsCount = 8, + Reaming1RopDown = 9, + Reaming1RpmDown = 1, + Reaming1RpmUp = 1, + Reaming2FlowRateDown = 2, + Reaming2Interval = 3, + Reaming2RopDown = 3, + Reaming2RpmDown = 4, + Reaming2RpmUp = 5, + Reaming3FlowRateDown = 6, + Reaming3RepetitionsCount = 3, + Reaming3RopDown = 4, + Reaming3RpmDown = 5, + Reaming3RpmUp = 6, + Tight = 1, + }; + + private readonly ProcessMapPlanReamingSlide entity = new ProcessMapPlanReamingSlide() + { + IdWell = 1, + DepthEnd = 10, + DepthStart = 2, + Id = 0, + IdWellSectionType = 1, + IdAuthor = 1, + IdEditor = 1, + Creation = DateTimeOffset.UtcNow, + SlackingOff = 1, + Reaming3StopPointOffBottom = 2, + Reaming3RopUp = 3, + Reaming3Interval = 4, + Reaming2StopPointOffBottom = 5, + Reaming2RopUp = 6, + Reaming2RepetitionsCount = 7, + Reaming3FlowRateUp = 8, + Reaming2FlowRateUp = 9, + Reaming1StopPointOffBottom = 1, + Reaming1RopUp = 1, + Reaming1Interval = 2, + DifferentialPressure = 3, + PressureMax = 4, + TorqueMax = 5, + Note = "1", + Reaming1FlowRateDown = 6, + Reaming1FlowRateUp = 7, + Reaming1RepetitionsCount = 8, + Reaming1RopDown = 9, + Reaming1RpmDown = 1, + Reaming1RpmUp = 1, + Reaming2FlowRateDown = 2, + Reaming2Interval = 3, + Reaming2RopDown = 3, + Reaming2RpmDown = 4, + Reaming2RpmUp = 5, + Reaming3FlowRateDown = 6, + Reaming3RepetitionsCount = 3, + Reaming3RopDown = 4, + Reaming3RpmDown = 5, + Reaming3RpmUp = 6, + Tight = 1, + }; + + [Fact] + public async Task Get_actual_returns_success() + { + await Get(entity, dto); + } + + protected override ProcessMapPlanReamingSlide GetByNote(DbSet dbSet, ProcessMapPlanReamingSlideDto dto) + { + throw new NotImplementedException(); + } + + protected override ProcessMapPlanReamingSlideDto GetByNote(IEnumerable dtos, ProcessMapPlanReamingSlideDto dto) + { + throw new NotImplementedException(); + } + + protected override ProcessMapPlanReamingSlide? GetByWellId() + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanOperationReamingSlideControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanOperationReamingSlideControllerTest.cs deleted file mode 100644 index e21f6a5b..00000000 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanOperationReamingSlideControllerTest.cs +++ /dev/null @@ -1,131 +0,0 @@ -using AsbCloudApp.Data.ProcessMaps; -using AsbCloudApp.Repositories; -using AsbCloudApp.Requests; -using AsbCloudApp.Services; -using AsbCloudDb.Model.ProcessMaps; -using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; -using AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; -using AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan; -using AsbCloudWebApi.IntegrationTests; -using Microsoft.EntityFrameworkCore; -using Xunit; - -namespace AsbCloudWebApi.Controllers.ProcessMaps; - -/// -/// РТК план проработка для слайда -/// -public class ProcessMapPlanOperationReamingSlideControllerTest : - ProcessMapPlanBaseControllerTest -{ - public ProcessMapPlanOperationReamingSlideControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanOperationReamingSlide") - { - } - private readonly ProcessMapPlanOperationReamingSlideDto dto = new ProcessMapPlanOperationReamingSlideDto() - { - IdWell = 1, - DepthStart = 1, - DepthEnd = 2, - Id = 0, - IdWellSectionType = 1, - SetpointsSlackingOff = 1, - Reaming3StopPointOffBottom = 2, - Reaming3ROPUp = 3, - Reaming3Interval = 4, - Reaming2StopPointOffBottom = 5, - Reaming2ROPUp = 6, - Reaming2NumberOfRepetitions = 7, - Reaming3FlowRateUp = 8, - Reaming2FlowRateUp = 9, - Reaming1StopPointOffBottom = 1, - Reaming1ROPUp = 1, - Reaming1Interval = 2, - DifferentialPressure = 3, - MaxPressure = 4, - MaxTorque = 5, - Note = "1", - Reaming1FlowRateDown = 6, - Reaming1FlowRateUp = 7, - Reaming1NumberOfRepetitions = 8, - Reaming1ROPDown = 9, - Reaming1RPMDown = 1, - Reaming1RPMUp = 1, - Reaming2FlowRateDown = 2, - Reaming2Interval = 3, - Reaming2ROPDown = 3, - Reaming2RPMDown = 4, - Reaming2RPMUp = 5, - Reaming3FlowRateDown = 6, - Reaming3NumberOfRepetitions = 3, - Reaming3ROPDown = 4, - Reaming3RPMDown = 5, - Reaming3RPMUp = 6, - SetpointsTight = 1, - }; - - private readonly ProcessMapPlanOperationReamingSlide entity = new ProcessMapPlanOperationReamingSlide() - { - IdWell = 1, - DepthEnd = 10, - DepthStart = 2, - Id = 0, - IdWellSectionType = 1, - IdAuthor = 1, - IdEditor = 1, - Creation = DateTimeOffset.UtcNow, - SetpointsSlackingOff = 1, - Reaming3StopPointOffBottom = 2, - Reaming3ROPUp = 3, - Reaming3Interval = 4, - Reaming2StopPointOffBottom = 5, - Reaming2ROPUp = 6, - Reaming2NumberOfRepetitions = 7, - Reaming3FlowRateUp = 8, - Reaming2FlowRateUp = 9, - Reaming1StopPointOffBottom = 1, - Reaming1ROPUp = 1, - Reaming1Interval = 2, - DifferentialPressure = 3, - MaxPressure = 4, - MaxTorque = 5, - Note = "1", - Reaming1FlowRateDown = 6, - Reaming1FlowRateUp = 7, - Reaming1NumberOfRepetitions = 8, - Reaming1ROPDown = 9, - Reaming1RPMDown = 1, - Reaming1RPMUp = 1, - Reaming2FlowRateDown = 2, - Reaming2Interval = 3, - Reaming2ROPDown = 3, - Reaming2RPMDown = 4, - Reaming2RPMUp = 5, - Reaming3FlowRateDown = 6, - Reaming3NumberOfRepetitions = 3, - Reaming3ROPDown = 4, - Reaming3RPMDown = 5, - Reaming3RPMUp = 6, - SetpointsTight = 1, - }; - - [Fact] - public async Task Get_actual_returns_success() - { - await Get(entity, dto); - } - - protected override ProcessMapPlanOperationReamingSlide GetByNote(DbSet dbSet, ProcessMapPlanOperationReamingSlideDto dto) - { - throw new NotImplementedException(); - } - - protected override ProcessMapPlanOperationReamingSlideDto GetByNote(IEnumerable dtos, ProcessMapPlanOperationReamingSlideDto dto) - { - throw new NotImplementedException(); - } - - protected override ProcessMapPlanOperationReamingSlide? GetByWellId() - { - throw new NotImplementedException(); - } -} \ No newline at end of file diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanOperationReamingSlideController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanReamingSlideController.cs similarity index 60% rename from AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanOperationReamingSlideController.cs rename to AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanReamingSlideController.cs index 007d0844..2883b939 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanOperationReamingSlideController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanReamingSlideController.cs @@ -11,15 +11,15 @@ namespace AsbCloudWebApi.Controllers.ProcessMaps; /// /// РТК план проработка для слайда /// -public class ProcessMapPlanOperationReamingSlideController : - ProcessMapPlanBaseController +public class ProcessMapPlanReamingSlideController : + ProcessMapPlanBaseController { - public ProcessMapPlanOperationReamingSlideController( - IChangeLogRepository repository, + public ProcessMapPlanReamingSlideController( + IChangeLogRepository repository, IWellService wellService, - ProcessMapPlanOperationReamingSlideParser parserService, + ProcessMapPlanReamingSlideParser parserService, ITelemetryService telemetryService, - ProcessMapPlanOperationReamingSlideExportService processMapPlanExportService) + ProcessMapPlanReamingSlideExportService processMapPlanExportService) : base(repository, wellService, parserService, processMapPlanExportService, telemetryService) { }