diff --git a/PARR.EsppScheduleSync/Domain/EsppObjectSchedule.cs b/PARR.EsppScheduleSync/Domain/EsppObjectSchedule.cs index 9b803478..419906a6 100644 --- a/PARR.EsppScheduleSync/Domain/EsppObjectSchedule.cs +++ b/PARR.EsppScheduleSync/Domain/EsppObjectSchedule.cs @@ -107,5 +107,10 @@ namespace PARR.EsppScheduleSync.Domain /// Рабочий график /// public string V60calendar { get; set; } = string.Empty; + + /// + /// Время создания наряда (чч:мм:сс) + /// + public string BasisTime { get; set; } } } diff --git a/PARR.EsppScheduleSync/ScheduleSyncher.cs b/PARR.EsppScheduleSync/ScheduleSyncher.cs index a9d66ea4..9e4238d6 100644 --- a/PARR.EsppScheduleSync/ScheduleSyncher.cs +++ b/PARR.EsppScheduleSync/ScheduleSyncher.cs @@ -93,6 +93,7 @@ namespace PARR.EsppScheduleSync TypeV60calendar = settingsFromDb.ScheduleExclude == "Нет исключений" ? "NONE" : "", //Scheduled = EsppScheduleHelpers.GetNextRun(template.NextRun), Scheduled = EsppScheduleHelpers.GetNextRun(nextRunModifierService.GetNextRunByAccountRobotTimeZone(template.NextRun)), + BasisTime = EsppScheduleHelpers.GetGenerationTime(nextRunModifierService.GetNextRunByAccountRobotTimeZone(template.NextRun)), Timezone = settingsFromDb.ScheduleTimezone, //Мы решили, что для всех расписаний "Отсутствует дата завершения", если что-то поменяется, тут нужно переделать TerminationType = settingsFromDb.ScheduleRepeatRange == "Отсутствует дата завершения" ? "forever" : "", @@ -168,6 +169,8 @@ namespace PARR.EsppScheduleSync esppObject.An3 = esppSchedule.Values.First(t => t.Order == 2).Value.EsppExportValue; break; } + + } } @@ -181,9 +184,9 @@ namespace PARR.EsppScheduleSync private EsppObjectSchedule? ParseStrToEsppObject(string str) { 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; } @@ -223,7 +226,8 @@ namespace PARR.EsppScheduleSync Timezone = splittedContent[18], TerminationType = splittedContent[19], CompleteAfter = splittedContent[20], - V60calendar = splittedContent[22] + V60calendar = splittedContent[22], + BasisTime = splittedContent[23] }; return ClearOptionalFields(esppObject); diff --git a/PARR.EsppSync/SyncService.cs b/PARR.EsppSync/SyncService.cs index f2ad77dc..f870594b 100644 --- a/PARR.EsppSync/SyncService.cs +++ b/PARR.EsppSync/SyncService.cs @@ -171,7 +171,7 @@ namespace PARR.EsppSync if (dbValueStr != esppValueStr) { - logger.LogDebug($"Не совпадают поля. dbValueStr: {dbValueStr}, esppValueStr: {esppValueStr}"); + logger.LogDebug($"Не совпадают поля({prop.Name}). dbValueStr: {dbValueStr}, esppValueStr: {esppValueStr}"); return true; }