From af2d180d992d1823c40625f86fc0f458e8e7361d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Thu, 14 Mar 2024 08:00:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80?= =?UTF-8?q?=D1=8B=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Templates/ITemplateParameters.cs | 14 ++++++++ .../ProcessMapPlanDrillingTemplate.cs | 35 +++++++++++++++++++ .../ProcessMapPlanReamTemplate.cs | 29 +++++++++++++++ .../TrajectoryFactManualTemplate.cs | 23 ++++++++++++ .../TrajectoryFactNnbTemplate.cs | 23 ++++++++++++ .../TrajectoryPlanTemplate.cs | 21 +++++++++++ 6 files changed, 145 insertions(+) create mode 100644 AsbCloudInfrastructure/Services/ExcelServices/Templates/ITemplateParameters.cs create mode 100644 AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanDrillingTemplate.cs create mode 100644 AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanReamTemplate.cs create mode 100644 AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactManualTemplate.cs create mode 100644 AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactNnbTemplate.cs create mode 100644 AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryPlanTemplate.cs diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ITemplateParameters.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ITemplateParameters.cs new file mode 100644 index 00000000..eeb1076c --- /dev/null +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ITemplateParameters.cs @@ -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 Cells { get; } +} \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanDrillingTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanDrillingTemplate.cs new file mode 100644 index 00000000..dff24dcf --- /dev/null +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanDrillingTemplate.cs @@ -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 Cells => new Dictionary + { + { 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)) } + }; +} \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanReamTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanReamTemplate.cs new file mode 100644 index 00000000..4df80a7e --- /dev/null +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanReamTemplate.cs @@ -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 Cells => new Dictionary + { + { 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)) }, + }; +} \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactManualTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactManualTemplate.cs new file mode 100644 index 00000000..8e604e1e --- /dev/null +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactManualTemplate.cs @@ -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 Cells => new Dictionary + { + { 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)) } + }; +} \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactNnbTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactNnbTemplate.cs new file mode 100644 index 00000000..87489d7c --- /dev/null +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactNnbTemplate.cs @@ -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 Cells => new Dictionary + { + { 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)) } + }; +} \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryPlanTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryPlanTemplate.cs new file mode 100644 index 00000000..d98c1d89 --- /dev/null +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryPlanTemplate.cs @@ -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 Cells => new Dictionary + { + { 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)) } + }; +} \ No newline at end of file