add api report(2)
Some checks failed
release-dev / release-dev (push) Failing after 11s

This commit is contained in:
AdisakKanthawilang 2025-02-04 11:29:22 +07:00
parent f332823819
commit 4988427f9f
2 changed files with 33 additions and 0 deletions

View file

@ -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)
{
try

View file

@ -7,5 +7,6 @@ namespace BMA.EHR.Leave.Service.DTOs.Reports
public string? Type { get; set; } = string.Empty;
public int node { get; set; }
public string nodeId { get; set; }
public bool? isRetirement { get; set; } = false;
}
}