forked from ddrilling/AsbCloudServer
Выход статического замера
This commit is contained in:
parent
da475cc320
commit
35698ca909
@ -1,15 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace AsbCloudApp.Data.ProcessMaps;
|
||||
|
||||
/// <summary>
|
||||
/// РТК план выход статического замера
|
||||
/// </summary>
|
||||
public class ProcessMapPlanFunctionsStaticMeasureDto : ProcessMapPlanBaseDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Время ожидания выхода сигнала с ТМС, сек.
|
||||
/// </summary>
|
||||
[Range(0.0, 1800.0, ErrorMessage = "Время ожидания выхода сигнала с ТМС, сек., должно быть в пределах от 0 до 1800")]
|
||||
public double SignalWaitingTime { get; set; }
|
||||
}
|
@ -39,7 +39,7 @@ namespace AsbCloudDb.Model
|
||||
public virtual DbSet<ProcessMapPlanUpdatingNoloadParameters> ProcessMapPlanFunctionsUpgradeNoload => Set<ProcessMapPlanUpdatingNoloadParameters>();
|
||||
public virtual DbSet<ProcessMapPlanOscillation> ProcessMapPlanFunctionsOscillation => Set<ProcessMapPlanOscillation>();
|
||||
public virtual DbSet<ProcessMapPlanAntiCrashRotation> ProcessMapPlanFunctionsAnticrashRotation => Set<ProcessMapPlanAntiCrashRotation>();
|
||||
public virtual DbSet<ProcessMapPlanFunctionsStaticMeasure> ProcessMapPlanFunctionsStaticMeasure => Set<ProcessMapPlanFunctionsStaticMeasure>();
|
||||
public virtual DbSet<ProcessMapPlanStaticMeasurementOutput> ProcessMapPlanFunctionsStaticMeasure => Set<ProcessMapPlanStaticMeasurementOutput>();
|
||||
|
||||
public virtual DbSet<DrillingProgramPart> DrillingProgramParts => Set<DrillingProgramPart>();
|
||||
public virtual DbSet<FileCategory> FileCategories => Set<FileCategory>();
|
||||
@ -558,7 +558,7 @@ namespace AsbCloudDb.Model
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
modelBuilder.Entity<ProcessMapPlanFunctionsStaticMeasure>()
|
||||
modelBuilder.Entity<ProcessMapPlanStaticMeasurementOutput>()
|
||||
.HasOne(p => p.Author)
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
@ -658,7 +658,7 @@ namespace AsbCloudDb.Model
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
modelBuilder.Entity<ProcessMapPlanFunctionsStaticMeasure>()
|
||||
modelBuilder.Entity<ProcessMapPlanStaticMeasurementOutput>()
|
||||
.HasOne(p => p.Editor)
|
||||
.WithMany()
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
@ -100,7 +100,7 @@ namespace AsbCloudDb.Model
|
||||
DbSet<ProcessMapPlanUpdatingNoloadParameters> ProcessMapPlanFunctionsUpgradeNoload { get; }
|
||||
DbSet<ProcessMapPlanOscillation> ProcessMapPlanFunctionsOscillation { get; }
|
||||
DbSet<ProcessMapPlanAntiCrashRotation> ProcessMapPlanFunctionsAnticrashRotation { get; }
|
||||
DbSet<ProcessMapPlanFunctionsStaticMeasure> ProcessMapPlanFunctionsStaticMeasure { get; }
|
||||
DbSet<ProcessMapPlanStaticMeasurementOutput> ProcessMapPlanFunctionsStaticMeasure { get; }
|
||||
|
||||
Task<int> RefreshMaterializedViewAsync(string mwName, CancellationToken token);
|
||||
Task<int> RefreshMaterializedViewAsync<TEntity>(CancellationToken token) where TEntity : class;
|
||||
|
@ -5,8 +5,8 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace AsbCloudDb.Model.ProcessMaps;
|
||||
|
||||
[Table("t_process_map_plan_functions_static_measure"), Comment("Выход статического замера")]
|
||||
public class ProcessMapPlanFunctionsStaticMeasure : ProcessMapPlanBase
|
||||
[Table("t_process_map_plan_static_measurement_output"), Comment("Выход статического замера")]
|
||||
public class ProcessMapPlanStaticMeasurementOutput : ProcessMapPlanBase
|
||||
{
|
||||
[Column("signal_waiting_time"), Comment("Время ожидания выхода сигнала с ТМС, сек.")]
|
||||
[Range(0.0, 1800.0)]
|
||||
@ -14,5 +14,5 @@ public class ProcessMapPlanFunctionsStaticMeasure : ProcessMapPlanBase
|
||||
public double SignalWaitingTime { get; set; }
|
||||
|
||||
[ForeignKey(nameof(IdPrevious))]
|
||||
public virtual ProcessMapPlanFunctionsStaticMeasure? Previous { get; set; }
|
||||
public virtual ProcessMapPlanStaticMeasurementOutput? Previous { get; set; }
|
||||
}
|
@ -265,11 +265,11 @@ namespace AsbCloudInfrastructure
|
||||
Item = src.Adapt<ProcessMapPlanAntiCrashRotationDto>()
|
||||
});
|
||||
|
||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanFunctionsStaticMeasureDto>>.NewConfig()
|
||||
.Include<ProcessMapPlanFunctionsStaticMeasure, ChangeLogDto<ProcessMapPlanFunctionsStaticMeasureDto>>()
|
||||
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanFunctionsStaticMeasureDto>()
|
||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanStaticMeasurementOutputDto>>.NewConfig()
|
||||
.Include<ProcessMapPlanStaticMeasurementOutput, ChangeLogDto<ProcessMapPlanStaticMeasurementOutputDto>>()
|
||||
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanStaticMeasurementOutputDto>()
|
||||
{
|
||||
Item = src.Adapt<ProcessMapPlanFunctionsStaticMeasureDto>()
|
||||
Item = src.Adapt<ProcessMapPlanStaticMeasurementOutputDto>()
|
||||
});
|
||||
}
|
||||
|
||||
@ -446,7 +446,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<ProcessMapPlanUpdatingNoloadParametersParser>();
|
||||
services.AddTransient<ProcessMapPlanOscillationParser>();
|
||||
services.AddTransient<ProcessMapPlanAntiCrashRotationParser>();
|
||||
services.AddTransient<ProcessMapPlanFunctionsStaticMeasureParser>();
|
||||
services.AddTransient<ProcessMapPlanStaticMeasurementOutputParser>();
|
||||
|
||||
services.AddTransient<TrajectoryPlanExportService>();
|
||||
services.AddTransient<TrajectoryFactManualExportService>();
|
||||
@ -472,7 +472,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<ProcessMapPlanUpdatingNoloadParametersExportService>();
|
||||
services.AddTransient<ProcessMapPlanOscillationExportService>();
|
||||
services.AddTransient<ProcessMapPlanAntiCrashRotationExportService>();
|
||||
services.AddTransient<ProcessMapPlanFunctionsStaticMeasureExportService>();
|
||||
services.AddTransient<ProcessMapPlanStaticMeasurementOutputExportService>();
|
||||
|
||||
services.AddTransient<WellOperationParserFactory>();
|
||||
services.AddTransient<WellOperationExportServiceFactory>();
|
||||
@ -563,8 +563,8 @@ namespace AsbCloudInfrastructure
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanAntiCrashRotation, ProcessMapPlanAntiCrashRotationDto>>();
|
||||
|
||||
services.AddTransient<
|
||||
IChangeLogRepository<ProcessMapPlanFunctionsStaticMeasureDto, ProcessMapPlanBaseRequestWithWell>,
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanFunctionsStaticMeasure, ProcessMapPlanFunctionsStaticMeasureDto>>();
|
||||
IChangeLogRepository<ProcessMapPlanStaticMeasurementOutputDto, ProcessMapPlanBaseRequestWithWell>,
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanStaticMeasurementOutput, ProcessMapPlanStaticMeasurementOutputDto>>();
|
||||
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanRotorDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanSlideDto>>();
|
||||
@ -585,7 +585,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanUpdatingNoloadParametersDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOscillationDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanAntiCrashRotationDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanFunctionsStaticMeasureDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanStaticMeasurementOutputDto>>();
|
||||
|
||||
return services;
|
||||
}
|
||||
|
@ -2,13 +2,13 @@ using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
|
||||
|
||||
public class ProcessMapPlanFunctionsStaticMeasureTemplate : ITemplateParameters
|
||||
public class ProcessMapPlanStaticMeasurementOutputTemplate : ITemplateParameters
|
||||
{
|
||||
public string SheetName => "Выход статического замера";
|
||||
|
||||
public int HeaderRowsCount => 2;
|
||||
|
||||
public string FileName => "ProcessMapPlanFunctionsStaticMeasureTemplate.xlsx";
|
||||
public string FileName => "ProcessMapPlanStaticMeasurementOutputTemplate.xlsx";
|
||||
|
||||
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
|
||||
{
|
@ -10,16 +10,16 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
|
||||
|
||||
public class ProcessMapPlanFunctionsStaticMeasureExportService : ProcessMapPlanExportService<ProcessMapPlanFunctionsStaticMeasureDto>
|
||||
public class ProcessMapPlanStaticMeasurementOutputExportService : ProcessMapPlanExportService<ProcessMapPlanStaticMeasurementOutputDto>
|
||||
{
|
||||
public ProcessMapPlanFunctionsStaticMeasureExportService(
|
||||
IChangeLogRepository<ProcessMapPlanFunctionsStaticMeasureDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
||||
public ProcessMapPlanStaticMeasurementOutputExportService(
|
||||
IChangeLogRepository<ProcessMapPlanStaticMeasurementOutputDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
||||
IWellService wellService)
|
||||
: base(processMapPlanRepository, wellService)
|
||||
{
|
||||
}
|
||||
|
||||
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanFunctionsStaticMeasureTemplate();
|
||||
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanStaticMeasurementOutputTemplate();
|
||||
|
||||
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;
|
||||
|
||||
public class ProcessMapPlanFunctionsStaticMeasureParser : ProcessMapPlanParser<ProcessMapPlanFunctionsStaticMeasureDto>
|
||||
public class ProcessMapPlanStaticMeasurementOutputParser : ProcessMapPlanParser<ProcessMapPlanStaticMeasurementOutputDto>
|
||||
{
|
||||
public ProcessMapPlanFunctionsStaticMeasureParser(IWellOperationRepository wellOperationRepository)
|
||||
public ProcessMapPlanStaticMeasurementOutputParser(IWellOperationRepository wellOperationRepository)
|
||||
: base(wellOperationRepository)
|
||||
{
|
||||
}
|
||||
|
||||
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanFunctionsStaticMeasureTemplate();
|
||||
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanStaticMeasurementOutputTemplate();
|
||||
|
||||
protected override ProcessMapPlanFunctionsStaticMeasureDto BuildDto(IDictionary<string, object?> row, int rowNumber)
|
||||
protected override ProcessMapPlanStaticMeasurementOutputDto 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 ProcessMapPlanFunctionsStaticMeasureControllerTest :
|
||||
ProcessMapPlanBaseControllerTest<ProcessMapPlanFunctionsStaticMeasure, ProcessMapPlanFunctionsStaticMeasureDto>
|
||||
public class ProcessMapPlanStaticMeasurementOutputControllerTest :
|
||||
ProcessMapPlanBaseControllerTest<ProcessMapPlanStaticMeasurementOutput, ProcessMapPlanStaticMeasurementOutputDto>
|
||||
{
|
||||
public ProcessMapPlanFunctionsStaticMeasureControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanFunctionsStaticMeasure")
|
||||
public ProcessMapPlanStaticMeasurementOutputControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanFunctionsStaticMeasure")
|
||||
{
|
||||
}
|
||||
private readonly ProcessMapPlanFunctionsStaticMeasureDto dto = new ProcessMapPlanFunctionsStaticMeasureDto()
|
||||
private readonly ProcessMapPlanStaticMeasurementOutputDto dto = new ProcessMapPlanStaticMeasurementOutputDto()
|
||||
{
|
||||
IdWell = 1,
|
||||
DepthStart = 1,
|
||||
@ -31,7 +31,7 @@ public class ProcessMapPlanFunctionsStaticMeasureControllerTest :
|
||||
SignalWaitingTime = 1,
|
||||
};
|
||||
|
||||
private readonly ProcessMapPlanFunctionsStaticMeasure entity = new ProcessMapPlanFunctionsStaticMeasure()
|
||||
private readonly ProcessMapPlanStaticMeasurementOutput entity = new ProcessMapPlanStaticMeasurementOutput()
|
||||
{
|
||||
IdWell = 1,
|
||||
DepthEnd = 10,
|
||||
@ -50,17 +50,17 @@ public class ProcessMapPlanFunctionsStaticMeasureControllerTest :
|
||||
await Get(entity, dto);
|
||||
}
|
||||
|
||||
protected override ProcessMapPlanFunctionsStaticMeasure GetByNote(DbSet<ProcessMapPlanFunctionsStaticMeasure> dbSet, ProcessMapPlanFunctionsStaticMeasureDto dto)
|
||||
protected override ProcessMapPlanStaticMeasurementOutput GetByNote(DbSet<ProcessMapPlanStaticMeasurementOutput> dbSet, ProcessMapPlanStaticMeasurementOutputDto dto)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override ProcessMapPlanFunctionsStaticMeasureDto GetByNote(IEnumerable<ProcessMapPlanFunctionsStaticMeasureDto> dtos, ProcessMapPlanFunctionsStaticMeasureDto dto)
|
||||
protected override ProcessMapPlanStaticMeasurementOutputDto GetByNote(IEnumerable<ProcessMapPlanStaticMeasurementOutputDto> dtos, ProcessMapPlanStaticMeasurementOutputDto dto)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override ProcessMapPlanFunctionsStaticMeasure? GetByWellId()
|
||||
protected override ProcessMapPlanStaticMeasurementOutput? GetByWellId()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
@ -11,15 +11,15 @@ namespace AsbCloudWebApi.Controllers.ProcessMaps;
|
||||
/// <summary>
|
||||
/// РТК план выход статического замера
|
||||
/// </summary>
|
||||
public class ProcessMapPlanFunctionsStaticMeasureController :
|
||||
ProcessMapPlanBaseController<ProcessMapPlanFunctionsStaticMeasure, ProcessMapPlanFunctionsStaticMeasureDto>
|
||||
public class ProcessMapPlanStaticMeasurementOutputController :
|
||||
ProcessMapPlanBaseController<ProcessMapPlanStaticMeasurementOutput, ProcessMapPlanStaticMeasurementOutputDto>
|
||||
{
|
||||
public ProcessMapPlanFunctionsStaticMeasureController(
|
||||
IChangeLogRepository<ProcessMapPlanFunctionsStaticMeasureDto, ProcessMapPlanBaseRequestWithWell> repository,
|
||||
public ProcessMapPlanStaticMeasurementOutputController(
|
||||
IChangeLogRepository<ProcessMapPlanStaticMeasurementOutputDto, ProcessMapPlanBaseRequestWithWell> repository,
|
||||
IWellService wellService,
|
||||
ProcessMapPlanFunctionsStaticMeasureParser parserService,
|
||||
ProcessMapPlanStaticMeasurementOutputParser parserService,
|
||||
ITelemetryService telemetryService,
|
||||
ProcessMapPlanFunctionsStaticMeasureExportService processMapPlanExportService)
|
||||
ProcessMapPlanStaticMeasurementOutputExportService processMapPlanExportService)
|
||||
: base(repository, wellService, parserService, processMapPlanExportService, telemetryService)
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue
Block a user