From 7239efca51a8036fe50335bcce4a14fecba422f1 Mon Sep 17 00:00:00 2001 From: Mikhail Kuznetsov Date: Fri, 15 Aug 2025 12:16:24 +1000 Subject: [PATCH] =?UTF-8?q?fix(dal):=20=D0=98=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=BE=20=D1=84=D0=BE=D1=80=D0=BC=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20shortcode=20%?= =?UTF-8?q?=D0=A2=D0=9D=D0=9A%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Implementations/ShortcodesService.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/PARR.DAL/DomainServices/Implementations/ShortcodesService.cs b/PARR.DAL/DomainServices/Implementations/ShortcodesService.cs index 690f43aa..007b4286 100644 --- a/PARR.DAL/DomainServices/Implementations/ShortcodesService.cs +++ b/PARR.DAL/DomainServices/Implementations/ShortcodesService.cs @@ -31,7 +31,11 @@ namespace PARR.DAL.DomainServices.Implementations var nameConstants = settingsFromDb.TemplateNameConstantPartsList; - var job = await jobService.Get().AsNoTracking().FirstOrDefaultAsync(t => t.Id == jobId); + var job = await jobService + .Get().AsNoTracking() + .Include(t=>t.Tnk) + .FirstOrDefaultAsync(t => t.Id == jobId); + var unit = await unitService.Get().AsNoTracking().FirstOrDefaultAsync(t => t.Id == unitId); if (job != null && unit != null && job.TemplateNameMask != null) @@ -104,6 +108,10 @@ namespace PARR.DAL.DomainServices.Implementations if (shortcodesInMask.Any(x => x.Value == "%ЭК%")) resultName = resultName.Replace("%ЭК%", unit.Name); + + if (shortcodesInMask.Any(x => x.Value == "%ТНК%")) + resultName = resultName.Replace("%ТНК%", job.Tnk!.Name); + return resultName; } @@ -129,8 +137,8 @@ namespace PARR.DAL.DomainServices.Implementations { var result = new List { "%ЭК%", - "%ЗО%", - "%РАБОТА%" + "%РАБОТА%", + "%ТНК%" }; return result;