fix
This commit is contained in:
parent
a0cc233846
commit
d3d7179c48
1 changed files with 17 additions and 17 deletions
|
|
@ -72,7 +72,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("user")]
|
||||
public async Task<ActionResult<ResponseObject>> GetListByProfile(string keyword = "")
|
||||
public async Task<ActionResult<ResponseObject>> GetListByProfile()
|
||||
{
|
||||
var apiUrl = $"{_configuration["API"]}/org/profile/keycloak/position";
|
||||
using (var client = new HttpClient())
|
||||
|
|
@ -131,23 +131,23 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
p.IsActive,
|
||||
})
|
||||
.ToListAsync();
|
||||
if (keyword != "")
|
||||
{
|
||||
var data = placementTransfers.Where(x =>
|
||||
(x.OrganizationPositionOld != null && x.OrganizationPositionOld.Contains(keyword)) ||
|
||||
(x.rootShortNameOld != null && x.rootShortNameOld.Contains(keyword)) ||
|
||||
(x.PositionNumberOld != null && x.PositionNumberOld.Contains(keyword)) ||
|
||||
(x.posTypeNameOld != null && x.posTypeNameOld.Contains(keyword)) ||
|
||||
(x.posLevelNameOld != null && x.posLevelNameOld.Contains(keyword)) ||
|
||||
(x.Organization != null && x.Organization.Contains(keyword))
|
||||
)
|
||||
//.OrderByDescending(x => x.CreatedAt)
|
||||
// .Skip((page - 1) * pageSize)
|
||||
// .Take(pageSize)
|
||||
.ToList();
|
||||
//if (keyword != "")
|
||||
//{
|
||||
// var data = placementTransfers.Where(x =>
|
||||
// (x.OrganizationPositionOld != null && x.OrganizationPositionOld.Contains(keyword)) ||
|
||||
// (x.rootShortNameOld != null && x.rootShortNameOld.Contains(keyword)) ||
|
||||
// (x.PositionNumberOld != null && x.PositionNumberOld.Contains(keyword)) ||
|
||||
// (x.posTypeNameOld != null && x.posTypeNameOld.Contains(keyword)) ||
|
||||
// (x.posLevelNameOld != null && x.posLevelNameOld.Contains(keyword)) ||
|
||||
// (x.Organization != null && x.Organization.Contains(keyword))
|
||||
// )
|
||||
// .OrderByDescending(x => x.CreatedAt)
|
||||
// .Skip((page - 1) * pageSize)
|
||||
// .Take(pageSize)
|
||||
// .ToList();
|
||||
|
||||
placementTransfers = data;
|
||||
}
|
||||
// placementTransfers = data;
|
||||
//}
|
||||
return Success(placementTransfers);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue