บันทึกข้อมูลรับโอน
This commit is contained in:
parent
19803fd523
commit
dec96d2bd3
8 changed files with 16467 additions and 60 deletions
|
|
@ -492,19 +492,19 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
|
||||
uppdated.Status = true;
|
||||
uppdated.ReturnDate = req.ReturnDate;
|
||||
if (req.ReturnOrganizationId == Guid.Parse("00000000-0000-0000-0000-000000000000"))
|
||||
{
|
||||
uppdated.ReturnOrganization = uppdated.BorrowOrganization;
|
||||
}
|
||||
else
|
||||
{
|
||||
var organization = await _context.Organizations.AsQueryable()
|
||||
.Include(x => x.OrganizationOrganization)
|
||||
.FirstOrDefaultAsync(x => x.Id == req.ReturnOrganizationId);
|
||||
if (organization == null)
|
||||
return Error(GlobalMessages.OrganizationNotFound);
|
||||
uppdated.ReturnOrganization = organization.OrganizationOrganization;
|
||||
}
|
||||
// if (req.ReturnOrganizationId == Guid.Parse("00000000-0000-0000-0000-000000000000"))
|
||||
// {
|
||||
uppdated.ReturnOrganization = uppdated.BorrowOrganization;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var organization = await _context.Organizations.AsQueryable()
|
||||
// .Include(x => x.OrganizationOrganization)
|
||||
// .FirstOrDefaultAsync(x => x.Id == req.ReturnOrganizationId);
|
||||
// if (organization == null)
|
||||
// return Error(GlobalMessages.OrganizationNotFound);
|
||||
// uppdated.ReturnOrganization = organization.OrganizationOrganization;
|
||||
// }
|
||||
uppdated.ReturnReason = req.ReturnReason;
|
||||
uppdated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
uppdated.LastUpdateUserId = UserId ?? "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue