Merge branch 'develop'
* develop: #2150 fix รันเครื่องราชแต่หน่วยงานไม่ครบ #1831 ปรับ query แบบใบขอยกเลิกวันลา find org v2 change to v2
This commit is contained in:
commit
a6de2791c4
4 changed files with 900 additions and 837 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -574,6 +574,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
// endDate = endDate
|
||||
date = endDate
|
||||
};
|
||||
Console.WriteLine(body);
|
||||
|
||||
var profiles = new List<SearchProfileDto>();
|
||||
|
||||
|
|
@ -585,7 +586,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
return raw.Result;
|
||||
}
|
||||
|
||||
return null;
|
||||
return new List<GetProfileByKeycloakIdRootDto>();
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
@ -983,7 +984,7 @@ namespace BMA.EHR.Application.Repositories
|
|||
{
|
||||
try
|
||||
{
|
||||
var apiPath = $"{_configuration["API"]}/org/find/all";
|
||||
var apiPath = $"{_configuration["API"]}/org/find/allv2";
|
||||
var apiKey = _configuration["API_KEY"];
|
||||
var body = new
|
||||
{
|
||||
|
|
|
|||
|
|
@ -935,7 +935,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
// if (list.Count > 0)
|
||||
// approver = list.First().Name;
|
||||
//}
|
||||
|
||||
var approveResult = await GetApproverData(data.Approvers);
|
||||
var result = new
|
||||
{
|
||||
template = "แบบใบขอยกเลิกวันลา",
|
||||
|
|
@ -956,6 +956,22 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
profileType = data.ProfileType,
|
||||
leaveReasonDelete = data.LeaveCancelComment == null ? "" : data.LeaveCancelComment!.ToThaiNumber(),
|
||||
leaveDetail = data.LeaveDetail.ToThaiNumber(),
|
||||
|
||||
Type1 = profile.ProfileType == "OFFICER" ? "🗹" : "☐",
|
||||
Type2 = profile.ProfileType != "OFFICER" ? "🗹" : "☐",
|
||||
Type3 = "☐",
|
||||
approve = approveResult,
|
||||
approverComment = !string.IsNullOrEmpty(data.LeaveDirectorComment)
|
||||
? data.LeaveDirectorComment.Replace("\r", "").Replace("\n", "").Trim()
|
||||
: "......................",
|
||||
approverUpdatedAt = data.LastUpdatedAt.HasValue
|
||||
? data.LastUpdatedAt.Value.ToThaiShortDate().ToThaiNumber()
|
||||
: "...... /...... /......",
|
||||
leaveStatus = data.LeaveCancelStatus != null && data.LeaveCancelStatus!.ToUpper() == "APPROVE"
|
||||
? "🗹 อนุญาต ☐ ไม่อนุญาต"
|
||||
: data.LeaveCancelStatus != null && data.LeaveCancelStatus!.ToUpper() == "REJECT"
|
||||
? "☐ อนุญาต 🗹 ไม่อนุญาต"
|
||||
: "☐ อนุญาต ☐ ไม่อนุญาต"
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -1999,7 +2015,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
|
||||
if (type.Trim().ToUpper() == "OFFICER")
|
||||
{
|
||||
profile = await _userProfileRepository.GetProfileByAdminRole(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date);
|
||||
profile = await _userProfileRepository.GetProfileByAdminRolev2(AccessToken, profileAdmin?.Node, nodeId, role, req.revisionId, req.node, req.nodeId, req.StartDate.Date, req.EndDate.Date);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2241,7 +2257,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
|
||||
var enddate = req.EndDate.Date == req.StartDate.Date ? "" : $" - {req.EndDate.Date.ToThaiShortDate()}";
|
||||
var org = _userProfileRepository.GetOc(Guid.Parse(req.nodeId), req.node, AccessToken);
|
||||
var organizationName = $"{(!string.IsNullOrEmpty(org.Child4) ? org.Child4 + "/" : "")}{(!string.IsNullOrEmpty(org.Child3) ? org.Child3 + "/" : "")}{(!string.IsNullOrEmpty(org.Child2) ? org.Child2 + "/" : "")}{(!string.IsNullOrEmpty(org.Child1) ? org.Child1 + "/" : "")}{org.Root ?? ""}";
|
||||
var organizationName = org == null ? "" : $"{(!string.IsNullOrEmpty(org.Child4) ? org.Child4 + "/" : "")}{(!string.IsNullOrEmpty(org.Child3) ? org.Child3 + "/" : "")}{(!string.IsNullOrEmpty(org.Child2) ? org.Child2 + "/" : "")}{(!string.IsNullOrEmpty(org.Child1) ? org.Child1 + "/" : "")}{org.Root ?? ""}";
|
||||
var dateTimeStamp = $"ประจำ ณ วัน{req.StartDate.Date.GetThaiDayOfWeek()} ที่ {req.StartDate.Date.ToThaiShortDate()}{enddate}";
|
||||
|
||||
var templatePath = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", "TimeStampRecords.xlsx");
|
||||
|
|
|
|||
|
|
@ -553,18 +553,23 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
// placementReceive.citizenId = org.result.citizenId;
|
||||
placementReceive.rootOld = org.result.root;
|
||||
placementReceive.rootOldId = org.result.rootId;
|
||||
placementReceive.rootDnaId = org.result.rootDnaId;
|
||||
placementReceive.rootShortNameOld = org.result.rootShortName;
|
||||
placementReceive.child1Old = org.result.child1;
|
||||
placementReceive.child1OldId = org.result.child1Id;
|
||||
placementReceive.child1DnaId = org.result.child1DnaId;
|
||||
placementReceive.child1ShortNameOld = org.result.child1ShortName;
|
||||
placementReceive.child2Old = org.result.child2;
|
||||
placementReceive.child2OldId = org.result.child2Id;
|
||||
placementReceive.child2DnaId = org.result.child2DnaId;
|
||||
placementReceive.child2ShortNameOld = org.result.child2ShortName;
|
||||
placementReceive.child3Old = org.result.child3;
|
||||
placementReceive.child3OldId = org.result.child3Id;
|
||||
placementReceive.child4DnaId = org.result.child4DnaId;
|
||||
placementReceive.child3ShortNameOld = org.result.child3ShortName;
|
||||
placementReceive.child4Old = org.result.child4;
|
||||
placementReceive.child4OldId = org.result.child4Id;
|
||||
placementReceive.child4DnaId = org.result.child4DnaId;
|
||||
placementReceive.child4ShortNameOld = org.result.child4ShortName;
|
||||
placementReceive.posMasterNoOld = org.result.posMasterNo;
|
||||
placementReceive.posTypeOldId = org.result.posTypeId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue