แก้รายงาน

This commit is contained in:
Suphonchai Phoonsawat 2023-09-02 22:50:38 +07:00
parent 890c34e0d5
commit 1ebdddaa6a
8 changed files with 175 additions and 10 deletions

View file

@ -87,6 +87,38 @@ namespace BMA.EHR.Application.Repositories.Commands
}
}
public async Task<List<dynamic>> GetCommandType02AttachmentAsync(Guid id)
{
try
{
var raw_data = await _dbContext.Set<CommandReceiver>()
.Include(c => c.Command)
.Where(c => c.Command.Id == id)
.ToListAsync();
if (raw_data == null)
{
throw new Exception(GlobalMessages.CommandNotFound);
}
var ret = new List<dynamic>();
foreach (var c in raw_data)
{
ret.Add(new
{
FullName = $"{c.Prefix}{c.FirstName} {c.LastName}",
PositionName = ""
});
}
return ret;
}
catch
{
throw;
}
}
#endregion
}
}