Добавлены параметры шаблонов

This commit is contained in:
Степанов Дмитрий 2024-03-14 08:00:14 +03:00
parent a53f5c3ac3
commit af2d180d99
6 changed files with 145 additions and 0 deletions

View File

@ -0,0 +1,14 @@
using System.Collections.Generic;
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates;
public interface ITemplateParameters
{
string SheetName { get; }
int HeaderRowsCount { get; }
string FileName { get; }
IDictionary<string, Cell> Cells { get; }
}

View File

@ -0,0 +1,35 @@
using System.Collections.Generic;
using AsbCloudApp.Data.ProcessMaps;
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
public class ProcessMapPlanDrillingTemplate : ITemplateParameters
{
public string SheetName => "План";
public int HeaderRowsCount => 2;
public string FileName => "ProcessMapPlanDrillingTemplate.xlsx";
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
{
{ nameof(ProcessMapPlanDrillingDto.Section), new Cell(1, typeof(string)) },
{ nameof(ProcessMapPlanDrillingDto.Mode), new Cell(2, typeof(string)) },
{ nameof(ProcessMapPlanDrillingDto.DepthStart), new Cell(3, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.DepthEnd), new Cell(4, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.DeltaPressurePlan), new Cell(5, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.DeltaPressureLimitMax), new Cell(6, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.AxialLoadPlan), new Cell(7, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.AxialLoadLimitMax), new Cell(8, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.TopDriveTorquePlan), new Cell(9, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.TopDriveTorqueLimitMax), new Cell(10, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.TopDriveSpeedPlan), new Cell(11, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.TopDriveSpeedLimitMax), new Cell(12, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.FlowPlan), new Cell(13, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.FlowLimitMax), new Cell(14, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.RopPlan), new Cell(15, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.UsageSaub), new Cell(16, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.UsageSpin), new Cell(17, typeof(double)) },
{ nameof(ProcessMapPlanDrillingDto.Comment), new Cell(18, typeof(string)) }
};
}

View File

@ -0,0 +1,29 @@
using System.Collections.Generic;
using AsbCloudApp.Data.ProcessMaps;
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlanTemplates;
public class ProcessMapPlanReamTemplate : ITemplateParameters
{
public string SheetName => "План";
public int HeaderRowsCount => 2;
public string FileName => "ProcessMapPlanReamTemplate.xlsx";
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
{
{ nameof(ProcessMapPlanReamDto.Section), new Cell(1, typeof(string)) },
{ nameof(ProcessMapPlanReamDto.DepthStart), new Cell(2, typeof(double)) },
{ nameof(ProcessMapPlanReamDto.DepthEnd), new Cell(3, typeof(double)) },
{ nameof(ProcessMapPlanReamDto.Repeats), new Cell(4, typeof(double)) },
{ nameof(ProcessMapPlanReamDto.SpinUpward), new Cell(5, typeof(double)) },
{ nameof(ProcessMapPlanReamDto.SpinDownward), new Cell(6, typeof(double)) },
{ nameof(ProcessMapPlanReamDto.SpeedUpward), new Cell(7, typeof(double)) },
{ nameof(ProcessMapPlanReamDto.SpeedDownward), new Cell(8, typeof(double)) },
{ nameof(ProcessMapPlanReamDto.SetpointDrag), new Cell(9, typeof(double)) },
{ nameof(ProcessMapPlanReamDto.SetpointTight), new Cell(10, typeof(double)) },
{ nameof(ProcessMapPlanReamDto.Pressure), new Cell(11, typeof(double)) },
{ nameof(ProcessMapPlanReamDto.Torque), new Cell(12, typeof(double)) },
};
}

View File

@ -0,0 +1,23 @@
using System.Collections.Generic;
using AsbCloudApp.Data.Trajectory;
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.TrajectoryTemplates;
public class TrajectoryFactManualTemplate : ITemplateParameters
{
public string SheetName => "Фактическая траектория";
public int HeaderRowsCount => 2;
public string FileName => "TrajectoryFactManualTemplate.xlsx";
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
{
{ nameof(TrajectoryGeoFactDto.WellboreDepth), new Cell(1, typeof(double)) },
{ nameof(TrajectoryGeoFactDto.ZenithAngle), new Cell(2, typeof(double)) },
{ nameof(TrajectoryGeoFactDto.AzimuthGeo), new Cell(3, typeof(double)) },
{ nameof(TrajectoryGeoFactDto.AzimuthMagnetic), new Cell(4, typeof(double)) },
{ nameof(TrajectoryGeoFactDto.VerticalDepth), new Cell(5, typeof(double)) },
{ nameof(TrajectoryGeoFactDto.Comment), new Cell(6, typeof(string)) }
};
}

View File

@ -0,0 +1,23 @@
using System.Collections.Generic;
using AsbCloudApp.Data.Trajectory;
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.TrajectoryTemplates;
public class TrajectoryFactNnbTemplate : ITemplateParameters
{
public string SheetName => "Фактическая ннб-траектория";
public int HeaderRowsCount => 2;
public string FileName => "TrajectoryFactNnbTemplate.xlsx";
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
{
{ nameof(TrajectoryGeoFactDto.WellboreDepth), new Cell(1, typeof(double)) },
{ nameof(TrajectoryGeoFactDto.ZenithAngle), new Cell(2, typeof(double)) },
{ nameof(TrajectoryGeoFactDto.AzimuthGeo), new Cell(3, typeof(double)) },
{ nameof(TrajectoryGeoFactDto.AzimuthMagnetic), new Cell(4, typeof(double)) },
{ nameof(TrajectoryGeoFactDto.VerticalDepth), new Cell(5, typeof(double)) },
{ nameof(TrajectoryGeoFactDto.Comment), new Cell(6, typeof(string)) }
};
}

View File

@ -0,0 +1,21 @@
using System.Collections.Generic;
using AsbCloudApp.Data.Trajectory;
namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.TrajectoryTemplates;
public class TrajectoryPlanTemplate : ITemplateParameters
{
public string SheetName => "Плановая траектория";
public int HeaderRowsCount => 2;
public string FileName => "TrajectoryPlanTemplate.xlsx";
public IDictionary<string, Cell> Cells => new Dictionary<string, Cell>
{
{ nameof(TrajectoryGeoPlanDto.WellboreDepth), new Cell(1, typeof(double)) },
{ nameof(TrajectoryGeoPlanDto.ZenithAngle), new Cell(2, typeof(double)) },
{ nameof(TrajectoryGeoPlanDto.AzimuthGeo), new Cell(3, typeof(double)) },
{ nameof(TrajectoryGeoPlanDto.AzimuthMagnetic), new Cell(4, typeof(double)) },
{ nameof(TrajectoryGeoPlanDto.VerticalDepth), new Cell(5, typeof(double)) },
{ nameof(TrajectoryGeoPlanDto.Radius), new Cell(6, typeof(double)) },
{ nameof(TrajectoryGeoPlanDto.Comment), new Cell(7, typeof(string)) }
};
}