Актуализация полей шаблонов и изменение разделителя в файле экспорта
This commit is contained in:
@@ -27,33 +27,54 @@ namespace PARR.EsppTemplateSync.Services
|
||||
//TODO: а если формат нет тот? Все будет ок?
|
||||
|
||||
//TODO:
|
||||
var splittedContent = str.Split(";");
|
||||
if (splittedContent.Length != 8) return null;
|
||||
var splittedContent = str.Split("<|>");
|
||||
if (splittedContent.Length != 17)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var ek = splittedContent[0].Trim().Substring(1, splittedContent[0].Length - 2);
|
||||
var isActive = splittedContent[1].Trim().Substring(1, splittedContent[1].Length - 2);
|
||||
var workGroup = splittedContent[2].Trim().Substring(1, splittedContent[2].Length - 2);
|
||||
var shortDescription = splittedContent[3].Trim().Substring(1, splittedContent[3].Length - 2);
|
||||
var category = splittedContent[4].Trim().Substring(1, splittedContent[4].Length - 2);
|
||||
var ekDateCreatedStr = splittedContent[5].Trim().Substring(1, splittedContent[5].Length - 2);
|
||||
var process = splittedContent[6].Trim().Substring(1, splittedContent[6].Length - 2);
|
||||
var subProcess = splittedContent[7].Trim().Substring(1, splittedContent[7].Length - 2);
|
||||
//var name = splittedContent[0].Trim().Substring(1, splittedContent[0].Length - 2);
|
||||
var name = splittedContent[0].Trim();
|
||||
var isActive = splittedContent[1].Trim();
|
||||
var workGroup = splittedContent[2].Trim();
|
||||
var shortDescription = splittedContent[3].Trim();
|
||||
var category = splittedContent[4].Trim();
|
||||
var responseArea = splittedContent[5].Trim();
|
||||
var duration = splittedContent[6].Trim();
|
||||
var ek = splittedContent[7].Trim();
|
||||
var initiator = splittedContent[8].Trim();
|
||||
|
||||
var fullDescription = splittedContent[9].Trim();
|
||||
var closingCode = splittedContent[10].Trim();
|
||||
var solution = splittedContent[11].Trim();
|
||||
var process = splittedContent[12].Trim();
|
||||
var subProcess = splittedContent[13].Trim();
|
||||
var tnk = splittedContent[14].Trim();
|
||||
var work = splittedContent[15].Trim();
|
||||
var worker = splittedContent[16].Trim();
|
||||
|
||||
//logger.LogInformation($"Получено сообщение: {ek}");
|
||||
var template = new Template
|
||||
{
|
||||
Id = Guid.NewGuid(),
|
||||
DateCreated = DateTime.UtcNow,
|
||||
EK = ek,
|
||||
Name = name,
|
||||
isActive = bool.Parse(isActive),
|
||||
WorkGroup = workGroup,
|
||||
ShortDescription = shortDescription,
|
||||
Category = category,
|
||||
//todo: EKDateCreated
|
||||
EKDateCreated = ConvertDateFromStr(ekDateCreatedStr),
|
||||
//EKDateCreated = null,
|
||||
ResponseArea = responseArea,
|
||||
Duration = duration,
|
||||
EK = ek,
|
||||
Initiator = initiator,
|
||||
FullDescription = fullDescription,
|
||||
ClosingCode = closingCode,
|
||||
Solution = solution,
|
||||
Process = process,
|
||||
SubProcess = subProcess,
|
||||
TNK = tnk,
|
||||
Work = work,
|
||||
Worker = worker,
|
||||
Status = "Checking"
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user