API ลบรายการเฉพาะสิทธิ์ OWNER #1586
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 2m5s
Build & Deploy Placement Service / build (push) Successful in 1m43s
Build & Deploy Retirement Service / build (push) Successful in 1m47s

This commit is contained in:
harid 2026-05-28 14:53:32 +07:00
parent 3f98e07419
commit dc5ac329e2
7 changed files with 268 additions and 2 deletions

View file

@ -1062,6 +1062,42 @@ namespace BMA.EHR.Application.Repositories
}
}
public async Task<List<GetProfileByKeycloakIdRootDto>> GetEmployeeByAdminRolev2(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/employee-by-admin-rolev2";
var apiKey = _configuration["API_KEY"];
var body = new
{
node = node,
nodeId = nodeId,
role = role,
// isRetirement
reqNode = reqNode,
reqNodeId = reqNodeId,
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<GetProfileByKeycloakIdRootAddTotalDto> SearchProfile(string? citizenId, string? firstName, string? lastName, string accessToken, int page, int pageSize, string? role, string? nodeId, int? node,string? selectedNodeId,int? selectedNode )
{
try