fix bugs แสดงรายชื่อเลือกผู้รับคำสั่ง

This commit is contained in:
Suphonchai Phoonsawat 2023-08-10 12:54:07 +07:00
parent aacbcfee32
commit 641e57eaad

View file

@ -73,14 +73,14 @@ namespace BMA.EHR.Application.Repositories.Commands
try
{
var result = new List<CommandReceiver>();
// TODO : ต้องมา list คนตามประเภทอีกครั้งนึง
// 1. หารายชื่อที่ถูกเลือกไปแล้ว ในประเภทเดียวกัน
var otherCommandReceivers = await _dbContext.Set<CommandReceiver>()
.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