From 641e57eaad4b6c8c7c51250540af736ab3bf5af1 Mon Sep 17 00:00:00 2001 From: Suphonchai Phoonsawat Date: Thu, 10 Aug 2023 12:54:07 +0700 Subject: [PATCH] =?UTF-8?q?fix=20bugs=20=E0=B9=81=E0=B8=AA=E0=B8=94?= =?UTF-8?q?=E0=B8=87=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=8A=E0=B8=B7=E0=B9=88?= =?UTF-8?q?=E0=B8=AD=E0=B9=80=E0=B8=A5=E0=B8=B7=E0=B8=AD=E0=B8=81=E0=B8=9C?= =?UTF-8?q?=E0=B8=B9=E0=B9=89=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=84=E0=B8=B3?= =?UTF-8?q?=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Repositories/Commands/CommandRepository.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs index 6b7879b0..c0af212d 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs @@ -73,14 +73,14 @@ namespace BMA.EHR.Application.Repositories.Commands try { var result = new List(); - + // TODO : ต้องมา list คนตามประเภทอีกครั้งนึง // 1. หารายชื่อที่ถูกเลือกไปแล้ว ในประเภทเดียวกัน var otherCommandReceivers = await _dbContext.Set() .Include(x => x.Command) .ThenInclude(x => x.CommandType) - .Where(x => x.Command.CommandType.CommandCode.Trim().ToUpper() == "C-PM-01") - .Where(x => x.Id != command.Id) + .Where(x => x.Command.CommandType.CommandCode.Trim().ToUpper().StartsWith("C-PM")) + .Where(x => x.Command.Id != command.Id) .Select(x => x.CitizenId) .ToListAsync(); @@ -394,7 +394,6 @@ namespace BMA.EHR.Application.Repositories.Commands } } - #endregion #endregion