report update
This commit is contained in:
parent
4130604ca8
commit
711a8eeff6
2 changed files with 36 additions and 1 deletions
|
|
@ -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)
|
public async Task<List<GetProfileByKeycloakIdRootDto>> GetProfileWithKeycloakAllEmployeeAndRevision(string? accessToken, int? node, string? nodeId, bool isAll, string? revisionId)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
||||||
|
|
@ -1185,7 +1185,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
||||||
}
|
}
|
||||||
var profile = new List<GetProfileByKeycloakIdRootDto>();
|
var profile = new List<GetProfileByKeycloakIdRootDto>();
|
||||||
profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficerRetireFilterAndRevision(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.isRetirement ?? true, req.revisionId);
|
profile = await _userProfileRepository.GetProfileWithKeycloakAllOfficerRetireFilterAndRevisionAndDate(AccessToken, req.node, req.nodeId, jsonData["result"] == "OWNER" || jsonData["result"] == "CHILD", req.isRetirement ?? true, req.revisionId, req.StartDate, req.EndDate);
|
||||||
|
|
||||||
// get leave day
|
// get leave day
|
||||||
var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByTypeAndRange(req.StartDate, req.EndDate);
|
var leaveDays = await _leaveRequestRepository.GetSumApproveLeaveByTypeAndRange(req.StartDate, req.EndDate);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue