แก้ list รายการเกษียณ
This commit is contained in:
parent
ae67d4381d
commit
b98b02ac98
5 changed files with 9 additions and 18 deletions
|
|
@ -68,7 +68,6 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value;
|
||||
private string? token => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"];
|
||||
|
||||
private bool? RetirementAdmin => _httpContextAccessor?.HttpContext?.User?.IsInRole("placement1");
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -114,7 +113,7 @@ namespace BMA.EHR.Retirement.Service.Controllers
|
|||
|
||||
var retirementDeceaseds = await _context.RetirementDeceaseds.AsQueryable()
|
||||
.OrderByDescending(x => x.CreatedAt)
|
||||
.Where(x => RetirementAdmin == true ? true : (rootId == "" ? true : (child1Id == "" ? x.rootId == rootId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id))))))
|
||||
.Where(x => rootId == "" ? true : (child1Id == "" ? x.rootId == rootId : (child2Id == "" ? x.child1Id == child1Id : (child3Id == "" ? x.child2Id == child2Id : (child4Id == "" ? x.child3Id == child3Id : x.child4Id == child4Id)))))
|
||||
.Select(p => new
|
||||
{
|
||||
p.Id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue