fix : Leave and Insignia (Not Complete)
This commit is contained in:
parent
89b4c71dbd
commit
c85bece782
14 changed files with 18266 additions and 88 deletions
|
|
@ -147,6 +147,8 @@ namespace BMA.EHR.Application.Repositories.Reports
|
|||
|
||||
public async Task<dynamic> GetProfileInsignia(Guid id)
|
||||
{
|
||||
|
||||
|
||||
var profile = (from r in await _dbContext.Set<Profile>()
|
||||
.Include(x => x.Prefix)
|
||||
.Include(x => x.Position)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using BMA.EHR.Application.Common.Interfaces;
|
||||
using BMA.EHR.Application.Responses.Organizations;
|
||||
using BMA.EHR.Application.Responses.Profiles;
|
||||
using BMA.EHR.Domain.Models.HR;
|
||||
using BMA.EHR.Domain.Models.MetaData;
|
||||
|
|
@ -266,7 +267,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
{
|
||||
try
|
||||
{
|
||||
var apiPath = $"{_configuration["API"]}/org/dotnet/keycloak";
|
||||
var apiPath = $"{_configuration["API"]}/org/dotnet/user-fullname/{keycloakId}";
|
||||
|
||||
var apiResult = GetExternalAPIAsync(apiPath, accessToken ?? "");
|
||||
if (apiResult.Result != null)
|
||||
|
|
@ -349,6 +350,36 @@ namespace BMA.EHR.Application.Repositories
|
|||
}
|
||||
}
|
||||
|
||||
public GetOrganizationResponseDTO? GetOc(Guid ocId, int level, string? accessToken)
|
||||
{
|
||||
try
|
||||
{
|
||||
var apiPath = $"{_configuration["API"]}/org/find/all";
|
||||
var body = new
|
||||
{
|
||||
nodeId = ocId,
|
||||
node = level
|
||||
|
||||
};
|
||||
|
||||
var apiResult = PostExternalAPIAsync(apiPath, accessToken ?? "", body).Result;
|
||||
if (apiResult != null)
|
||||
{
|
||||
var raw = JsonConvert.DeserializeObject<GetOrganizationResponseResultDTO>(apiResult);
|
||||
if (raw != null && raw.Result != null)
|
||||
{
|
||||
return raw.Result;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue