From 030b89f75b88ffc8a7c4a7c8d01e927a91491e2b Mon Sep 17 00:00:00 2001 From: Mikhail Kuznetsov Date: Thu, 21 Aug 2025 12:23:26 +1000 Subject: [PATCH] =?UTF-8?q?feat(dal):=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B9=20=D1=88?= =?UTF-8?q?=D0=BE=D1=82=D1=80=D0=BA=D0=BE=D0=B4=20%=D0=93=D0=A0=D0=A3?= =?UTF-8?q?=D0=9F=D0=9F=D0=90=5F=D0=A0=D0=90=D0=91=D0=9E=D0=A2%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Implementations/ShortcodesService.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/PARR.DAL/DomainServices/Implementations/ShortcodesService.cs b/PARR.DAL/DomainServices/Implementations/ShortcodesService.cs index 007b4286..7f43e916 100644 --- a/PARR.DAL/DomainServices/Implementations/ShortcodesService.cs +++ b/PARR.DAL/DomainServices/Implementations/ShortcodesService.cs @@ -34,6 +34,7 @@ namespace PARR.DAL.DomainServices.Implementations var job = await jobService .Get().AsNoTracking() .Include(t=>t.Tnk) + .Include(t=>t.Group) .FirstOrDefaultAsync(t => t.Id == jobId); var unit = await unitService.Get().AsNoTracking().FirstOrDefaultAsync(t => t.Id == unitId); @@ -103,12 +104,15 @@ namespace PARR.DAL.DomainServices.Implementations private static string ReplaceShortcodes(Models.Job.Job job, Models.Unit.Unit unit, string resultName, List shortcodesInMask) { - if (shortcodesInMask.Any(x => x.Value == "%РАБОТА%")) - resultName = resultName.Replace("%РАБОТА%", job.WorkName); - if (shortcodesInMask.Any(x => x.Value == "%ЭК%")) resultName = resultName.Replace("%ЭК%", unit.Name); + if (shortcodesInMask.Any(x => x.Value == "%ГРУППА_РАБОТ%")) + resultName = resultName.Replace("%ГРУППА_РАБОТ%", job.Group!.GroupName); + + if (shortcodesInMask.Any(x => x.Value == "%РАБОТА%")) + resultName = resultName.Replace("%РАБОТА%", job.WorkName); + if (shortcodesInMask.Any(x => x.Value == "%ТНК%")) resultName = resultName.Replace("%ТНК%", job.Tnk!.Name); @@ -137,6 +141,7 @@ namespace PARR.DAL.DomainServices.Implementations { var result = new List { "%ЭК%", + "%ГРУППА_РАБОТ%", "%РАБОТА%", "%ТНК%" };