2024-02-09 11:32:31 +05:00
|
|
|
using System;
|
|
|
|
using System.IO;
|
|
|
|
using AsbCloudApp.Data;
|
|
|
|
using AsbCloudApp.Data.ProcessMapPlan;
|
|
|
|
using AsbCloudApp.Requests.ParserOptions;
|
2024-02-13 16:05:16 +05:00
|
|
|
using AsbCloudInfrastructure.Services.Parser;
|
2024-02-09 11:32:31 +05:00
|
|
|
|
|
|
|
namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser;
|
|
|
|
|
2024-02-12 17:25:18 +05:00
|
|
|
public abstract class ProcessMapPlanParser<TDto> : ParserExcelService<TDto, IParserOptionsRequest>
|
2024-02-09 11:32:31 +05:00
|
|
|
where TDto : ProcessMapPlanBaseDto
|
|
|
|
{
|
|
|
|
protected ProcessMapPlanParser(IServiceProvider serviceProvider)
|
|
|
|
: base(serviceProvider)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2024-02-13 16:05:16 +05:00
|
|
|
protected override int HeaderRowsCount => 2;
|
2024-02-09 11:32:31 +05:00
|
|
|
|
|
|
|
protected static int? GetIdMode(string? modeName) =>
|
|
|
|
modeName?.Trim().ToLower() switch
|
|
|
|
{
|
|
|
|
"ручной" => 0,
|
|
|
|
"ротор" => 1,
|
|
|
|
"слайд" => 2,
|
|
|
|
_ => null
|
|
|
|
};
|
|
|
|
}
|