From a81f188cb78960a913ff16aaee3c1657b722cf84 Mon Sep 17 00:00:00 2001 From: Mikhail Kuznetsov Date: Tue, 19 Aug 2025 14:08:25 +1000 Subject: [PATCH] =?UTF-8?q?feat(dal):=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=B3=D0=B5=D0=BD=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=BA=D0=BE=D0=B4=D0=BE=D0=B2=D0=BE=D0=B3?= =?UTF-8?q?=D0=BE=20=D0=BE=D0=B1=D0=BE=D0=B7=D0=BD=D0=B0=D1=87=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B2=20=D0=BF=D0=BE=D0=B4=D1=80=D0=BE=D0=B1?= =?UTF-8?q?=D0=BD=D0=BE=D0=B5=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=D0=B0,=20=D1=87?= =?UTF-8?q?=D1=82=D0=BE=D0=B1=D1=8B=20=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=20?= =?UTF-8?q?=D0=B1=D1=8B=D0=BB=D0=BE=20=D0=BE=D1=82=D1=81=D0=BB=D0=B5=D0=B4?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20=D0=BD=D0=B0=D1=80=D1=8F=D0=B4=D1=8B=20?= =?UTF-8?q?=D0=BE=D1=82=20=D0=B0=D0=B3=D0=B5=D0=BD=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PARR.DAL/Models/Job/JobGroup.cs | 18 +++++++++++++++++- .../TemplateGenerator.cs | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/PARR.DAL/Models/Job/JobGroup.cs b/PARR.DAL/Models/Job/JobGroup.cs index b77c15c9..af7f0b3d 100644 --- a/PARR.DAL/Models/Job/JobGroup.cs +++ b/PARR.DAL/Models/Job/JobGroup.cs @@ -1,6 +1,7 @@ using Microsoft.EntityFrameworkCore; using PARR.DAL.Context; using PARR.DAL.Models.Base; +using PARR.DAL.Settings; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -35,7 +36,22 @@ namespace PARR.DAL.Models.Job /// /// Поле Подробное описания шаблона АСУ ЕСПП /// - public required string FullDescription { get; set; } + private string _fullDescription = string.Empty; + public required string FullDescription + { + get + { + //В полное описание подставляем префикс, для дальнейшего поиска наряда + return $"{_fullDescription}\r\n{PrefixSettings.PrefixWithoutVariable}"; + } + set + { + //удаляем префикс, если он есть + //_fullDescription = value.Replace($"\r\n{PrefixSettings.PrefixWithoutVariable}", string.Empty); + _fullDescription = value.Replace($"{PrefixSettings.PrefixWithoutVariable}", string.Empty).TrimEnd(); + } + } + //public required string FullDescription { get; set; } /// /// Поле Решение описания шаблона АСУ ЕСПП diff --git a/PARR.TemplateGeneratorWorker/TemplateGenerator.cs b/PARR.TemplateGeneratorWorker/TemplateGenerator.cs index e3256814..f5368a16 100644 --- a/PARR.TemplateGeneratorWorker/TemplateGenerator.cs +++ b/PARR.TemplateGeneratorWorker/TemplateGenerator.cs @@ -74,7 +74,7 @@ namespace PARR.TemplateGeneratorWorker if (!await templateService.CreateAsync(template) || !await templateService.CommitAsync(new HistoryInitiator { InitiatorComment = "Запрос на генерацию с тестового шаблона", InitiatorParrComponentId = ParrComponentsEnum.TemplateGenerator })) { - logger.LogError($"Ошибка при создании шаблона: Name: {template.Name}, {nameof(template.Job)}: {template.Job}, {nameof(template.Unit)}: {template.UnitId}"); + logger.LogError($"Ошибка при создании шаблона: Name: {template.Name}, {nameof(template.Job)}: {template.JobId}, {nameof(template.Unit)}: {template.UnitId}"); } else {