export report leave
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m8s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m8s
This commit is contained in:
parent
98adc74792
commit
6e531e4d16
2 changed files with 41 additions and 5 deletions
|
|
@ -594,6 +594,42 @@ namespace BMA.EHR.Application.Repositories
|
|||
}
|
||||
}
|
||||
|
||||
public async Task<List<GetProfileByKeycloakIdRootDto>> GetProfileByAdminRolev3(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-rolev3";
|
||||
var apiKey = _configuration["API_KEY"];
|
||||
var body = new
|
||||
{
|
||||
node = node,
|
||||
nodeId = nodeId,
|
||||
role = role,
|
||||
// revisionId = revisionId,
|
||||
reqNode = reqNode,
|
||||
reqNodeId = reqNodeId,
|
||||
startDate = startDate,
|
||||
endDate = 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>> GetProfileWithKeycloakAllOfficerRetireFilterAndRevision(string? accessToken, int? node, string? nodeId, bool isAll, bool? isRetirement, string? revisionId)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
|
|
@ -962,10 +962,10 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
Type3 = "☐",
|
||||
approve = approveResult,
|
||||
approverComment = !string.IsNullOrEmpty(data.LeaveDirectorComment)
|
||||
? data.LeaveDirectorComment.Replace("\r", "").Replace("\n", "").Trim()
|
||||
? data.LeaveDirectorComment.Replace("\r", "").Replace("\n", "").Trim()
|
||||
: "......................",
|
||||
approverUpdatedAt = data.LastUpdatedAt.HasValue
|
||||
? data.LastUpdatedAt.Value.ToThaiShortDate().ToThaiNumber()
|
||||
approverUpdatedAt = data.LastUpdatedAt.HasValue
|
||||
? data.LastUpdatedAt.Value.ToThaiShortDate().ToThaiNumber()
|
||||
: "...... /...... /......",
|
||||
leaveStatus = data.LeaveCancelStatus != null && data.LeaveCancelStatus!.ToUpper() == "APPROVE"
|
||||
? "🗹 อนุญาต ☐ ไม่อนุญาต"
|
||||
|
|
@ -1674,7 +1674,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
|
||||
if (type.Trim().ToUpper() == "OFFICER")
|
||||
{
|
||||
profile = await _userProfileRepository.GetProfileByAdminRolev2(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date);
|
||||
profile = await _userProfileRepository.GetProfileByAdminRolev3(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2015,7 +2015,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
|
||||
if (type.Trim().ToUpper() == "OFFICER")
|
||||
{
|
||||
profile = await _userProfileRepository.GetProfileByAdminRolev2(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date);
|
||||
profile = await _userProfileRepository.GetProfileByAdminRolev3(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue