fix(esppTemplateSync): при сравнении полей, исключаются символы переносы строк.

This commit is contained in:
Mikhail Trubnikov
2023-10-25 10:59:05 +10:00
parent fe0ddb00da
commit 477b11708f
2 changed files with 7 additions and 1 deletions

View File

@@ -35,6 +35,11 @@ namespace PARR.DAL.Models
/// </summary> /// </summary>
public int? NextStatusCode { get; set; } public int? NextStatusCode { get; set; }
///// <summary>
///// Дата генерации наряда в ЕСПП
///// </summary>
//public DateTimeOffset GenerateDate { get; set; }
[ForeignKey(nameof(TemplateId))] [ForeignKey(nameof(TemplateId))]
public Template? Template { get; set; } public Template? Template { get; set; }

View File

@@ -159,7 +159,8 @@ namespace PARR.EsppTemplateSync.Services
if (parrValue == null || esppValue == null) if (parrValue == null || esppValue == null)
continue; continue;
if (parrValue!.ToString()!.ToLower() != esppValue!.ToString()!.ToLower()) //Replace("\r","").Replace("\n","") - в подробном описании могут быть переносы строк, в Rabbit прилетает без переносов. Убираем переносы для стравнения
if (parrValue!.ToString()!.ToLower().Replace("\r", "").Replace("\n", "") != esppValue!.ToString()!.ToLower())
return true; return true;
} }