Update InsigniaRequestController to use GetOcByNodeId and include RootDnaId in insigniaNoteProfile #2390
All checks were successful
Build & Deploy Insignia Service / build (push) Successful in 2m3s
All checks were successful
Build & Deploy Insignia Service / build (push) Successful in 2m3s
This commit is contained in:
parent
69b89dfc90
commit
a4a5d13203
1 changed files with 5 additions and 1 deletions
|
|
@ -3146,7 +3146,10 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
var doc = await _documentService.UploadFileAsync(file, file.FileName);
|
||||
insigniaNoteProfile.DocReceiveInsignia = doc;
|
||||
}
|
||||
var root = _userProfileRepository.GetOc(req.OrgId, 0, AccessToken)?.Root ?? null;
|
||||
|
||||
var orgData = _userProfileRepository.GetOcByNodeId(req.OrgId,0, AccessToken);
|
||||
var root = orgData?.Root ?? null;
|
||||
var rootDnaId = orgData?.RootDnaId ?? null;
|
||||
if (req.OrgId != Guid.Parse("00000000-0000-0000-0000-000000000000"))
|
||||
{
|
||||
if (root == null)
|
||||
|
|
@ -3157,6 +3160,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
root = "สำนักนายกรัฐมนตรี";
|
||||
}
|
||||
insigniaNoteProfile.OrgReceiveInsignia = root;
|
||||
insigniaNoteProfile.RootDnaId = rootDnaId;
|
||||
insigniaNoteProfile.OrgReceiveInsigniaId = req.OrgId;
|
||||
insigniaNoteProfile.DateReceiveInsignia = req.Date;
|
||||
insigniaNoteProfile.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue