feat(esppScheduleSync): добавлено в синхронизацию поле BasisTime "Время создания наряда"
This commit is contained in:
@@ -107,5 +107,10 @@ namespace PARR.EsppScheduleSync.Domain
|
|||||||
/// Рабочий график
|
/// Рабочий график
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string V60calendar { get; set; } = string.Empty;
|
public string V60calendar { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Время создания наряда (чч:мм:сс)
|
||||||
|
/// </summary>
|
||||||
|
public string BasisTime { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ namespace PARR.EsppScheduleSync
|
|||||||
TypeV60calendar = settingsFromDb.ScheduleExclude == "Нет исключений" ? "NONE" : "",
|
TypeV60calendar = settingsFromDb.ScheduleExclude == "Нет исключений" ? "NONE" : "",
|
||||||
//Scheduled = EsppScheduleHelpers.GetNextRun(template.NextRun),
|
//Scheduled = EsppScheduleHelpers.GetNextRun(template.NextRun),
|
||||||
Scheduled = EsppScheduleHelpers.GetNextRun(nextRunModifierService.GetNextRunByAccountRobotTimeZone(template.NextRun)),
|
Scheduled = EsppScheduleHelpers.GetNextRun(nextRunModifierService.GetNextRunByAccountRobotTimeZone(template.NextRun)),
|
||||||
|
BasisTime = EsppScheduleHelpers.GetGenerationTime(nextRunModifierService.GetNextRunByAccountRobotTimeZone(template.NextRun)),
|
||||||
Timezone = settingsFromDb.ScheduleTimezone,
|
Timezone = settingsFromDb.ScheduleTimezone,
|
||||||
//Мы решили, что для всех расписаний "Отсутствует дата завершения", если что-то поменяется, тут нужно переделать
|
//Мы решили, что для всех расписаний "Отсутствует дата завершения", если что-то поменяется, тут нужно переделать
|
||||||
TerminationType = settingsFromDb.ScheduleRepeatRange == "Отсутствует дата завершения" ? "forever" : "",
|
TerminationType = settingsFromDb.ScheduleRepeatRange == "Отсутствует дата завершения" ? "forever" : "",
|
||||||
@@ -168,6 +169,8 @@ namespace PARR.EsppScheduleSync
|
|||||||
esppObject.An3 = esppSchedule.Values.First(t => t.Order == 2).Value.EsppExportValue;
|
esppObject.An3 = esppSchedule.Values.First(t => t.Order == 2).Value.EsppExportValue;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,9 +184,9 @@ namespace PARR.EsppScheduleSync
|
|||||||
private EsppObjectSchedule? ParseStrToEsppObject(string str)
|
private EsppObjectSchedule? ParseStrToEsppObject(string str)
|
||||||
{
|
{
|
||||||
var splittedContent = str.Split(globalSettings.ParsingSeparator);
|
var splittedContent = str.Split(globalSettings.ParsingSeparator);
|
||||||
if (splittedContent.Length != 23)
|
if (splittedContent.Length != 24)
|
||||||
{
|
{
|
||||||
logger.LogError($"Входная строка после сплита не содержит 23 объекта (факт: {splittedContent.Length}).");
|
logger.LogError($"Входная строка после сплита не содержит 24 объекта (факт: {splittedContent.Length}).");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,7 +226,8 @@ namespace PARR.EsppScheduleSync
|
|||||||
Timezone = splittedContent[18],
|
Timezone = splittedContent[18],
|
||||||
TerminationType = splittedContent[19],
|
TerminationType = splittedContent[19],
|
||||||
CompleteAfter = splittedContent[20],
|
CompleteAfter = splittedContent[20],
|
||||||
V60calendar = splittedContent[22]
|
V60calendar = splittedContent[22],
|
||||||
|
BasisTime = splittedContent[23]
|
||||||
};
|
};
|
||||||
|
|
||||||
return ClearOptionalFields(esppObject);
|
return ClearOptionalFields(esppObject);
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ namespace PARR.EsppSync
|
|||||||
|
|
||||||
if (dbValueStr != esppValueStr)
|
if (dbValueStr != esppValueStr)
|
||||||
{
|
{
|
||||||
logger.LogDebug($"Не совпадают поля. dbValueStr: {dbValueStr}, esppValueStr: {esppValueStr}");
|
logger.LogDebug($"Не совпадают поля({prop.Name}). dbValueStr: {dbValueStr}, esppValueStr: {esppValueStr}");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user