แก้ Paging รายการรับโอน
This commit is contained in:
parent
02402542b2
commit
c9a4fb674e
1 changed files with 16 additions and 1 deletions
|
|
@ -65,7 +65,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet()]
|
||||
public async Task<ActionResult<ResponseObject>> GetListByAdmin()
|
||||
public async Task<ActionResult<ResponseObject>> GetListByAdmin(int page = 1, int pageSize = 10, string keyword = "")
|
||||
{
|
||||
// var rootId = "";
|
||||
// var child1Id = "";
|
||||
|
|
@ -170,7 +170,22 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
.ToListAsync();
|
||||
// if (PlacementAdmin == true)
|
||||
// placementReceives.Where(x => x.Status.Trim().ToUpper().Contains("PENDING"));
|
||||
if (keyword != "")
|
||||
{
|
||||
var data = placementReceives.Where(x => x.prefix.Contains(keyword) ||
|
||||
x.firstName.Contains(keyword) ||
|
||||
x.lastName.Contains(keyword) ||
|
||||
x.citizenId.Contains(keyword) ||
|
||||
x.root.Contains(keyword) ||
|
||||
x.nodeName.Contains(keyword) ||
|
||||
x.nodeShortName.Contains(keyword))
|
||||
.OrderByDescending(x => x.CreatedAt)
|
||||
.Skip((page - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
.ToList();
|
||||
|
||||
placementReceives = data;
|
||||
}
|
||||
return Success(placementReceives);
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue