no message
This commit is contained in:
parent
b98b02ac98
commit
e7728d71bd
8 changed files with 242 additions and 298 deletions
|
|
@ -68,16 +68,25 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
/// <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 getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_PROMOTION_EMP");
|
||||
var getPermission = await _permission.GetPermissionOrgAPIAsync("LIST", "SYS_PROMOTION_EMP", UserId);
|
||||
var jsonData = JsonConvert.DeserializeObject<JObject>(getPermission);
|
||||
if (jsonData["status"]?.ToString() != "200")
|
||||
{
|
||||
return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden);
|
||||
}
|
||||
// string?[] rootId = jsonData?.result?.rootId ?? null;
|
||||
// string?[] child1Id = jsonData?.result?.child1Id ?? null;
|
||||
// string?[] child2Id = jsonData?.result?.child2Id ?? null;
|
||||
// string?[] child3Id = jsonData?.result?.child3Id ?? null;
|
||||
// string?[] child4Id = jsonData?.result?.child4Id ?? null;
|
||||
var placementAppointments = await _context.PlacementAppointments.AsQueryable()
|
||||
.Where(x => x.type == "EMPLOYEE")
|
||||
// .Where(x => rootId == null ? true : rootId.Contains(x.rootOldId))
|
||||
// .Where(x => child1Id == null ? true : child1Id.Contains(x.child1OldId))
|
||||
// .Where(x => child2Id == null ? true : child2Id.Contains(x.child2OldId))
|
||||
// .Where(x => child3Id == null ? true : child3Id.Contains(x.child3OldId))
|
||||
// .Where(x => child4Id == null ? true : child4Id.Contains(x.child4OldId))
|
||||
.OrderByDescending(x => x.CreatedAt)
|
||||
.Select(p => new
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue