forked from ddrilling/AsbCloudServer
Шаблоны
This commit is contained in:
parent
2105dcb953
commit
dc7cd5dc23
@ -1,27 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace AsbCloudApp.Data.ProcessMaps.Operations;
|
||||
|
||||
/// <summary>
|
||||
/// РТК план выход на обороты перед ротором
|
||||
/// </summary>
|
||||
public class RotorRpmAccelerationDto : 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;
|
||||
}
|
@ -240,11 +240,11 @@ namespace AsbCloudInfrastructure
|
||||
Item = src.Adapt<ProcessMapPlanAutoHoldTFDto>()
|
||||
});
|
||||
|
||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<RotorRpmAccelerationDto>>.NewConfig()
|
||||
.Include<ProcessMapPlanRotorRpmAcceleration, ChangeLogDto<RotorRpmAccelerationDto>>()
|
||||
.Map(dest => dest, src => new ChangeLogDto<RotorRpmAccelerationDto>()
|
||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanRotorRpmAccelerationDto>>.NewConfig()
|
||||
.Include<ProcessMapPlanRotorRpmAcceleration, ChangeLogDto<ProcessMapPlanRotorRpmAccelerationDto>>()
|
||||
.Map(dest => dest, src => new ChangeLogDto<ProcessMapPlanRotorRpmAccelerationDto>()
|
||||
{
|
||||
Item = src.Adapt<RotorRpmAccelerationDto>()
|
||||
Item = src.Adapt<ProcessMapPlanRotorRpmAccelerationDto>()
|
||||
});
|
||||
|
||||
TypeAdapterConfig<ChangeLogAbstract, ChangeLogDto<ProcessMapPlanUpdatingNoloadParametersDto>>.NewConfig()
|
||||
@ -410,8 +410,8 @@ namespace AsbCloudInfrastructure
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanAutoHoldTF, ProcessMapPlanAutoHoldTFDto>>();
|
||||
|
||||
services.AddTransient<
|
||||
IChangeLogRepository<RotorRpmAccelerationDto, ProcessMapPlanBaseRequestWithWell>,
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanRotorRpmAcceleration, RotorRpmAccelerationDto>>();
|
||||
IChangeLogRepository<ProcessMapPlanRotorRpmAccelerationDto, ProcessMapPlanBaseRequestWithWell>,
|
||||
ProcessMapPlanBaseRepository<ProcessMapPlanRotorRpmAcceleration, ProcessMapPlanRotorRpmAccelerationDto>>();
|
||||
|
||||
services.AddTransient<
|
||||
IChangeLogRepository<ProcessMapPlanUpdatingNoloadParametersDto, ProcessMapPlanBaseRequestWithWell>,
|
||||
@ -498,7 +498,7 @@ namespace AsbCloudInfrastructure
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanShockTestDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanDamperDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanAutoHoldTFDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<RotorRpmAccelerationDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanRotorRpmAccelerationDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanUpdatingNoloadParametersDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanOscillationDto>>();
|
||||
services.AddTransient<IWellCompositeRepository, WellCompositeRepository<ProcessMapPlanAntiCrashRotationDto>>();
|
||||
|
@ -8,7 +8,7 @@ public class ProcessMapPlanAntiCrashRotationTemplate : ITemplateParameters
|
||||
{
|
||||
public string SheetName => "Противоаварийное вращение";
|
||||
|
||||
public int HeaderRowsCount => 2;
|
||||
public int HeaderRowsCount => 3;
|
||||
|
||||
public string FileName => "ProcessMapPlanAntiCrashRotationTemplate.xlsx";
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
using AsbCloudApp.Data.ProcessMaps.Functions;
|
||||
using AsbCloudApp.Data.ProcessMaps.Operations;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
|
||||
@ -6,12 +8,18 @@ public class ProcessMapPlanLoadCapacityTemplate : ITemplateParameters
|
||||
{
|
||||
public string SheetName => "Выработка нагрузки";
|
||||
|
||||
public int HeaderRowsCount => 2;
|
||||
public int HeaderRowsCount => 3;
|
||||
|
||||
public string FileName => "ProcessMapPlanLoadCapacityTemplate.xlsx";
|
||||
|
||||
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
|
||||
{
|
||||
|
||||
{ nameof(ProcessMapPlanLoadCapacityDto.Section), new Cell(1, typeof(string)) },
|
||||
{ nameof(ProcessMapPlanLoadCapacityDto.DepthStart), new Cell(2, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanLoadCapacityDto.DepthEnd), new Cell(3, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanLoadCapacityDto.TimeLoadCapacityMin), new Cell(4, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanLoadCapacityDto.DifferentialPressureMin), new Cell(5, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanLoadCapacityDto.WeightOnBitMin), new Cell(6, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanLoadCapacityDto.Note), new Cell(7, typeof(string)) },
|
||||
};
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
using AsbCloudApp.Data.ProcessMaps.Functions;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
|
||||
@ -6,12 +7,21 @@ public class ProcessMapPlanOscillationTemplate : ITemplateParameters
|
||||
{
|
||||
public string SheetName => "Осцилляция";
|
||||
|
||||
public int HeaderRowsCount => 2;
|
||||
public int HeaderRowsCount => 3;
|
||||
|
||||
public string FileName => "ProcessMapPlanOscillationTemplate.xlsx";
|
||||
|
||||
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
|
||||
{
|
||||
|
||||
{ nameof(ProcessMapPlanOscillationDto.Section), new Cell(1, typeof(string)) },
|
||||
{ nameof(ProcessMapPlanOscillationDto.DepthStart), new Cell(2, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanOscillationDto.DepthEnd), new Cell(3, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanOscillationDto.OptimalOscillationAngle), new Cell(4, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanOscillationDto.RpmRight), new Cell(5, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanOscillationDto.RpmLeft), new Cell(6, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanOscillationDto.TorqueMaxRight), new Cell(7, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanOscillationDto.TorqueMaxLeft), new Cell(8, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanOscillationDto.Mode), new Cell(10, typeof(int)) },
|
||||
{ nameof(ProcessMapPlanOscillationDto.Note), new Cell(11, typeof(string)) },
|
||||
};
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
using AsbCloudApp.Data.ProcessMaps.Operations;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
|
||||
@ -6,12 +7,18 @@ public class ProcessMapPlanRotorLoweringBitTemplate : ITemplateParameters
|
||||
{
|
||||
public string SheetName => "Подход к забою в роторе";
|
||||
|
||||
public int HeaderRowsCount => 2;
|
||||
public int HeaderRowsCount => 3;
|
||||
|
||||
public string FileName => "ProcessMapPlanRotorLoweringBitTemplate.xlsx";
|
||||
|
||||
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
|
||||
{
|
||||
|
||||
{ nameof(ProcessMapPlanRotorLoweringBitDto.Section), new Cell(1, typeof(string)) },
|
||||
{ nameof(ProcessMapPlanRotorLoweringBitDto.DepthStart), new Cell(2, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanRotorLoweringBitDto.DepthEnd), new Cell(3, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanRotorLoweringBitDto.PressureMax), new Cell(4, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanRotorLoweringBitDto.DifferentialPressure), new Cell(5, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanRotorLoweringBitDto.SlackingOff), new Cell(6, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanRotorLoweringBitDto.Note), new Cell(7, typeof(string)) },
|
||||
};
|
||||
}
|
@ -1,3 +1,6 @@
|
||||
using AsbCloudApp.Data.ProcessMaps.Functions;
|
||||
using AsbCloudApp.Data.ProcessMaps.Operations;
|
||||
using AsbCloudDb.Model.ProcessMapPlan.Operations;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
|
||||
@ -12,6 +15,9 @@ public class ProcessMapPlanRotorRpmAccelerationTemplate : ITemplateParameters
|
||||
|
||||
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
|
||||
{
|
||||
|
||||
{ nameof(ProcessMapPlanRotorRpmAccelerationDto.Section), new Cell(1, typeof(string)) },
|
||||
{ nameof(ProcessMapPlanRotorRpmAccelerationDto.DepthStart), new Cell(2, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanRotorRpmAccelerationDto.DepthEnd), new Cell(3, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanRotorRpmAccelerationDto.Note), new Cell(11, typeof(string)) },
|
||||
};
|
||||
}
|
@ -1,3 +1,6 @@
|
||||
using AsbCloudApp.Data.ProcessMaps.Functions;
|
||||
using AsbCloudApp.Data.ProcessMaps.Operations;
|
||||
using AsbCloudDb.Model.ProcessMapPlan.Operations;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
|
||||
@ -6,12 +9,18 @@ public class ProcessMapPlanSwitchingToTheModeTemplate : ITemplateParameters
|
||||
{
|
||||
public string SheetName => "Выход на плановый расход";
|
||||
|
||||
public int HeaderRowsCount => 2;
|
||||
public int HeaderRowsCount => 3;
|
||||
|
||||
public string FileName => "ProcessMapPlanSwitchingToTheModeTemplate.xlsx";
|
||||
|
||||
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
|
||||
{
|
||||
|
||||
{ nameof(ProcessMapPlanSwitchingToTheModeDto.Section), new Cell(1, typeof(string)) },
|
||||
{ nameof(ProcessMapPlanSwitchingToTheModeDto.DepthStart), new Cell(2, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanSwitchingToTheModeDto.DepthEnd), new Cell(3, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanSwitchingToTheModeDto.RampTime), new Cell(4, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanSwitchingToTheModeDto.FlowRate), new Cell(5, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanSwitchingToTheModeDto.PressureMax), new Cell(6, typeof(double)) },
|
||||
{ nameof(ProcessMapPlanAntiCrashRotationDto.Note), new Cell(7, typeof(string)) },
|
||||
};
|
||||
}
|
@ -10,10 +10,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Export;
|
||||
|
||||
public class ProcessMapPlanRotorRpmAccelerationExportService : ProcessMapPlanExportService<RotorRpmAccelerationDto>
|
||||
public class ProcessMapPlanRotorRpmAccelerationExportService : ProcessMapPlanExportService<ProcessMapPlanRotorRpmAccelerationDto>
|
||||
{
|
||||
public ProcessMapPlanRotorRpmAccelerationExportService(
|
||||
IChangeLogRepository<RotorRpmAccelerationDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
||||
IChangeLogRepository<ProcessMapPlanRotorRpmAccelerationDto, ProcessMapPlanBaseRequestWithWell> processMapPlanRepository,
|
||||
IWellService wellService)
|
||||
: base(processMapPlanRepository, wellService)
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ using AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemp
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
|
||||
|
||||
public class ProcessMapPlanRotorRpmAccelerationParser : ProcessMapPlanParser<RotorRpmAccelerationDto>
|
||||
public class ProcessMapPlanRotorRpmAccelerationParser : ProcessMapPlanParser<ProcessMapPlanRotorRpmAccelerationDto>
|
||||
{
|
||||
public ProcessMapPlanRotorRpmAccelerationParser(IWellOperationRepository wellOperationRepository)
|
||||
: base(wellOperationRepository)
|
||||
@ -19,7 +19,7 @@ public class ProcessMapPlanRotorRpmAccelerationParser : ProcessMapPlanParser<Rot
|
||||
|
||||
protected override ITemplateParameters TemplateParameters => new ProcessMapPlanRotorRpmAccelerationTemplate();
|
||||
|
||||
protected override RotorRpmAccelerationDto BuildDto(IDictionary<string, object?> row, int rowNumber)
|
||||
protected override ProcessMapPlanRotorRpmAccelerationDto BuildDto(IDictionary<string, object?> row, int rowNumber)
|
||||
{
|
||||
var dto = base.BuildDto(row, rowNumber);
|
||||
|
||||
|
@ -16,12 +16,12 @@ namespace AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan.Operations;
|
||||
/// РТК план встряхивание бурового инструмента
|
||||
/// </summary>
|
||||
public class ProcessMapPlanRotorRpmAccelerationControllerTest :
|
||||
ProcessMapPlanBaseControllerTest<ProcessMapPlanRotorRpmAcceleration, RotorRpmAccelerationDto>
|
||||
ProcessMapPlanBaseControllerTest<ProcessMapPlanRotorRpmAcceleration, ProcessMapPlanRotorRpmAccelerationDto>
|
||||
{
|
||||
public ProcessMapPlanRotorRpmAccelerationControllerTest(WebAppFactoryFixture factory) : base(factory, "ProcessMapPlanFunctionsJarrDrillTool")
|
||||
{
|
||||
}
|
||||
private readonly RotorRpmAccelerationDto dto = new RotorRpmAccelerationDto()
|
||||
private readonly ProcessMapPlanRotorRpmAccelerationDto dto = new ProcessMapPlanRotorRpmAccelerationDto()
|
||||
{
|
||||
IdWell = 1,
|
||||
DepthStart = 1,
|
||||
@ -54,12 +54,12 @@ public class ProcessMapPlanRotorRpmAccelerationControllerTest :
|
||||
await Get(entity, dto);
|
||||
}
|
||||
|
||||
protected override ProcessMapPlanRotorRpmAcceleration GetByNote(DbSet<ProcessMapPlanRotorRpmAcceleration> dbSet, RotorRpmAccelerationDto dto)
|
||||
protected override ProcessMapPlanRotorRpmAcceleration GetByNote(DbSet<ProcessMapPlanRotorRpmAcceleration> dbSet, ProcessMapPlanRotorRpmAccelerationDto dto)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override RotorRpmAccelerationDto GetByNote(IEnumerable<RotorRpmAccelerationDto> dtos, RotorRpmAccelerationDto dto)
|
||||
protected override ProcessMapPlanRotorRpmAccelerationDto GetByNote(IEnumerable<ProcessMapPlanRotorRpmAccelerationDto> dtos, ProcessMapPlanRotorRpmAccelerationDto dto)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
@ -12,10 +12,10 @@ namespace AsbCloudWebApi.Controllers.ProcessMaps.Operations;
|
||||
/// РТК план выход на обороты перед ротором
|
||||
/// </summary>
|
||||
public class ProcessMapPlanRotorRpmAccelerationController :
|
||||
ProcessMapPlanBaseController<ProcessMapPlanRotorRpmAcceleration, RotorRpmAccelerationDto>
|
||||
ProcessMapPlanBaseController<ProcessMapPlanRotorRpmAcceleration, ProcessMapPlanRotorRpmAccelerationDto>
|
||||
{
|
||||
public ProcessMapPlanRotorRpmAccelerationController(
|
||||
IChangeLogRepository<RotorRpmAccelerationDto, ProcessMapPlanBaseRequestWithWell> repository,
|
||||
IChangeLogRepository<ProcessMapPlanRotorRpmAccelerationDto, ProcessMapPlanBaseRequestWithWell> repository,
|
||||
IWellService wellService,
|
||||
ProcessMapPlanRotorRpmAccelerationParser parserService,
|
||||
ITelemetryService telemetryService,
|
||||
|
Loading…
Reference in New Issue
Block a user