Конструкция скважина заменена на "Выход на режим"

This commit is contained in:
Olga Nemt 2024-06-25 17:11:30 +05:00
parent f8f829669b
commit a8177fc076
8 changed files with 35 additions and 35 deletions

View File

@ -30,7 +30,7 @@ namespace AsbCloudDb.Model
public virtual DbSet<ProcessMapPlanOperationDeterminationOfOscillationAngles> ProcessMapPlanOperationDeterminationOfOscillationAngles => Set<ProcessMapPlanOperationDeterminationOfOscillationAngles>();
public virtual DbSet<ProcessMapPlanOperationTFOrientation> ProcessMapPlanOperationTFOrientation => Set<ProcessMapPlanOperationTFOrientation>();
public virtual DbSet<ProcessMapPlanOperationSwitchPump> ProcessMapPlanOperationSwitchPump => Set<ProcessMapPlanOperationSwitchPump>();
public virtual DbSet<ProcessMapPlanSection> ProcessMapPlanSection => Set<ProcessMapPlanSection>();
public virtual DbSet<ProcessMapPlanOperationSwitchMode> ProcessMapPlanSection => Set<ProcessMapPlanOperationSwitchMode>();
public virtual DbSet<DrillingProgramPart> DrillingProgramParts => Set<DrillingProgramPart>();
public virtual DbSet<FileCategory> FileCategories => Set<FileCategory>();
public virtual DbSet<FileInfo> Files => Set<FileInfo>();
@ -502,7 +502,7 @@ namespace AsbCloudDb.Model
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
modelBuilder.Entity<ProcessMapPlanSection>()
modelBuilder.Entity<ProcessMapPlanOperationSwitchMode>()
.HasOne(p => p.Author)
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
@ -557,7 +557,7 @@ namespace AsbCloudDb.Model
.WithMany()
.OnDelete(DeleteBehavior.Restrict);
modelBuilder.Entity<ProcessMapPlanSection>()
modelBuilder.Entity<ProcessMapPlanOperationSwitchMode>()
.HasOne(p => p.Editor)
.WithMany()
.OnDelete(DeleteBehavior.Restrict);

View File

@ -91,7 +91,7 @@ namespace AsbCloudDb.Model
DbSet<ProcessMapPlanOperationDeterminationOfOscillationAngles> ProcessMapPlanOperationDeterminationOfOscillationAngles { get; }
DbSet<ProcessMapPlanOperationTFOrientation> ProcessMapPlanOperationTFOrientation { get; }
DbSet<ProcessMapPlanOperationSwitchPump> ProcessMapPlanOperationSwitchPump { get; }
DbSet<ProcessMapPlanSection> ProcessMapPlanSection { get; }
DbSet<ProcessMapPlanOperationSwitchMode> ProcessMapPlanSection { get; }
Task<int> RefreshMaterializedViewAsync(string mwName, CancellationToken token);
Task<int> RefreshMaterializedViewAsync<TEntity>(CancellationToken token) where TEntity : class;

View File

@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore;
namespace AsbCloudDb.Model.ProcessMaps;
[Table("t_process_map_plan_section"), Comment("Конструкция скважины")]
public class ProcessMapPlanSection : ProcessMapPlanBase
public class ProcessMapPlanOperationSwitchMode : ProcessMapPlanBase
{
[Column("outer_diameter"), Comment("Диаметр секции, мм., наружный")]
[Range(0.0, 9999.9)]
@ -18,5 +18,5 @@ public class ProcessMapPlanSection : ProcessMapPlanBase
[ForeignKey(nameof(IdPrevious))]
public virtual ProcessMapPlanSection? Previous { get; set; }
public virtual ProcessMapPlanOperationSwitchMode? Previous { get; set; }
}

View File

@ -202,11 +202,11 @@ namespace AsbCloudInfrastructure
Item = src.Adapt<ProcessMapPlanOperationSwitchPumpDto>()
});
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanSectionDto>>.NewConfig()
.Include<ProcessMapPlanSection, ChangeLogDto<ProcessMapPlanSectionDto>>()
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanSectionDto>()
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanOperationSwitchModeDto>>.NewConfig()
.Include<ProcessMapPlanOperationSwitchMode, ChangeLogDto<ProcessMapPlanOperationSwitchModeDto>>()
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanOperationSwitchModeDto>()
{
Item = src.Adapt<ProcessMapPlanSectionDto>()
Item = src.Adapt<ProcessMapPlanOperationSwitchModeDto>()
});
}
@ -310,8 +310,8 @@ namespace AsbCloudInfrastructure
ProcessMapPlanBaseRepository<ProcessMapPlanOperationSwitchPump, ProcessMapPlanOperationSwitchPumpDto>>();
services.AddTransient<
IChangeLogRepository<ProcessMapPlanSectionDto, ProcessMapPlanBaseRequestWithWell>,
ProcessMapPlanBaseRepository<ProcessMapPlanSection, ProcessMapPlanSectionDto>>();
IChangeLogRepository<ProcessMapPlanOperationSwitchModeDto, ProcessMapPlanBaseRequestWithWell>,
ProcessMapPlanBaseRepository<ProcessMapPlanOperationSwitchMode, ProcessMapPlanOperationSwitchModeDto>>();
services.AddTransient<IProcessMapReportDrillingService, ProcessMapReportDrillingService>();
@ -368,7 +368,7 @@ namespace AsbCloudInfrastructure
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOperationDeterminationOfOscillationAnglesDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOperationTFOrientationDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOperationSwitchPumpDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanSectionDto>>();
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOperationSwitchModeDto>>();
services.AddTransient<IUserRoleRepository, UserRoleRepository>();
services.AddTransient<IUserRepository, UserRepository>();
services.AddTransient<ILimitingParameterRepository, LimitingParameterRepository>();
@ -433,7 +433,7 @@ namespace AsbCloudInfrastructure
services.AddTransient<ProcessMapPlanOperationDeterminationOfOscillationAnglesParser>();
services.AddTransient<ProcessMapPlanOperationTFOrientationParser>();
services.AddTransient<ProcessMapPlanOperationSwitchPumpParser>();
services.AddTransient<ProcessMapPlanSectionParser>();
services.AddTransient<ProcessMapPlanOperationSwitchModeParser>();
services.AddTransient<TrajectoryPlanExportService>();
services.AddTransient<TrajectoryFactManualExportService>();
@ -450,7 +450,7 @@ namespace AsbCloudInfrastructure
services.AddTransient<ProcessMapPlanOperationDeterminationOfOscillationAnglesExportService>();
services.AddTransient<ProcessMapPlanOperationTFOrientationExportService>();
services.AddTransient<ProcessMapPlanOperationSwitchPumpExportService>();
services.AddTransient<ProcessMapPlanSectionExportService>();
services.AddTransient<ProcessMapPlanOperationSwitchModeExportService>();
services.AddTransient<WellOperationParserFactory>();
services.AddTransient<WellOperationExportServiceFactory>();

View File

@ -2,13 +2,13 @@ using System.Collections.Generic;
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
public class ProcessMapPlanSectionTemplate : ITemplateParameters
public class ProcessMapPlanOperationSwitchModeTemplate : ITemplateParameters
{
public string SheetName => "Конструкция скважины";
public string SheetName => "Выход на режим";
public int HeaderRowsCount => 2;
public string FileName => "ProcessMapPlanSectionTemplate.xlsx";
public string FileName => "ProcessMapPlanOperationSwitchModeTemplate.xlsx";
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
{

View File

@ -10,21 +10,21 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
public class ProcessMapPlanSectionExportService : ProcessMapPlanExportService<ProcessMapPlanSectionDto>
public class ProcessMapPlanOperationSwitchModeExportService : ProcessMapPlanExportService<ProcessMapPlanOperationSwitchModeDto>
{
public ProcessMapPlanSectionExportService(
IChangeLogRepository<ProcessMapPlanSectionDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
public ProcessMapPlanOperationSwitchModeExportService(
IChangeLogRepository<ProcessMapPlanOperationSwitchModeDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
IWellService wellService)
: base(processMapPlanRepository, wellService)
{
}
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanSectionTemplate();
protected override ITemplateParameters TemplateParameters { get; } = new ProcessMapPlanOperationSwitchModeTemplate();
protected override async Task<string> BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token)
{
var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token);
return $"{caption}_РТК_План_конструкция_скважины.xlsx";
return $"{caption}_РТК_План_выход_на_режим.xlsx";
}
}

View File

@ -9,16 +9,16 @@ using AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemp
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
public class ProcessMapPlanSectionParser : ProcessMapPlanParser<ProcessMapPlanSectionDto>
public class ProcessMapPlanOperationSwitchModeParser : ProcessMapPlanParser<ProcessMapPlanOperationSwitchModeDto>
{
public ProcessMapPlanSectionParser(IWellOperationRepository wellOperationRepository)
public ProcessMapPlanOperationSwitchModeParser(IWellOperationRepository wellOperationRepository)
: base(wellOperationRepository)
{
}
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanSectionTemplate();
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanOperationSwitchModeTemplate();
protected override ProcessMapPlanSectionDto BuildDto(IDictionary<string, object?> row, int rowNumber)
protected override ProcessMapPlanOperationSwitchModeDto BuildDto(IDictionary<string, object?> row, int rowNumber)
{
var dto = base.BuildDto(row, rowNumber);

View File

@ -9,20 +9,20 @@ using AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
namespace AsbCloudWebApi.Controllers.ProcessMaps;
/// <summary>
/// РТК план конструкция скважины
/// РТК план выход на режим
/// </summary>
public class ProcessMapPlanSectionController :
ProcessMapPlanBaseController<ProcessMapPlanSection, ProcessMapPlanSectionDto>
public class ProcessMapPlanOperationSwitchModeController :
ProcessMapPlanBaseController<ProcessMapPlanOperationSwitchMode, ProcessMapPlanOperationSwitchModeDto>
{
public ProcessMapPlanSectionController(
IChangeLogRepository<ProcessMapPlanSectionDto, ProcessMapPlanBaseRequestWithWell> repository,
public ProcessMapPlanOperationSwitchModeController(
IChangeLogRepository<ProcessMapPlanOperationSwitchModeDto, ProcessMapPlanBaseRequestWithWell> repository,
IWellService wellService,
ProcessMapPlanSectionParser parserService,
ProcessMapPlanOperationSwitchModeParser parserService,
ITelemetryService telemetryService,
ProcessMapPlanSectionExportService processMapPlanExportService)
ProcessMapPlanOperationSwitchModeExportService processMapPlanExportService)
: base(repository, wellService, parserService, processMapPlanExportService, telemetryService)
{
}
protected override string TemplateFileName => "ЕЦП_шаблон_файла_РТК_план_конструкция_скважины.xlsx";
protected override string TemplateFileName => "ЕЦП_шаблон_файла_РТК_план_выход_на_режим.xlsx";
}