Добавил DTO и константы

This commit is contained in:
parent 5896af9c81
commit 59c96aa9e9
5 changed files with 117 additions and 0 deletions

View File

@ -0,0 +1,54 @@
using System;
namespace AsbCloudApp.Data.WellOperationImport;
/// <summary>
/// Объект строки полученный из файла excel
/// </summary>
public class RowDto
{
/// <summary>
/// Номер строки
/// </summary>
public int Number { get; set; }
/// <summary>
/// Название секции
/// </summary>
public string? Section { get; set; }
/// <summary>
/// Категория
/// </summary>
public string? Category { get; set; }
/// <summary>
/// Описание категории
/// </summary>
public string CategoryInfo { get; set; } = null!;
/// <summary>
/// Начальная глубина операции
/// </summary>
public double DepthStart { get; set; }
/// <summary>
/// Конечная глубина операции
/// </summary>
public double DepthEnd { get; set; }
/// <summary>
/// Дата начала операции
/// </summary>
public DateTime Date { get; set; }
/// <summary>
/// Длительность операции
/// </summary>
public double Duration { get; set; }
/// <summary>
/// Комментарий
/// </summary>
public string? Comment { get; set; }
}

View File

@ -0,0 +1,29 @@
namespace AsbCloudApp.Data.WellOperationImport;
/// <summary>
/// Опции для настройки парсинга документа
/// </summary>
public class WellOperationParserOptionsDto
{
/// <summary>
/// Название листа
/// </summary>
public string? SheetName { get; set; }
/// <summary>
/// Id шаблона
/// 0 - Дефолтный шаблон
/// 1 - Газпром хантос
/// </summary>
public int IdTemplate { get; set; }
/// <summary>
/// Начальная строка
/// </summary>
public int? StartRow { get; set; }
/// <summary>
/// Конечная строка
/// </summary>
public int? EndRow { get; set; }
}

View File

@ -0,0 +1,17 @@
namespace AsbCloudInfrastructure.Services.WellOperationImport.Constants;
public static class DefaultTemplateInfo
{
public const string SheetNamePlan = "План";
public const string SheetNameFact = "Факт";
public const int HeaderRowsCount = 1;
public const int ColumnSection = 1;
public const int ColumnCategory = 2;
public const int ColumnCategoryInfo = 3;
public const int ColumnDepthStart = 4;
public const int ColumnDepthEnd = 5;
public const int ColumnDate = 6;
public const int ColumnDuration = 7;
public const int ColumnComment = 8;
}

View File

@ -0,0 +1,10 @@
namespace AsbCloudInfrastructure.Services.WellOperationImport.Constants;
public static class OperationAttributes
{
public const string CategoryInfo = "Описание";
public const string SectionDiameter = "ОК";
public const string Depth = "Забой";
public const string Duration = "Время операции";
public const string Date = "Дата окончания операции";
}

View File

@ -0,0 +1,7 @@
namespace AsbCloudInfrastructure.Services.WellOperationImport.Constants;
public static class Templates
{
public const int IdDefaultTemplate = 0;
public const int IdGazpromKhantosTemplate = 1;
}