forked from ddrilling/AsbCloudServer
Осцилляция
This commit is contained in:
parent
9fac4edaf6
commit
04fd517ab1
@ -5,7 +5,7 @@ namespace AsbCloudApp.Data.ProcessMaps;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// РТК план осцилляция
|
/// РТК план осцилляция
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ProcessMapPlanFunctionsOscillationDto : ProcessMapPlanBaseDto
|
public class ProcessMapPlanOscillationDto : ProcessMapPlanBaseDto
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Оптимальный угол осцилляции, градусы
|
/// Оптимальный угол осцилляции, градусы
|
||||||
@ -17,31 +17,31 @@ public class ProcessMapPlanFunctionsOscillationDto : ProcessMapPlanBaseDto
|
|||||||
/// Скорость вправо, об/мин
|
/// Скорость вправо, об/мин
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Range(0.0, 270.0, ErrorMessage = "Скорость вправо, об/мин, должно быть в пределах от 0 до 270")]
|
[Range(0.0, 270.0, ErrorMessage = "Скорость вправо, об/мин, должно быть в пределах от 0 до 270")]
|
||||||
public double RPMRight { get; set; }
|
public double RpmRight { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Скорость влево, об/мин
|
/// Скорость влево, об/мин
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Range(0.0, 270.0, ErrorMessage = "Скорость влево, об/мин, должно быть в пределах от 0 до 270")]
|
[Range(0.0, 270.0, ErrorMessage = "Скорость влево, об/мин, должно быть в пределах от 0 до 270")]
|
||||||
public double RPMLeft { get; set; }
|
public double RpmLeft { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ограничение момента вправо, кН*м
|
/// Ограничение момента вправо, кН*м
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Range(0.0, 35.0, ErrorMessage = "Ограничение момента вправо, кН*м., должно быть в пределах от 0 до 35")]
|
[Range(0.0, 35.0, ErrorMessage = "Ограничение момента вправо, кН*м., должно быть в пределах от 0 до 35")]
|
||||||
public double TorqueLimitRight { get; set; }
|
public double TorqueMaxRight { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ограничение момента влево, кН*м
|
/// Ограничение момента влево, кН*м
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Range(0.0, 35.0, ErrorMessage = "Ограничение момента влево, кН*м., должно быть в пределах от 0 до 35")]
|
[Range(0.0, 35.0, ErrorMessage = "Ограничение момента влево, кН*м., должно быть в пределах от 0 до 35")]
|
||||||
public double TorqueLimitLeft { get; set; }
|
public double TorqueMaxLeft { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Режим Авто/Руч
|
/// Режим Авто/Руч
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
[Range(0, 1, ErrorMessage = "Режим Авто/Руч, должен быть либо 0, либо 1")]
|
||||||
public bool Mode { get; set; }
|
public int Mode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Примечание
|
/// Примечание
|
@ -0,0 +1,20 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace AsbCloudApp.Data.ProcessMaps;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// РТК план обновление холостого хода
|
||||||
|
/// </summary>
|
||||||
|
public class ProcessMapPlanUpdatingNoloadParametersDto : ProcessMapPlanBaseDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// СПУСК ОК Да/Нет
|
||||||
|
/// </summary>
|
||||||
|
public bool IdDeclineSocketColumn { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Примечание
|
||||||
|
/// </summary>
|
||||||
|
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
||||||
|
public string Note { get; set; } = string.Empty;
|
||||||
|
}
|
@ -37,7 +37,7 @@ namespace AsbCloudDb.Model
|
|||||||
public virtual DbSet<ProcessMapPlanFunctionsAutoHold> ProcessMapPlanFunctionsAutoHold => Set<ProcessMapPlanFunctionsAutoHold>();
|
public virtual DbSet<ProcessMapPlanFunctionsAutoHold> ProcessMapPlanFunctionsAutoHold => Set<ProcessMapPlanFunctionsAutoHold>();
|
||||||
public virtual DbSet<ProcessMapPlanFunctionsJarrDrillTool> ProcessMapPlanFunctionsJarrDrillTool => Set<ProcessMapPlanFunctionsJarrDrillTool>();
|
public virtual DbSet<ProcessMapPlanFunctionsJarrDrillTool> ProcessMapPlanFunctionsJarrDrillTool => Set<ProcessMapPlanFunctionsJarrDrillTool>();
|
||||||
public virtual DbSet<ProcessMapPlanUpdatingNoloadParameters> ProcessMapPlanFunctionsUpgradeNoload => Set<ProcessMapPlanUpdatingNoloadParameters>();
|
public virtual DbSet<ProcessMapPlanUpdatingNoloadParameters> ProcessMapPlanFunctionsUpgradeNoload => Set<ProcessMapPlanUpdatingNoloadParameters>();
|
||||||
public virtual DbSet<ProcessMapPlanFunctionsOscillation> ProcessMapPlanFunctionsOscillation => Set<ProcessMapPlanFunctionsOscillation>();
|
public virtual DbSet<ProcessMapPlanOscillation> ProcessMapPlanFunctionsOscillation => Set<ProcessMapPlanOscillation>();
|
||||||
public virtual DbSet<ProcessMapPlanAntiCrashRotation> ProcessMapPlanFunctionsAnticrashRotation => Set<ProcessMapPlanAntiCrashRotation>();
|
public virtual DbSet<ProcessMapPlanAntiCrashRotation> ProcessMapPlanFunctionsAnticrashRotation => Set<ProcessMapPlanAntiCrashRotation>();
|
||||||
public virtual DbSet<ProcessMapPlanFunctionsStaticMeasure> ProcessMapPlanFunctionsStaticMeasure => Set<ProcessMapPlanFunctionsStaticMeasure>();
|
public virtual DbSet<ProcessMapPlanFunctionsStaticMeasure> ProcessMapPlanFunctionsStaticMeasure => Set<ProcessMapPlanFunctionsStaticMeasure>();
|
||||||
|
|
||||||
@ -548,7 +548,7 @@ namespace AsbCloudDb.Model
|
|||||||
.WithMany()
|
.WithMany()
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
modelBuilder.Entity<ProcessMapPlanFunctionsOscillation>()
|
modelBuilder.Entity<ProcessMapPlanOscillation>()
|
||||||
.HasOne(p => p.Author)
|
.HasOne(p => p.Author)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
@ -648,7 +648,7 @@ namespace AsbCloudDb.Model
|
|||||||
.WithMany()
|
.WithMany()
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
|
||||||
modelBuilder.Entity<ProcessMapPlanFunctionsOscillation>()
|
modelBuilder.Entity<ProcessMapPlanOscillation>()
|
||||||
.HasOne(p => p.Editor)
|
.HasOne(p => p.Editor)
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
|
@ -98,7 +98,7 @@ namespace AsbCloudDb.Model
|
|||||||
DbSet<ProcessMapPlanFunctionsAutoHold> ProcessMapPlanFunctionsAutoHold { get; }
|
DbSet<ProcessMapPlanFunctionsAutoHold> ProcessMapPlanFunctionsAutoHold { get; }
|
||||||
DbSet<ProcessMapPlanFunctionsJarrDrillTool> ProcessMapPlanFunctionsJarrDrillTool { get; }
|
DbSet<ProcessMapPlanFunctionsJarrDrillTool> ProcessMapPlanFunctionsJarrDrillTool { get; }
|
||||||
DbSet<ProcessMapPlanUpdatingNoloadParameters> ProcessMapPlanFunctionsUpgradeNoload { get; }
|
DbSet<ProcessMapPlanUpdatingNoloadParameters> ProcessMapPlanFunctionsUpgradeNoload { get; }
|
||||||
DbSet<ProcessMapPlanFunctionsOscillation> ProcessMapPlanFunctionsOscillation { get; }
|
DbSet<ProcessMapPlanOscillation> ProcessMapPlanFunctionsOscillation { get; }
|
||||||
DbSet<ProcessMapPlanAntiCrashRotation> ProcessMapPlanFunctionsAnticrashRotation { get; }
|
DbSet<ProcessMapPlanAntiCrashRotation> ProcessMapPlanFunctionsAnticrashRotation { get; }
|
||||||
DbSet<ProcessMapPlanFunctionsStaticMeasure> ProcessMapPlanFunctionsStaticMeasure { get; }
|
DbSet<ProcessMapPlanFunctionsStaticMeasure> ProcessMapPlanFunctionsStaticMeasure { get; }
|
||||||
|
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
using AsbCloudDb.Model.ProcessMapPlan;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
|
|
||||||
namespace AsbCloudDb.Model.ProcessMaps;
|
|
||||||
|
|
||||||
[Table("t_process_map_plan_functions_oscillation"), Comment("Осцилляция")]
|
|
||||||
public class ProcessMapPlanFunctionsOscillation : ProcessMapPlanBase
|
|
||||||
{
|
|
||||||
[Column("optimal_oscillation_angle"), Comment("Оптимальный угол осцилляции, градусы")]
|
|
||||||
[Range(0.0, 6000.0)]
|
|
||||||
[Required]
|
|
||||||
public double OptimalOscillationAngle { get; set; }
|
|
||||||
|
|
||||||
[Column("RPM_right"), Comment("Скорость вправо, об/мин")]
|
|
||||||
[Range(0.0, 270.0)]
|
|
||||||
[Required]
|
|
||||||
public double RPMRight { get; set; }
|
|
||||||
|
|
||||||
[Column("RPM_left"), Comment("Скорость влево, об/мин")]
|
|
||||||
[Range(0.0, 270.0)]
|
|
||||||
[Required]
|
|
||||||
public double RPMLeft { get; set; }
|
|
||||||
|
|
||||||
[Column("torque_limit_right"), Comment("Ограничение момента вправо, кН*м")]
|
|
||||||
[Range(0.0, 35.0)]
|
|
||||||
[Required]
|
|
||||||
public double TorqueLimitRight { get; set; }
|
|
||||||
|
|
||||||
[Column("torque_limit_left"), Comment("Ограничение момента влево, кН*м")]
|
|
||||||
[Range(0.0, 35.0)]
|
|
||||||
[Required]
|
|
||||||
public double TorqueLimitLeft { get; set; }
|
|
||||||
|
|
||||||
[Column("id_mode"), Comment("Режим Авто/Руч")]
|
|
||||||
[Required]
|
|
||||||
public bool Mode { get; set; }
|
|
||||||
|
|
||||||
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
|
||||||
public string Note { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
[ForeignKey(nameof(IdPrevious))]
|
|
||||||
public virtual ProcessMapPlanFunctionsOscillation? Previous { get; set; }
|
|
||||||
}
|
|
46
AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanOscillation.cs
Normal file
46
AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanOscillation.cs
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using AsbCloudDb.Model.ProcessMapPlan;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace AsbCloudDb.Model.ProcessMaps;
|
||||||
|
|
||||||
|
[Table("t_process_map_plan_oscillation"), Comment("Осцилляция")]
|
||||||
|
public class ProcessMapPlanOscillation : ProcessMapPlanBase
|
||||||
|
{
|
||||||
|
[Column("optimal_oscillation_angle"), Comment("Оптимальный угол осцилляции, градусы")]
|
||||||
|
[Range(0.0, 6000.0)]
|
||||||
|
[Required]
|
||||||
|
public double OptimalOscillationAngle { get; set; }
|
||||||
|
|
||||||
|
[Column("Rpm_right"), Comment("Скорость вправо, об/мин")]
|
||||||
|
[Range(0.0, 270.0)]
|
||||||
|
[Required]
|
||||||
|
public double RpmRight { get; set; }
|
||||||
|
|
||||||
|
[Column("Rpm_left"), Comment("Скорость влево, об/мин")]
|
||||||
|
[Range(0.0, 270.0)]
|
||||||
|
[Required]
|
||||||
|
public double RpmLeft { get; set; }
|
||||||
|
|
||||||
|
[Column("torque_max_right"), Comment("Ограничение момента вправо, кН*м")]
|
||||||
|
[Range(0.0, 35.0)]
|
||||||
|
[Required]
|
||||||
|
public double TorqueMaxRight { get; set; }
|
||||||
|
|
||||||
|
[Column("torque_max_left"), Comment("Ограничение момента влево, кН*м")]
|
||||||
|
[Range(0.0, 35.0)]
|
||||||
|
[Required]
|
||||||
|
public double TorqueMaxLeft { get; set; }
|
||||||
|
|
||||||
|
[Column("mode"), Comment("Режим Авто/Руч")]
|
||||||
|
[Range(0, 1)]
|
||||||
|
[Required]
|
||||||
|
public int Mode { get; set; }
|
||||||
|
|
||||||
|
[Column("note"), Comment("Примечание"), StringLength(1024)]
|
||||||
|
public string Note { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[ForeignKey(nameof(IdPrevious))]
|
||||||
|
public virtual ProcessMapPlanOscillation? Previous { get; set; }
|
||||||
|
}
|
@ -251,11 +251,11 @@ namespace AsbCloudInfrastructure
|
|||||||
Item = src.Adapt<ProcessMapPlanUpdatingNoloadParametersDto>()
|
Item = src.Adapt<ProcessMapPlanUpdatingNoloadParametersDto>()
|
||||||
});
|
});
|
||||||
|
|
||||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanFunctionsOscillationDto>>.NewConfig()
|
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanOscillationDto>>.NewConfig()
|
||||||
.Include<ProcessMapPlanFunctionsOscillation, ChangeLogDto<ProcessMapPlanFunctionsOscillationDto>>()
|
.Include<ProcessMapPlanOscillation, ChangeLogDto<ProcessMapPlanOscillationDto>>()
|
||||||
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanFunctionsOscillationDto>()
|
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanOscillationDto>()
|
||||||
{
|
{
|
||||||
Item = src.Adapt<ProcessMapPlanFunctionsOscillationDto>()
|
Item = src.Adapt<ProcessMapPlanOscillationDto>()
|
||||||
});
|
});
|
||||||
|
|
||||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanAntiCrashRotationDto>>.NewConfig()
|
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanAntiCrashRotationDto>>.NewConfig()
|
||||||
@ -444,7 +444,7 @@ namespace AsbCloudInfrastructure
|
|||||||
services.AddTransient<ProcessMapPlanFunctionsAutoHoldParser>();
|
services.AddTransient<ProcessMapPlanFunctionsAutoHoldParser>();
|
||||||
services.AddTransient<ProcessMapPlanFunctionsJarrDrillToolParser>();
|
services.AddTransient<ProcessMapPlanFunctionsJarrDrillToolParser>();
|
||||||
services.AddTransient<ProcessMapPlanUpdatingNoloadParametersParser>();
|
services.AddTransient<ProcessMapPlanUpdatingNoloadParametersParser>();
|
||||||
services.AddTransient<ProcessMapPlanFunctionsOscillationParser>();
|
services.AddTransient<ProcessMapPlanOscillationParser>();
|
||||||
services.AddTransient<ProcessMapPlanAntiCrashRotationParser>();
|
services.AddTransient<ProcessMapPlanAntiCrashRotationParser>();
|
||||||
services.AddTransient<ProcessMapPlanFunctionsStaticMeasureParser>();
|
services.AddTransient<ProcessMapPlanFunctionsStaticMeasureParser>();
|
||||||
|
|
||||||
@ -470,7 +470,7 @@ namespace AsbCloudInfrastructure
|
|||||||
services.AddTransient<ProcessMapPlanFunctionsAutoHoldExportService>();
|
services.AddTransient<ProcessMapPlanFunctionsAutoHoldExportService>();
|
||||||
services.AddTransient<ProcessMapPlanFunctionsJarrDrillToolExportService>();
|
services.AddTransient<ProcessMapPlanFunctionsJarrDrillToolExportService>();
|
||||||
services.AddTransient<ProcessMapPlanUpdatingNoloadParametersExportService>();
|
services.AddTransient<ProcessMapPlanUpdatingNoloadParametersExportService>();
|
||||||
services.AddTransient<ProcessMapPlanFunctionsOscillationExportService>();
|
services.AddTransient<ProcessMapPlanOscillationExportService>();
|
||||||
services.AddTransient<ProcessMapPlanAntiCrashRotationExportService>();
|
services.AddTransient<ProcessMapPlanAntiCrashRotationExportService>();
|
||||||
services.AddTransient<ProcessMapPlanFunctionsStaticMeasureExportService>();
|
services.AddTransient<ProcessMapPlanFunctionsStaticMeasureExportService>();
|
||||||
|
|
||||||
@ -555,8 +555,8 @@ namespace AsbCloudInfrastructure
|
|||||||
ProcessMapPlanBaseRepository<ProcessMapPlanUpdatingNoloadParameters, ProcessMapPlanUpdatingNoloadParametersDto>>();
|
ProcessMapPlanBaseRepository<ProcessMapPlanUpdatingNoloadParameters, ProcessMapPlanUpdatingNoloadParametersDto>>();
|
||||||
|
|
||||||
services.AddTransient<
|
services.AddTransient<
|
||||||
IChangeLogRepository<ProcessMapPlanFunctionsOscillationDto, ProcessMapPlanBaseRequestWithWell>,
|
IChangeLogRepository<ProcessMapPlanOscillationDto, ProcessMapPlanBaseRequestWithWell>,
|
||||||
ProcessMapPlanBaseRepository<ProcessMapPlanFunctionsOscillation, ProcessMapPlanFunctionsOscillationDto>>();
|
ProcessMapPlanBaseRepository<ProcessMapPlanOscillation, ProcessMapPlanOscillationDto>>();
|
||||||
|
|
||||||
services.AddTransient<
|
services.AddTransient<
|
||||||
IChangeLogRepository<ProcessMapPlanAntiCrashRotationDto, ProcessMapPlanBaseRequestWithWell>,
|
IChangeLogRepository<ProcessMapPlanAntiCrashRotationDto, ProcessMapPlanBaseRequestWithWell>,
|
||||||
@ -583,7 +583,7 @@ namespace AsbCloudInfrastructure
|
|||||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsAutoHoldDto>>();
|
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsAutoHoldDto>>();
|
||||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsJarrDrillToolDto>>();
|
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsJarrDrillToolDto>>();
|
||||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanUpdatingNoloadParametersDto>>();
|
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanUpdatingNoloadParametersDto>>();
|
||||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsOscillationDto>>();
|
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOscillationDto>>();
|
||||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanAntiCrashRotationDto>>();
|
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanAntiCrashRotationDto>>();
|
||||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsStaticMeasureDto>>();
|
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsStaticMeasureDto>>();
|
||||||
|
|
||||||
|
@ -2,13 +2,13 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
|
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
|
||||||
|
|
||||||
public class ProcessMapPlanFunctionsOscillationTemplate : ITemplateParameters
|
public class ProcessMapPlanOscillationTemplate : ITemplateParameters
|
||||||
{
|
{
|
||||||
public string SheetName => "Осцилляция";
|
public string SheetName => "Осцилляция";
|
||||||
|
|
||||||
public int HeaderRowsCount => 2;
|
public int HeaderRowsCount => 2;
|
||||||
|
|
||||||
public string FileName => "ProcessMapPlanFunctionsOscillationTemplate.xlsx";
|
public string FileName => "ProcessMapPlanOscillationTemplate.xlsx";
|
||||||
|
|
||||||
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
|
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
|
||||||
{
|
{
|
@ -10,16 +10,16 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
|
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
|
||||||
|
|
||||||
public class ProcessMapPlanFunctionsOscillationExportService : ProcessMapPlanExportService<ProcessMapPlanFunctionsOscillationDto>
|
public class ProcessMapPlanOscillationExportService : ProcessMapPlanExportService<ProcessMapPlanOscillationDto>
|
||||||
{
|
{
|
||||||
public ProcessMapPlanFunctionsOscillationExportService(
|
public ProcessMapPlanOscillationExportService(
|
||||||
IChangeLogRepository<ProcessMapPlanFunctionsOscillationDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
IChangeLogRepository<ProcessMapPlanOscillationDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
||||||
IWellService wellService)
|
IWellService wellService)
|
||||||
: base(processMapPlanRepository, wellService)
|
: base(processMapPlanRepository, wellService)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanFunctionsOscillationTemplate();
|
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanOscillationTemplate();
|
||||||
|
|
||||||
protected override async Task<string> BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token)
|
protected override async Task<string> BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token)
|
||||||
{
|
{
|
@ -9,16 +9,16 @@ using AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemp
|
|||||||
|
|
||||||
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
|
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
|
||||||
|
|
||||||
public class ProcessMapPlanFunctionsOscillationParser : ProcessMapPlanParser<ProcessMapPlanFunctionsOscillationDto>
|
public class ProcessMapPlanOscillationParser : ProcessMapPlanParser<ProcessMapPlanOscillationDto>
|
||||||
{
|
{
|
||||||
public ProcessMapPlanFunctionsOscillationParser(IWellOperationRepository wellOperationRepository)
|
public ProcessMapPlanOscillationParser(IWellOperationRepository wellOperationRepository)
|
||||||
: base(wellOperationRepository)
|
: base(wellOperationRepository)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanFunctionsOscillationTemplate();
|
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanOscillationTemplate();
|
||||||
|
|
||||||
protected override ProcessMapPlanFunctionsOscillationDto BuildDto(IDictionary<string, object?> row, int rowNumber)
|
protected override ProcessMapPlanOscillationDto BuildDto(IDictionary<string, object?> row, int rowNumber)
|
||||||
{
|
{
|
||||||
var dto = base.BuildDto(row, rowNumber);
|
var dto = base.BuildDto(row, rowNumber);
|
||||||
|
|
@ -1,79 +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;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// РТК план осцилляция
|
|
||||||
/// </summary>
|
|
||||||
public class ProcessMapPlanFunctionsOscillationControllerTest :
|
|
||||||
ProcessMapPlanBaseControllerTest<ProcessMapPlanFunctionsOscillation, ProcessMapPlanFunctionsOscillationDto>
|
|
||||||
{
|
|
||||||
public ProcessMapPlanFunctionsOscillationControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanFunctionsOscillation")
|
|
||||||
{
|
|
||||||
}
|
|
||||||
private readonly ProcessMapPlanFunctionsOscillationDto dto = new ProcessMapPlanFunctionsOscillationDto()
|
|
||||||
{
|
|
||||||
IdWell = 1,
|
|
||||||
DepthStart = 1,
|
|
||||||
DepthEnd = 2,
|
|
||||||
Id = 0,
|
|
||||||
IdWellSectionType = 1,
|
|
||||||
Mode = true,
|
|
||||||
Note = "1",
|
|
||||||
OptimalOscillationAngle = 1,
|
|
||||||
RPMLeft = 2,
|
|
||||||
RPMRight = 3,
|
|
||||||
TorqueLimitLeft = 4,
|
|
||||||
TorqueLimitRight = 5
|
|
||||||
};
|
|
||||||
|
|
||||||
private readonly ProcessMapPlanFunctionsOscillation entity = new ProcessMapPlanFunctionsOscillation()
|
|
||||||
{
|
|
||||||
IdWell = 1,
|
|
||||||
DepthEnd = 10,
|
|
||||||
DepthStart = 2,
|
|
||||||
Id = 0,
|
|
||||||
IdWellSectionType = 1,
|
|
||||||
IdAuthor = 1,
|
|
||||||
IdEditor = 1,
|
|
||||||
Creation = DateTimeOffset.UtcNow,
|
|
||||||
Mode = true,
|
|
||||||
Note = "1",
|
|
||||||
OptimalOscillationAngle = 1,
|
|
||||||
RPMLeft = 2,
|
|
||||||
RPMRight = 3,
|
|
||||||
TorqueLimitLeft = 4,
|
|
||||||
TorqueLimitRight = 5
|
|
||||||
};
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public async Task Get_actual_returns_success()
|
|
||||||
{
|
|
||||||
await Get(entity, dto);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override ProcessMapPlanFunctionsOscillation GetByNote(DbSet<ProcessMapPlanFunctionsOscillation> dbSet, ProcessMapPlanFunctionsOscillationDto dto)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override ProcessMapPlanFunctionsOscillationDto GetByNote(IEnumerable<ProcessMapPlanFunctionsOscillationDto> dtos, ProcessMapPlanFunctionsOscillationDto dto)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override ProcessMapPlanFunctionsOscillation? GetByWellId()
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,71 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// РТК план осцилляция
|
||||||
|
/// </summary>
|
||||||
|
public class ProcessMapPlanOscillationControllerTest :
|
||||||
|
ProcessMapPlanBaseControllerTest<ProcessMapPlanOscillation, ProcessMapPlanOscillationDto>
|
||||||
|
{
|
||||||
|
public ProcessMapPlanOscillationControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanFunctionsOscillation")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
private readonly ProcessMapPlanOscillationDto dto = new ProcessMapPlanOscillationDto()
|
||||||
|
{
|
||||||
|
IdWell = 1,
|
||||||
|
DepthStart = 1,
|
||||||
|
DepthEnd = 2,
|
||||||
|
Id = 0,
|
||||||
|
IdWellSectionType = 1,
|
||||||
|
Mode = 1,
|
||||||
|
Note = "1",
|
||||||
|
OptimalOscillationAngle = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
private readonly ProcessMapPlanOscillation entity = new ProcessMapPlanOscillation()
|
||||||
|
{
|
||||||
|
IdWell = 1,
|
||||||
|
DepthEnd = 10,
|
||||||
|
DepthStart = 2,
|
||||||
|
Id = 0,
|
||||||
|
IdWellSectionType = 1,
|
||||||
|
IdAuthor = 1,
|
||||||
|
IdEditor = 1,
|
||||||
|
Creation = DateTimeOffset.UtcNow,
|
||||||
|
Mode = 1,
|
||||||
|
Note = "1",
|
||||||
|
OptimalOscillationAngle = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task Get_actual_returns_success()
|
||||||
|
{
|
||||||
|
await Get(entity, dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ProcessMapPlanOscillation GetByNote(DbSet<ProcessMapPlanOscillation> dbSet, ProcessMapPlanOscillationDto dto)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ProcessMapPlanOscillationDto GetByNote(IEnumerable<ProcessMapPlanOscillationDto> dtos, ProcessMapPlanOscillationDto dto)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ProcessMapPlanOscillation? GetByWellId()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
@ -11,15 +11,15 @@ namespace AsbCloudWebApi.Controllers.ProcessMaps;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// РТК план осцилляция
|
/// РТК план осцилляция
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ProcessMapPlanFunctionsOscillationController :
|
public class ProcessMapPlanOscillationController :
|
||||||
ProcessMapPlanBaseController<ProcessMapPlanFunctionsOscillation, ProcessMapPlanFunctionsOscillationDto>
|
ProcessMapPlanBaseController<ProcessMapPlanOscillation, ProcessMapPlanOscillationDto>
|
||||||
{
|
{
|
||||||
public ProcessMapPlanFunctionsOscillationController(
|
public ProcessMapPlanOscillationController(
|
||||||
IChangeLogRepository<ProcessMapPlanFunctionsOscillationDto, ProcessMapPlanBaseRequestWithWell> repository,
|
IChangeLogRepository<ProcessMapPlanOscillationDto, ProcessMapPlanBaseRequestWithWell> repository,
|
||||||
IWellService wellService,
|
IWellService wellService,
|
||||||
ProcessMapPlanFunctionsOscillationParser parserService,
|
ProcessMapPlanOscillationParser parserService,
|
||||||
ITelemetryService telemetryService,
|
ITelemetryService telemetryService,
|
||||||
ProcessMapPlanFunctionsOscillationExportService processMapPlanExportService)
|
ProcessMapPlanOscillationExportService processMapPlanExportService)
|
||||||
: base(repository, wellService, parserService, processMapPlanExportService, telemetryService)
|
: base(repository, wellService, parserService, processMapPlanExportService, telemetryService)
|
||||||
{
|
{
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user