เปลี่ยนเส้น api call รายชื่อ
Some checks failed
release-dev / release-dev (push) Failing after 11s

This commit is contained in:
Bright 2025-03-12 13:17:09 +07:00
parent 2a6bef472b
commit 6c84542e94
2 changed files with 133 additions and 4 deletions

View file

@ -304,6 +304,37 @@ namespace BMA.EHR.Application.Repositories
}
}
public async Task<List<GetProfileByKeycloakIdRootDto>> GetProfileWithNoneValidateKeycloakAllOfficer(string? accessToken, int? node, string? nodeId, bool isAll)
{
try
{
var apiPath = $"{_configuration["API"]}/org/dotnet/none-validate-keycloak-all-officer";
var apiKey = _configuration["API_KEY"];
var body = new
{
node = node,
nodeId = nodeId,
isAll = isAll,
};
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>> GetProfileWithKeycloakAllOfficerRetireFilter(string? accessToken, int? node, string? nodeId, bool isAll, bool? isRetirement)
{
try
@ -367,6 +398,37 @@ namespace BMA.EHR.Application.Repositories
}
}
public async Task<List<GetProfileByKeycloakIdRootDto>> GetProfileWithNoneValidateKeycloakAllEmployee(string? accessToken, int? node, string? nodeId, bool isAll)
{
try
{
var apiPath = $"{_configuration["API"]}/org/dotnet/none-validate-keycloak-all-employee";
var apiKey = _configuration["API_KEY"];
var body = new
{
node = node,
nodeId = nodeId,
isAll = isAll,
};
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>> GetProfileWithKeycloakAllOfficerAndRevision(string? accessToken, int? node, string? nodeId, bool isAll, string? revisionId)
{
try
@ -399,6 +461,38 @@ namespace BMA.EHR.Application.Repositories
}
}
public async Task<List<GetProfileByKeycloakIdRootDto>> GetProfileWithNoneValidateKeycloakAllOfficerAndRevision(string? accessToken, int? node, string? nodeId, bool isAll, string? revisionId)
{
try
{
var apiPath = $"{_configuration["API"]}/org/dotnet/none-validate-keycloak-all-officer";
var apiKey = _configuration["API_KEY"];
var body = new
{
node = node,
nodeId = nodeId,
isAll = isAll,
revisionId = revisionId,
};
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>> GetProfileWithKeycloakAllOfficerRetireFilterAndRevision(string? accessToken, int? node, string? nodeId, bool isAll, bool? isRetirement, string? revisionId)
{
try
@ -464,6 +558,37 @@ namespace BMA.EHR.Application.Repositories
}
}
public async Task<List<GetProfileByKeycloakIdRootDto>> GetProfileWithNoneValidateKeycloakAllEmployeeAndRevision(string? accessToken, int? node, string? nodeId, bool isAll, string? revisionId)
{
try
{
var apiPath = $"{_configuration["API"]}/org/dotnet/none-validate-keycloak-all-employee";
var apiKey = _configuration["API_KEY"];
var body = new
{
node = node,
nodeId = nodeId,
isAll = isAll,
revisionId = revisionId,
};
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<SearchProfileDto>> SearchProfile(string? citizenId, string? firstName, string? lastName, string accessToken)
{
try