fix
This commit is contained in:
parent
142f87ce57
commit
f58ba90f62
3 changed files with 23 additions and 16 deletions
|
|
@ -502,11 +502,15 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
if (insigniaNoteProfile.Status != "DONE")
|
||||
return Error(GlobalMessages.InsigniaNoBorrow);
|
||||
|
||||
var userProfile = _userProfileRepository.GetOfficerProfileById(insigniaNoteProfile.ProfileId.Value, AccessToken);
|
||||
|
||||
//var _organization = await _context.Organizations.AsQueryable()
|
||||
// .FirstOrDefaultAsync(x => x.Id == insigniaNoteProfile.Profile.OcId);
|
||||
|
||||
//TODO : Hardcode OCId ต้องแก้ให้ดึงมาจากคน Login
|
||||
if (req.BorrowOrganizationId == null) req.BorrowOrganizationId = Guid.Parse("e8493cd1-d371-402e-add6-566e68d5d1b3");
|
||||
var user_oc = _userProfileRepository.GetUserOCId(userProfile.Keycloak.Value, AccessToken);
|
||||
if (req.BorrowOrganizationId == null) req.BorrowOrganizationId = user_oc;
|
||||
//if (req.BorrowOrganizationId == null) req.BorrowOrganizationId = Guid.Parse("e8493cd1-d371-402e-add6-566e68d5d1b3");
|
||||
|
||||
var organization = _userProfileRepository.GetOc(req.BorrowOrganizationId.Value, 0, AccessToken);
|
||||
//if (organization == null)
|
||||
|
|
|
|||
|
|
@ -2812,7 +2812,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
[HttpPut("upload/{requestId:length(36)}"), DisableRequestSizeLimit]
|
||||
public async Task<ActionResult<ResponseObject>> UpdatePersonDeferment([FromForm] ImportFileRequest req, Guid requestId)
|
||||
{
|
||||
var insigniaRequest = await _context.InsigniaRequests.Include(x => x.Document).Where(x => x.Id == requestId).FirstOrDefaultAsync();
|
||||
var insigniaRequest = await _context.InsigniaRequests.AsNoTracking().Include(x => x.Document).Where(x => x.Id == requestId).FirstOrDefaultAsync();
|
||||
if (insigniaRequest == null)
|
||||
return Error(GlobalMessages.InsigniaRequestNotFound, 404);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue