fix คำนวณเครื่องราชย์
This commit is contained in:
parent
41474b407d
commit
0ed2d4c389
4 changed files with 56 additions and 4 deletions
|
|
@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Http;
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Newtonsoft.Json;
|
||||
using System.Reflection.Emit;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace BMA.EHR.Application.Repositories
|
||||
|
|
@ -510,6 +511,28 @@ namespace BMA.EHR.Application.Repositories
|
|||
}
|
||||
}
|
||||
|
||||
public async Task<List<GetActiveRootDto>> GetActiveRootAsync(string? accessToken)
|
||||
{
|
||||
try
|
||||
{
|
||||
var apiPath = $"{_configuration["API"]}/org/active/root";
|
||||
|
||||
var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "");
|
||||
if (apiResult != null)
|
||||
{
|
||||
var raw = JsonConvert.DeserializeObject<GetActiveRootResultDto>(apiResult);
|
||||
if (raw != null)
|
||||
return raw.Result;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue