api ประวัติการออกคำสั่ง
This commit is contained in:
parent
a61bc8fc77
commit
528ebda465
3 changed files with 56 additions and 0 deletions
|
|
@ -8683,5 +8683,26 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
|
||||
#endregion
|
||||
|
||||
public async Task<dynamic> GetHistoryCommandByProfileAsync(string type, Guid id)
|
||||
{
|
||||
try
|
||||
{
|
||||
var command = await _dbContext.Set<Command>()
|
||||
.Where(x => x.CommandType.Category == type.Trim().ToLower())
|
||||
.Where(x => x.Receivers.Where(x => x.RefPlacementProfileId == id).FirstOrDefault() != null)
|
||||
.Select(x => new
|
||||
{
|
||||
CommandSubject = x.CommandSubject,
|
||||
CreatedAt = x.CreatedAt,
|
||||
LastUpdatedAt = x.LastUpdatedAt,
|
||||
})
|
||||
.ToListAsync();
|
||||
return command;
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue