feat(dal): Добавлена генерация кодового обозначения в подробное описание шаблона, чтобы можно было отследить наряды от агента

This commit is contained in:
Mikhail Kuznetsov
2025-08-19 14:08:25 +10:00
parent 88e71d779c
commit a81f188cb7
2 changed files with 18 additions and 2 deletions

View File

@@ -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
/// <summary>
/// Поле Подробное описания шаблона АСУ ЕСПП
/// </summary>
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; }
/// <summary>
/// Поле Решение описания шаблона АСУ ЕСПП