This commit is contained in:
parent
f332823819
commit
4988427f9f
2 changed files with 33 additions and 0 deletions
|
|
@ -304,6 +304,38 @@ namespace BMA.EHR.Application.Repositories
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<List<GetProfileByKeycloakIdRootDto>> GetProfileWithKeycloakAllOfficerRetireFilter(string? accessToken, int? node, string? nodeId, bool isAll, bool? isRetirement)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var apiPath = $"{_configuration["API"]}/org/dotnet/keycloak-all-officer";
|
||||||
|
var apiKey = _configuration["API_KEY"];
|
||||||
|
var body = new
|
||||||
|
{
|
||||||
|
node = node,
|
||||||
|
nodeId = nodeId,
|
||||||
|
isAll = isAll,
|
||||||
|
isRetirement = isRetirement,
|
||||||
|
};
|
||||||
|
|
||||||
|
var profiles = new List<SearchProfileDto>();
|
||||||
|
|
||||||
|
var apiResult = await PostExternalAPIAsync(apiPath, accessToken, body, apiKey);
|
||||||
|
if (apiResult != null)
|
||||||
|
{
|
||||||
|
var raw = JsonConvert.DeserializeObject<GetListProfileByKeycloakIdRootResultDto>(apiResult);
|
||||||
|
if (raw != null)
|
||||||
|
return raw.Result;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<List<GetProfileByKeycloakIdRootDto>> GetProfileWithKeycloakAllEmployee(string? accessToken, int? node, string? nodeId, bool isAll)
|
public async Task<List<GetProfileByKeycloakIdRootDto>> GetProfileWithKeycloakAllEmployee(string? accessToken, int? node, string? nodeId, bool isAll)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,6 @@ namespace BMA.EHR.Leave.Service.DTOs.Reports
|
||||||
public string? Type { get; set; } = string.Empty;
|
public string? Type { get; set; } = string.Empty;
|
||||||
public int node { get; set; }
|
public int node { get; set; }
|
||||||
public string nodeId { get; set; }
|
public string nodeId { get; set; }
|
||||||
|
public bool? isRetirement { get; set; } = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue