report leave api4
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m9s

This commit is contained in:
kittapath 2026-01-11 16:35:02 +07:00
parent 5cdef791f3
commit 49cb60dee7
2 changed files with 40 additions and 2 deletions

View file

@ -630,6 +630,44 @@ namespace BMA.EHR.Application.Repositories
}
}
public async Task<List<GetProfileByKeycloakIdRootDto>> GetProfileByAdminRolev4(string? accessToken, int? node, string? nodeId, string role, string? revisionId, int? reqNode, string? reqNodeId, DateTime? startDate, DateTime? endDate)
{
try
{
var apiPath = $"{_configuration["API"]}/org/dotnet/officer-by-admin-rolev4";
var apiKey = _configuration["API_KEY"];
var body = new
{
node = node,
nodeId = nodeId,
role = role,
// revisionId = revisionId,
reqNode = reqNode,
reqNodeId = reqNodeId,
// startDate = startDate,
// endDate = endDate
date = endDate
};
Console.WriteLine(body);
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 new List<GetProfileByKeycloakIdRootDto>();
}
catch
{
throw;
}
}
public async Task<List<GetProfileByKeycloakIdRootDto>> GetProfileWithKeycloakAllOfficerRetireFilterAndRevision(string? accessToken, int? node, string? nodeId, bool isAll, bool? isRetirement, string? revisionId)
{
try