DD.WellWorkover.Cloud/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanParser.cs

28 lines
713 B
C#

using System;
using System.IO;
using AsbCloudApp.Data;
using AsbCloudApp.Data.ProcessMapPlan;
using AsbCloudApp.Requests.ParserOptions;
using AsbCloudInfrastructure.Services.Parser;
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
public abstract class ProcessMapPlanParser<TDto> : ParserExcelService<TDto, IParserOptionsRequest>
where TDto : ProcessMapPlanBaseDto
{
protected ProcessMapPlanParser(IServiceProvider serviceProvider)
: base(serviceProvider)
{
}
protected override int HeaderRowsCount => 2;
protected static int? GetIdMode(string? modeName) =>
modeName?.Trim().ToLower() switch
{
"ручной" => 0,
"ротор" => 1,
"слайд" => 2,
_ => null
};
}