forked from ddrilling/AsbCloudServer
Автоудержание TF
This commit is contained in:
parent
04fd517ab1
commit
da475cc320
@ -3,9 +3,9 @@
|
||||
namespace AsbCloudApp.Data.ProcessMaps;
|
||||
|
||||
/// <summary>
|
||||
/// РТК план автоудержание
|
||||
/// РТК план автоудержание TF
|
||||
/// </summary>
|
||||
public class ProcessMapPlanFunctionsAutoHoldDto : ProcessMapPlanBaseDto
|
||||
public class ProcessMapPlanAutoHoldTFDto : ProcessMapPlanBaseDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Зенитный угол, градусы
|
@ -34,7 +34,7 @@ namespace AsbCloudDb.Model
|
||||
public virtual DbSet<ProcessMapPlanFunctionsDrillTest> ProcessMapPlanFunctionsDrillTest => Set<ProcessMapPlanFunctionsDrillTest>();
|
||||
public virtual DbSet<ProcessMapPlanFunctionsShockTest> ProcessMapPlanFunctionsShockTest => Set<ProcessMapPlanFunctionsShockTest>();
|
||||
public virtual DbSet<ProcessMapPlanFunctionsDamper> ProcessMapPlanFunctionsDamper => Set<ProcessMapPlanFunctionsDamper>();
|
||||
public virtual DbSet<ProcessMapPlanFunctionsAutoHold> ProcessMapPlanFunctionsAutoHold => Set<ProcessMapPlanFunctionsAutoHold>();
|
||||
public virtual DbSet<ProcessMapPlanAutoHoldTF> ProcessMapPlanFunctionsAutoHold => Set<ProcessMapPlanAutoHoldTF>();
|
||||
public virtual DbSet<ProcessMapPlanFunctionsJarrDrillTool> ProcessMapPlanFunctionsJarrDrillTool => Set<ProcessMapPlanFunctionsJarrDrillTool>();
|
||||
public virtual DbSet<ProcessMapPlanUpdatingNoloadParameters> ProcessMapPlanFunctionsUpgradeNoload => Set<ProcessMapPlanUpdatingNoloadParameters>();
|
||||
public virtual DbSet<ProcessMapPlanOscillation> ProcessMapPlanFunctionsOscillation => Set<ProcessMapPlanOscillation>();
|
||||
@ -533,7 +533,7 @@ namespace AsbCloudDb.Model
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
modelBuilder.Entity<ProcessMapPlanFunctionsAutoHold>()
|
||||
modelBuilder.Entity<ProcessMapPlanAutoHoldTF>()
|
||||
.HasOne(p => p.Author)
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
@ -633,7 +633,7 @@ namespace AsbCloudDb.Model
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
modelBuilder.Entity<ProcessMapPlanFunctionsAutoHold>()
|
||||
modelBuilder.Entity<ProcessMapPlanAutoHoldTF>()
|
||||
.HasOne(p => p.Editor)
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
@ -95,7 +95,7 @@ namespace AsbCloudDb.Model
|
||||
DbSet<ProcessMapPlanFunctionsDrillTest> ProcessMapPlanFunctionsDrillTest { get; }
|
||||
DbSet<ProcessMapPlanFunctionsShockTest> ProcessMapPlanFunctionsShockTest { get; }
|
||||
DbSet<ProcessMapPlanFunctionsDamper> ProcessMapPlanFunctionsDamper { get; }
|
||||
DbSet<ProcessMapPlanFunctionsAutoHold> ProcessMapPlanFunctionsAutoHold { get; }
|
||||
DbSet<ProcessMapPlanAutoHoldTF> ProcessMapPlanFunctionsAutoHold { get; }
|
||||
DbSet<ProcessMapPlanFunctionsJarrDrillTool> ProcessMapPlanFunctionsJarrDrillTool { get; }
|
||||
DbSet<ProcessMapPlanUpdatingNoloadParameters> ProcessMapPlanFunctionsUpgradeNoload { get; }
|
||||
DbSet<ProcessMapPlanOscillation> ProcessMapPlanFunctionsOscillation { get; }
|
||||
|
@ -5,8 +5,8 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace AsbCloudDb.Model.ProcessMaps;
|
||||
|
||||
[Table("t_process_map_plan_functions_autohold"), Comment("Автоудержание")]
|
||||
public class ProcessMapPlanFunctionsAutoHold : ProcessMapPlanBase
|
||||
[Table("t_process_map_plan_auto_hold_tf"), Comment("Автоудержание TF")]
|
||||
public class ProcessMapPlanAutoHoldTF : ProcessMapPlanBase
|
||||
{
|
||||
[Column("zenit_angle"), Comment("Зенитный угол, градусы")]
|
||||
[Range(0.0, 100.0)]
|
||||
@ -17,5 +17,5 @@ public class ProcessMapPlanFunctionsAutoHold : ProcessMapPlanBase
|
||||
public string Note { get; set; } = string.Empty;
|
||||
|
||||
[ForeignKey(nameof(IdPrevious))]
|
||||
public virtual ProcessMapPlanFunctionsAutoHold? Previous { get; set; }
|
||||
public virtual ProcessMapPlanAutoHoldTF? Previous { get; set; }
|
||||
}
|
@ -230,11 +230,11 @@ namespace AsbCloudInfrastructure
|
||||
Item = src.Adapt<ProcessMapPlanFunctionsDamperDto>()
|
||||
});
|
||||
|
||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanFunctionsAutoHoldDto>>.NewConfig()
|
||||
.Include<ProcessMapPlanFunctionsAutoHold, ChangeLogDto<ProcessMapPlanFunctionsAutoHoldDto>>()
|
||||
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanFunctionsAutoHoldDto>()
|
||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanAutoHoldTFDto>>.NewConfig()
|
||||
.Include<ProcessMapPlanAutoHoldTF, ChangeLogDto<ProcessMapPlanAutoHoldTFDto>>()
|
||||
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanAutoHoldTFDto>()
|
||||
{
|
||||
Item = src.Adapt<ProcessMapPlanFunctionsAutoHoldDto>()
|
||||
Item = src.Adapt<ProcessMapPlanAutoHoldTFDto>()
|
||||
});
|
||||
|
||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanFunctionsJarrDrillToolDto>>.NewConfig()
|
||||
@ -441,7 +441,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<ProcessMapPlanFunctionsDrillTestParser>();
|
||||
services.AddTransient<ProcessMapPlanFunctionsShockTestParser>();
|
||||
services.AddTransient<ProcessMapPlanFunctionsDamperParser>();
|
||||
services.AddTransient<ProcessMapPlanFunctionsAutoHoldParser>();
|
||||
services.AddTransient<ProcessMapPlanAutoHoldTFParser>();
|
||||
services.AddTransient<ProcessMapPlanFunctionsJarrDrillToolParser>();
|
||||
services.AddTransient<ProcessMapPlanUpdatingNoloadParametersParser>();
|
||||
services.AddTransient<ProcessMapPlanOscillationParser>();
|
||||
@ -467,7 +467,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<ProcessMapPlanFunctionsDrillTestExportService>();
|
||||
services.AddTransient<ProcessMapPlanFunctionsShockTestExportService>();
|
||||
services.AddTransient<ProcessMapPlanFunctionsDamperExportService>();
|
||||
services.AddTransient<ProcessMapPlanFunctionsAutoHoldExportService>();
|
||||
services.AddTransient<ProcessMapPlanAutoHoldTFExportService>();
|
||||
services.AddTransient<ProcessMapPlanFunctionsJarrDrillToolExportService>();
|
||||
services.AddTransient<ProcessMapPlanUpdatingNoloadParametersExportService>();
|
||||
services.AddTransient<ProcessMapPlanOscillationExportService>();
|
||||
@ -543,8 +543,8 @@ namespace AsbCloudInfrastructure
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanFunctionsDamper, ProcessMapPlanFunctionsDamperDto>>();
|
||||
|
||||
services.AddTransient<
|
||||
IChangeLogRepository<ProcessMapPlanFunctionsAutoHoldDto, ProcessMapPlanBaseRequestWithWell>,
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanFunctionsAutoHold, ProcessMapPlanFunctionsAutoHoldDto>>();
|
||||
IChangeLogRepository<ProcessMapPlanAutoHoldTFDto, ProcessMapPlanBaseRequestWithWell>,
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanAutoHoldTF, ProcessMapPlanAutoHoldTFDto>>();
|
||||
|
||||
services.AddTransient<
|
||||
IChangeLogRepository<ProcessMapPlanFunctionsJarrDrillToolDto, ProcessMapPlanBaseRequestWithWell>,
|
||||
@ -580,7 +580,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsDrillTestDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsShockTestDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsDamperDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsAutoHoldDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanAutoHoldTFDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsJarrDrillToolDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanUpdatingNoloadParametersDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOscillationDto>>();
|
||||
|
@ -2,13 +2,13 @@ using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
|
||||
|
||||
public class ProcessMapPlanFunctionsAutoHoldTemplate : ITemplateParameters
|
||||
public class ProcessMapPlanAutoHoldTFTemplate : ITemplateParameters
|
||||
{
|
||||
public string SheetName => "Автоудержание";
|
||||
public string SheetName => "Автоудержание TF";
|
||||
|
||||
public int HeaderRowsCount => 2;
|
||||
|
||||
public string FileName => "ProcessMapPlanFunctionsAutoHoldTemplate.xlsx";
|
||||
public string FileName => "ProcessMapPlanAutoHoldTFTemplate.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 ProcessMapPlanFunctionsAutoHoldExportService : ProcessMapPlanExportService<ProcessMapPlanFunctionsAutoHoldDto>
|
||||
public class ProcessMapPlanAutoHoldTFExportService : ProcessMapPlanExportService<ProcessMapPlanAutoHoldTFDto>
|
||||
{
|
||||
public ProcessMapPlanFunctionsAutoHoldExportService(
|
||||
IChangeLogRepository<ProcessMapPlanFunctionsAutoHoldDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
||||
public ProcessMapPlanAutoHoldTFExportService(
|
||||
IChangeLogRepository<ProcessMapPlanAutoHoldTFDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
||||
IWellService wellService)
|
||||
: base(processMapPlanRepository, wellService)
|
||||
{
|
||||
}
|
||||
|
||||
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanFunctionsAutoHoldTemplate();
|
||||
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanAutoHoldTFTemplate();
|
||||
|
||||
protected override async Task<string> BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token)
|
||||
{
|
||||
var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token);
|
||||
|
||||
return $"{caption}_РТК_План_автоудержание.xlsx";
|
||||
return $"{caption}_РТК_План_автоудержание_tf.xlsx";
|
||||
}
|
||||
}
|
@ -9,16 +9,16 @@ using AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemp
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
|
||||
|
||||
public class ProcessMapPlanFunctionsAutoHoldParser : ProcessMapPlanParser<ProcessMapPlanFunctionsAutoHoldDto>
|
||||
public class ProcessMapPlanAutoHoldTFParser : ProcessMapPlanParser<ProcessMapPlanAutoHoldTFDto>
|
||||
{
|
||||
public ProcessMapPlanFunctionsAutoHoldParser(IWellOperationRepository wellOperationRepository)
|
||||
public ProcessMapPlanAutoHoldTFParser(IWellOperationRepository wellOperationRepository)
|
||||
: base(wellOperationRepository)
|
||||
{
|
||||
}
|
||||
|
||||
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanFunctionsAutoHoldTemplate();
|
||||
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanAutoHoldTFTemplate();
|
||||
|
||||
protected override ProcessMapPlanFunctionsAutoHoldDto BuildDto(IDictionary<string, object?> row, int rowNumber)
|
||||
protected override ProcessMapPlanAutoHoldTFDto BuildDto(IDictionary<string, object?> row, int rowNumber)
|
||||
{
|
||||
var dto = base.BuildDto(row, rowNumber);
|
||||
|
@ -15,13 +15,13 @@ namespace AsbCloudWebApi.Controllers.ProcessMaps;
|
||||
/// <summary>
|
||||
/// РТК план автоудержание
|
||||
/// </summary>
|
||||
public class ProcessMapPlanFunctionsAutoHoldControllerTest :
|
||||
ProcessMapPlanBaseControllerTest<ProcessMapPlanFunctionsAutoHold, ProcessMapPlanFunctionsAutoHoldDto>
|
||||
public class ProcessMapPlanAutoHoldTFControllerTest :
|
||||
ProcessMapPlanBaseControllerTest<ProcessMapPlanAutoHoldTF, ProcessMapPlanAutoHoldTFDto>
|
||||
{
|
||||
public ProcessMapPlanFunctionsAutoHoldControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanFunctionsAutoHold")
|
||||
public ProcessMapPlanAutoHoldTFControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanFunctionsAutoHold")
|
||||
{
|
||||
}
|
||||
private readonly ProcessMapPlanFunctionsAutoHoldDto dto = new ProcessMapPlanFunctionsAutoHoldDto()
|
||||
private readonly ProcessMapPlanAutoHoldTFDto dto = new ProcessMapPlanAutoHoldTFDto()
|
||||
{
|
||||
IdWell = 1,
|
||||
DepthStart = 1,
|
||||
@ -32,7 +32,7 @@ public class ProcessMapPlanFunctionsAutoHoldControllerTest :
|
||||
ZenithAngle = 2,
|
||||
};
|
||||
|
||||
private readonly ProcessMapPlanFunctionsAutoHold entity = new ProcessMapPlanFunctionsAutoHold()
|
||||
private readonly ProcessMapPlanAutoHoldTF entity = new ProcessMapPlanAutoHoldTF()
|
||||
{
|
||||
IdWell = 1,
|
||||
DepthEnd = 10,
|
||||
@ -52,17 +52,17 @@ public class ProcessMapPlanFunctionsAutoHoldControllerTest :
|
||||
await Get(entity, dto);
|
||||
}
|
||||
|
||||
protected override ProcessMapPlanFunctionsAutoHold GetByNote(DbSet<ProcessMapPlanFunctionsAutoHold> dbSet, ProcessMapPlanFunctionsAutoHoldDto dto)
|
||||
protected override ProcessMapPlanAutoHoldTF GetByNote(DbSet<ProcessMapPlanAutoHoldTF> dbSet, ProcessMapPlanAutoHoldTFDto dto)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override ProcessMapPlanFunctionsAutoHoldDto GetByNote(IEnumerable<ProcessMapPlanFunctionsAutoHoldDto> dtos, ProcessMapPlanFunctionsAutoHoldDto dto)
|
||||
protected override ProcessMapPlanAutoHoldTFDto GetByNote(IEnumerable<ProcessMapPlanAutoHoldTFDto> dtos, ProcessMapPlanAutoHoldTFDto dto)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override ProcessMapPlanFunctionsAutoHold? GetByWellId()
|
||||
protected override ProcessMapPlanAutoHoldTF? GetByWellId()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
@ -9,20 +9,20 @@ using AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
|
||||
namespace AsbCloudWebApi.Controllers.ProcessMaps;
|
||||
|
||||
/// <summary>
|
||||
/// РТК план автоудержание
|
||||
/// РТК план автоудержание TF
|
||||
/// </summary>
|
||||
public class ProcessMapPlanFunctionsAutoHoldController :
|
||||
ProcessMapPlanBaseController<ProcessMapPlanFunctionsAutoHold, ProcessMapPlanFunctionsAutoHoldDto>
|
||||
public class ProcessMapPlanAutoHoldTFController :
|
||||
ProcessMapPlanBaseController<ProcessMapPlanAutoHoldTF, ProcessMapPlanAutoHoldTFDto>
|
||||
{
|
||||
public ProcessMapPlanFunctionsAutoHoldController(
|
||||
IChangeLogRepository<ProcessMapPlanFunctionsAutoHoldDto, ProcessMapPlanBaseRequestWithWell> repository,
|
||||
public ProcessMapPlanAutoHoldTFController(
|
||||
IChangeLogRepository<ProcessMapPlanAutoHoldTFDto, ProcessMapPlanBaseRequestWithWell> repository,
|
||||
IWellService wellService,
|
||||
ProcessMapPlanFunctionsAutoHoldParser parserService,
|
||||
ProcessMapPlanAutoHoldTFParser parserService,
|
||||
ITelemetryService telemetryService,
|
||||
ProcessMapPlanFunctionsAutoHoldExportService processMapPlanExportService)
|
||||
ProcessMapPlanAutoHoldTFExportService processMapPlanExportService)
|
||||
: base(repository, wellService, parserService, processMapPlanExportService, telemetryService)
|
||||
{
|
||||
}
|
||||
|
||||
protected override string TemplateFileName => "ЕЦП_шаблон_файла_РТК_план_автоудержание.xlsx";
|
||||
protected override string TemplateFileName => "ЕЦП_шаблон_файла_РТК_план_автоудержание_tf.xlsx";
|
||||
}
|
Loading…
Reference in New Issue
Block a user