report update

This commit is contained in:
AdisakKanthawilang 2025-08-22 16:53:00 +07:00
parent 4130604ca8
commit 711a8eeff6
2 changed files with 36 additions and 1 deletions

View file

@ -585,6 +585,41 @@ namespace BMA.EHR.Application.Repositories
}
}
public async Task<List<GetProfileByKeycloakIdRootDto>> GetProfileWithKeycloakAllOfficerRetireFilterAndRevisionAndDate(string? accessToken, int? node, string? nodeId, bool isAll, bool? isRetirement, string? revisionId, DateTime? startDate, DateTime? endDate)
{
try
{
var apiPath = $"{_configuration["API"]}/org/dotnet/keycloak-all-officer/date";
var apiKey = _configuration["API_KEY"];
var body = new
{
node = node,
nodeId = nodeId,
isAll = isAll,
isRetirement = isRetirement,
revisionId = revisionId,
dateStart = startDate,
dateEnd = endDate,
};
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>> GetProfileWithKeycloakAllEmployeeAndRevision(string? accessToken, int? node, string? nodeId, bool isAll, string? revisionId)
{
try