forked from ddrilling/AsbCloudServer
Выход на обороты перед ротором
This commit is contained in:
parent
350d12e8a0
commit
474495cd56
@ -1,27 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace AsbCloudApp.Data.ProcessMaps;
|
||||
|
||||
/// <summary>
|
||||
/// РТК план встряхивание бурового инструмента
|
||||
/// </summary>
|
||||
public class ProcessMapPlanFunctionsJarrDrillToolDto : ProcessMapPlanBaseDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Зенитный угол, градусы
|
||||
/// </summary>
|
||||
[Range(0.0, 100.0, ErrorMessage = "Зенитный угол, градусы, должно быть в пределах от 0 до 100")]
|
||||
public double ZenithAngle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Складывание, м
|
||||
/// </summary>
|
||||
[Range(0.0, 20.0, ErrorMessage = "Складывание, м., должно быть в пределах от 0 до 20")]
|
||||
public double Buckling { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Примечание
|
||||
/// </summary>
|
||||
[StringLength(1024, ErrorMessage = "Примечание, должно быть не более 1024 символов")]
|
||||
public string Note { get; set; } = string.Empty;
|
||||
}
|
@ -35,7 +35,7 @@ namespace AsbCloudDb.Model
|
||||
public virtual DbSet<ProcessMapPlanShockTest> ProcessMapPlanFunctionsShockTest => Set<ProcessMapPlanShockTest>();
|
||||
public virtual DbSet<ProcessMapPlanDamper> ProcessMapPlanFunctionsDamper => Set<ProcessMapPlanDamper>();
|
||||
public virtual DbSet<ProcessMapPlanAutoHoldTF> ProcessMapPlanFunctionsAutoHold => Set<ProcessMapPlanAutoHoldTF>();
|
||||
public virtual DbSet<ProcessMapPlanFunctionsJarrDrillTool> ProcessMapPlanFunctionsJarrDrillTool => Set<ProcessMapPlanFunctionsJarrDrillTool>();
|
||||
public virtual DbSet<ProcessMapPlanRotorRpmAcceleration> ProcessMapPlanFunctionsJarrDrillTool => Set<ProcessMapPlanRotorRpmAcceleration>();
|
||||
public virtual DbSet<ProcessMapPlanUpdatingNoloadParameters> ProcessMapPlanFunctionsUpgradeNoload => Set<ProcessMapPlanUpdatingNoloadParameters>();
|
||||
public virtual DbSet<ProcessMapPlanOscillation> ProcessMapPlanFunctionsOscillation => Set<ProcessMapPlanOscillation>();
|
||||
public virtual DbSet<ProcessMapPlanAntiCrashRotation> ProcessMapPlanFunctionsAnticrashRotation => Set<ProcessMapPlanAntiCrashRotation>();
|
||||
@ -538,7 +538,7 @@ namespace AsbCloudDb.Model
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
modelBuilder.Entity<ProcessMapPlanFunctionsJarrDrillTool>()
|
||||
modelBuilder.Entity<ProcessMapPlanRotorRpmAcceleration>()
|
||||
.HasOne(p => p.Author)
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
@ -638,7 +638,7 @@ namespace AsbCloudDb.Model
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
modelBuilder.Entity<ProcessMapPlanFunctionsJarrDrillTool>()
|
||||
modelBuilder.Entity<ProcessMapPlanRotorRpmAcceleration>()
|
||||
.HasOne(p => p.Editor)
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
@ -96,7 +96,7 @@ namespace AsbCloudDb.Model
|
||||
DbSet<ProcessMapPlanShockTest> ProcessMapPlanFunctionsShockTest { get; }
|
||||
DbSet<ProcessMapPlanDamper> ProcessMapPlanFunctionsDamper { get; }
|
||||
DbSet<ProcessMapPlanAutoHoldTF> ProcessMapPlanFunctionsAutoHold { get; }
|
||||
DbSet<ProcessMapPlanFunctionsJarrDrillTool> ProcessMapPlanFunctionsJarrDrillTool { get; }
|
||||
DbSet<ProcessMapPlanRotorRpmAcceleration> ProcessMapPlanFunctionsJarrDrillTool { get; }
|
||||
DbSet<ProcessMapPlanUpdatingNoloadParameters> ProcessMapPlanFunctionsUpgradeNoload { get; }
|
||||
DbSet<ProcessMapPlanOscillation> ProcessMapPlanFunctionsOscillation { get; }
|
||||
DbSet<ProcessMapPlanAntiCrashRotation> ProcessMapPlanFunctionsAnticrashRotation { get; }
|
||||
|
@ -5,8 +5,8 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace AsbCloudDb.Model.ProcessMaps;
|
||||
|
||||
[Table("t_process_map_plan_functions_jarr_drill_tool"), Comment("Встряхивание бурового инструмента")]
|
||||
public class ProcessMapPlanFunctionsJarrDrillTool : ProcessMapPlanBase
|
||||
[Table("t_process_map_plan_rotor_rpm_acceleration"), Comment("Выход на обороты перед ротором")]
|
||||
public class ProcessMapPlanRotorRpmAcceleration : ProcessMapPlanBase
|
||||
{
|
||||
[Column("zenit_angle"), Comment("Зенитный угол, градусы")]
|
||||
[Range(0.0, 100.0)]
|
||||
@ -22,5 +22,5 @@ public class ProcessMapPlanFunctionsJarrDrillTool : ProcessMapPlanBase
|
||||
public string Note { get; set; } = string.Empty;
|
||||
|
||||
[ForeignKey(nameof(IdPrevious))]
|
||||
public virtual ProcessMapPlanFunctionsJarrDrillTool? Previous { get; set; }
|
||||
public virtual ProcessMapPlanRotorRpmAcceleration? Previous { get; set; }
|
||||
}
|
@ -237,11 +237,11 @@ namespace AsbCloudInfrastructure
|
||||
Item = src.Adapt<ProcessMapPlanAutoHoldTFDto>()
|
||||
});
|
||||
|
||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanFunctionsJarrDrillToolDto>>.NewConfig()
|
||||
.Include<ProcessMapPlanFunctionsJarrDrillTool, ChangeLogDto<ProcessMapPlanFunctionsJarrDrillToolDto>>()
|
||||
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanFunctionsJarrDrillToolDto>()
|
||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<RotorRpmAccelerationDto>>.NewConfig()
|
||||
.Include<ProcessMapPlanRotorRpmAcceleration, ChangeLogDto<RotorRpmAccelerationDto>>()
|
||||
.Map(dest => dest, src => new ChangeLogDto<RotorRpmAccelerationDto>()
|
||||
{
|
||||
Item = src.Adapt<ProcessMapPlanFunctionsJarrDrillToolDto>()
|
||||
Item = src.Adapt<RotorRpmAccelerationDto>()
|
||||
});
|
||||
|
||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanUpdatingNoloadParametersDto>>.NewConfig()
|
||||
@ -442,7 +442,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<ProcessMapPlanShockTestParser>();
|
||||
services.AddTransient<ProcessMapPlanDamperParser>();
|
||||
services.AddTransient<ProcessMapPlanAutoHoldTFParser>();
|
||||
services.AddTransient<ProcessMapPlanFunctionsJarrDrillToolParser>();
|
||||
services.AddTransient<ProcessMapPlanRotorRpmAccelerationParser>();
|
||||
services.AddTransient<ProcessMapPlanUpdatingNoloadParametersParser>();
|
||||
services.AddTransient<ProcessMapPlanOscillationParser>();
|
||||
services.AddTransient<ProcessMapPlanAntiCrashRotationParser>();
|
||||
@ -468,7 +468,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<ProcessMapPlanShockTestExportService>();
|
||||
services.AddTransient<ProcessMapPlanDamperExportService>();
|
||||
services.AddTransient<ProcessMapPlanAutoHoldTFExportService>();
|
||||
services.AddTransient<ProcessMapPlanFunctionsJarrDrillToolExportService>();
|
||||
services.AddTransient<ProcessMapPlanRotorRpmAccelerationExportService>();
|
||||
services.AddTransient<ProcessMapPlanUpdatingNoloadParametersExportService>();
|
||||
services.AddTransient<ProcessMapPlanOscillationExportService>();
|
||||
services.AddTransient<ProcessMapPlanAntiCrashRotationExportService>();
|
||||
@ -547,8 +547,8 @@ namespace AsbCloudInfrastructure
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanAutoHoldTF, ProcessMapPlanAutoHoldTFDto>>();
|
||||
|
||||
services.AddTransient<
|
||||
IChangeLogRepository<ProcessMapPlanFunctionsJarrDrillToolDto, ProcessMapPlanBaseRequestWithWell>,
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanFunctionsJarrDrillTool, ProcessMapPlanFunctionsJarrDrillToolDto>>();
|
||||
IChangeLogRepository<RotorRpmAccelerationDto, ProcessMapPlanBaseRequestWithWell>,
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanRotorRpmAcceleration, RotorRpmAccelerationDto>>();
|
||||
|
||||
services.AddTransient<
|
||||
IChangeLogRepository<ProcessMapPlanUpdatingNoloadParametersDto, ProcessMapPlanBaseRequestWithWell>,
|
||||
@ -581,7 +581,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanShockTestDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanDamperDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanAutoHoldTFDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsJarrDrillToolDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<RotorRpmAccelerationDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanUpdatingNoloadParametersDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOscillationDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanAntiCrashRotationDto>>();
|
||||
|
@ -1,17 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
|
||||
|
||||
public class ProcessMapPlanFunctionsJarrDrillToolTemplate : ITemplateParameters
|
||||
{
|
||||
public string SheetName => "Встряхивание бурового инструмента";
|
||||
|
||||
public int HeaderRowsCount => 2;
|
||||
|
||||
public string FileName => "ProcessMapPlanFunctionsJarrDrillToolTemplate.xlsx";
|
||||
|
||||
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
|
||||
{
|
||||
|
||||
};
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
|
||||
|
||||
public class ProcessMapPlanRotorRpmAccelerationTemplate : ITemplateParameters
|
||||
{
|
||||
public string SheetName => "Выход на обороты перед ротором";
|
||||
|
||||
public int HeaderRowsCount => 2;
|
||||
|
||||
public string FileName => "ProcessMapPlanRotorRpmAccelerationTemplate.xlsx";
|
||||
|
||||
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
|
||||
{
|
||||
|
||||
};
|
||||
}
|
@ -10,21 +10,21 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
|
||||
|
||||
public class ProcessMapPlanFunctionsJarrDrillToolExportService : ProcessMapPlanExportService<ProcessMapPlanFunctionsJarrDrillToolDto>
|
||||
public class ProcessMapPlanRotorRpmAccelerationExportService : ProcessMapPlanExportService<RotorRpmAccelerationDto>
|
||||
{
|
||||
public ProcessMapPlanFunctionsJarrDrillToolExportService(
|
||||
IChangeLogRepository<ProcessMapPlanFunctionsJarrDrillToolDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
||||
public ProcessMapPlanRotorRpmAccelerationExportService(
|
||||
IChangeLogRepository<RotorRpmAccelerationDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
||||
IWellService wellService)
|
||||
: base(processMapPlanRepository, wellService)
|
||||
{
|
||||
}
|
||||
|
||||
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanFunctionsJarrDrillToolTemplate();
|
||||
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanRotorRpmAccelerationTemplate();
|
||||
|
||||
protected override async Task<string> BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token)
|
||||
{
|
||||
var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token);
|
||||
|
||||
return $"{caption}_РТК_План_встряхивание_бурового_инструмента.xlsx";
|
||||
return $"{caption}_РТК_План_выход_на_обороты_перед_ротором.xlsx";
|
||||
}
|
||||
}
|
@ -9,16 +9,16 @@ using AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemp
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
|
||||
|
||||
public class ProcessMapPlanFunctionsJarrDrillToolParser : ProcessMapPlanParser<ProcessMapPlanFunctionsJarrDrillToolDto>
|
||||
public class ProcessMapPlanRotorRpmAccelerationParser : ProcessMapPlanParser<RotorRpmAccelerationDto>
|
||||
{
|
||||
public ProcessMapPlanFunctionsJarrDrillToolParser(IWellOperationRepository wellOperationRepository)
|
||||
public ProcessMapPlanRotorRpmAccelerationParser(IWellOperationRepository wellOperationRepository)
|
||||
: base(wellOperationRepository)
|
||||
{
|
||||
}
|
||||
|
||||
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanFunctionsJarrDrillToolTemplate();
|
||||
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanRotorRpmAccelerationTemplate();
|
||||
|
||||
protected override ProcessMapPlanFunctionsJarrDrillToolDto BuildDto(IDictionary<string, object?> row, int rowNumber)
|
||||
protected override RotorRpmAccelerationDto BuildDto(IDictionary<string, object?> row, int rowNumber)
|
||||
{
|
||||
var dto = base.BuildDto(row, rowNumber);
|
||||
|
@ -10,18 +10,18 @@ using AsbCloudWebApi.IntegrationTests;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Xunit;
|
||||
|
||||
namespace AsbCloudWebApi.Controllers.ProcessMaps;
|
||||
namespace AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan.Operations;
|
||||
|
||||
/// <summary>
|
||||
/// РТК план встряхивание бурового инструмента
|
||||
/// </summary>
|
||||
public class ProcessMapPlanFunctionsJarrDrillToolControllerTest :
|
||||
ProcessMapPlanBaseControllerTest<ProcessMapPlanFunctionsJarrDrillTool, ProcessMapPlanFunctionsJarrDrillToolDto>
|
||||
public class ProcessMapPlanRotorRpmAccelerationControllerTest :
|
||||
ProcessMapPlanBaseControllerTest<ProcessMapPlanRotorRpmAcceleration, RotorRpmAccelerationDto>
|
||||
{
|
||||
public ProcessMapPlanFunctionsJarrDrillToolControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanFunctionsJarrDrillTool")
|
||||
public ProcessMapPlanRotorRpmAccelerationControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanFunctionsJarrDrillTool")
|
||||
{
|
||||
}
|
||||
private readonly ProcessMapPlanFunctionsJarrDrillToolDto dto = new ProcessMapPlanFunctionsJarrDrillToolDto()
|
||||
private readonly RotorRpmAccelerationDto dto = new RotorRpmAccelerationDto()
|
||||
{
|
||||
IdWell = 1,
|
||||
DepthStart = 1,
|
||||
@ -33,7 +33,7 @@ public class ProcessMapPlanFunctionsJarrDrillToolControllerTest :
|
||||
ZenithAngle = 1,
|
||||
};
|
||||
|
||||
private readonly ProcessMapPlanFunctionsJarrDrillTool entity = new ProcessMapPlanFunctionsJarrDrillTool()
|
||||
private readonly ProcessMapPlanRotorRpmAcceleration entity = new ProcessMapPlanRotorRpmAcceleration()
|
||||
{
|
||||
IdWell = 1,
|
||||
DepthEnd = 10,
|
||||
@ -54,17 +54,17 @@ public class ProcessMapPlanFunctionsJarrDrillToolControllerTest :
|
||||
await Get(entity, dto);
|
||||
}
|
||||
|
||||
protected override ProcessMapPlanFunctionsJarrDrillTool GetByNote(DbSet<ProcessMapPlanFunctionsJarrDrillTool> dbSet, ProcessMapPlanFunctionsJarrDrillToolDto dto)
|
||||
protected override ProcessMapPlanRotorRpmAcceleration GetByNote(DbSet<ProcessMapPlanRotorRpmAcceleration> dbSet, RotorRpmAccelerationDto dto)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override ProcessMapPlanFunctionsJarrDrillToolDto GetByNote(IEnumerable<ProcessMapPlanFunctionsJarrDrillToolDto> dtos, ProcessMapPlanFunctionsJarrDrillToolDto dto)
|
||||
protected override RotorRpmAccelerationDto GetByNote(IEnumerable<RotorRpmAccelerationDto> dtos, RotorRpmAccelerationDto dto)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override ProcessMapPlanFunctionsJarrDrillTool? GetByWellId()
|
||||
protected override ProcessMapPlanRotorRpmAcceleration? GetByWellId()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
@ -6,12 +6,12 @@ using AsbCloudDb.Model.ProcessMaps;
|
||||
using AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
|
||||
using AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
|
||||
|
||||
namespace AsbCloudWebApi.Controllers.ProcessMaps;
|
||||
namespace AsbCloudWebApi.Controllers.ProcessMaps.Operations;
|
||||
|
||||
/// <summary>
|
||||
/// РТК план проработка для слайда
|
||||
/// </summary>
|
||||
public class ProcessMapPlanReamingSlideController :
|
||||
public class ProcessMapPlanReamingSlideController :
|
||||
ProcessMapPlanBaseController<ProcessMapPlanReamingSlide, ProcessMapPlanReamingSlideDto>
|
||||
{
|
||||
public ProcessMapPlanReamingSlideController(
|
@ -0,0 +1,28 @@
|
||||
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;
|
||||
|
||||
namespace AsbCloudWebApi.Controllers.ProcessMaps.Operations;
|
||||
|
||||
/// <summary>
|
||||
/// РТК план выход на обороты перед ротором
|
||||
/// </summary>
|
||||
public class ProcessMapPlanRotorRpmAccelerationController :
|
||||
ProcessMapPlanBaseController<ProcessMapPlanRotorRpmAcceleration, RotorRpmAccelerationDto>
|
||||
{
|
||||
public ProcessMapPlanRotorRpmAccelerationController(
|
||||
IChangeLogRepository<RotorRpmAccelerationDto, ProcessMapPlanBaseRequestWithWell> repository,
|
||||
IWellService wellService,
|
||||
ProcessMapPlanRotorRpmAccelerationParser parserService,
|
||||
ITelemetryService telemetryService,
|
||||
ProcessMapPlanRotorRpmAccelerationExportService processMapPlanExportService)
|
||||
: base(repository, wellService, parserService, processMapPlanExportService, telemetryService)
|
||||
{
|
||||
}
|
||||
|
||||
protected override string TemplateFileName => "ЕЦП_шаблон_файла_РТК_план_выход_на_обороты_перед_ротором.xlsx";
|
||||
}
|
@ -1,28 +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;
|
||||
|
||||
namespace AsbCloudWebApi.Controllers.ProcessMaps;
|
||||
|
||||
/// <summary>
|
||||
/// РТК план встряхивание бурового инструмента
|
||||
/// </summary>
|
||||
public class ProcessMapPlanFunctionsJarrDrillToolController :
|
||||
ProcessMapPlanBaseController<ProcessMapPlanFunctionsJarrDrillTool, ProcessMapPlanFunctionsJarrDrillToolDto>
|
||||
{
|
||||
public ProcessMapPlanFunctionsJarrDrillToolController(
|
||||
IChangeLogRepository<ProcessMapPlanFunctionsJarrDrillToolDto, ProcessMapPlanBaseRequestWithWell> repository,
|
||||
IWellService wellService,
|
||||
ProcessMapPlanFunctionsJarrDrillToolParser parserService,
|
||||
ITelemetryService telemetryService,
|
||||
ProcessMapPlanFunctionsJarrDrillToolExportService processMapPlanExportService)
|
||||
: base(repository, wellService, parserService, processMapPlanExportService, telemetryService)
|
||||
{
|
||||
}
|
||||
|
||||
protected override string TemplateFileName => "ЕЦП_шаблон_файла_РТК_план_встряхивание_бурового_инструмента.xlsx";
|
||||
}
|
Loading…
Reference in New Issue
Block a user