issue ระบบลาและลงเวลา>>รายการลงเวลาปฏิบัติงาน (สอบถาม) #1074 เพิ่ม
Some checks failed
release-dev / release-dev (push) Failing after 12s
Some checks failed
release-dev / release-dev (push) Failing after 12s
Query String Profile Type
This commit is contained in:
parent
8b7bfb5ea0
commit
9f0c03921d
1 changed files with 8 additions and 2 deletions
|
|
@ -1210,7 +1210,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> LogRecordAsync([Required] DateTime startDate, [Required] DateTime endDate, int page = 1, int pageSize = 10, string keyword = "")
|
||||
public async Task<ActionResult<ResponseObject>> LogRecordAsync([Required] DateTime startDate, [Required] DateTime endDate, int page = 1, int pageSize = 10, string keyword = "", string profileType = "ALL")
|
||||
{
|
||||
var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_CHECKIN");
|
||||
var jsonData = JsonConvert.DeserializeObject<JObject>(getPermission);
|
||||
|
|
@ -1265,6 +1265,9 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
data = data.Where(x => x.FullName.Contains(keyword)).ToList();
|
||||
}
|
||||
|
||||
if (profileType.Trim().ToUpper() != "ALL")
|
||||
data = data.Where(x => x.ProfileType == profileType.Trim().ToUpper()).ToList();
|
||||
|
||||
var pageData = data
|
||||
.Skip((page - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
|
|
@ -1396,7 +1399,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
[AllowAnonymous]
|
||||
public async Task<ActionResult<ResponseObject>> GetTimeRecordAsync([Required] DateTime startDate, [Required] DateTime endDate, int page = 1, int pageSize = 10, string status = "NORMAL", string keyword = "")
|
||||
public async Task<ActionResult<ResponseObject>> GetTimeRecordAsync([Required] DateTime startDate, [Required] DateTime endDate, int page = 1, int pageSize = 10, string status = "NORMAL", string keyword = "", string profileType = "ALL")
|
||||
{
|
||||
var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_CHECKIN");
|
||||
var jsonData = JsonConvert.DeserializeObject<JObject>(getPermission);
|
||||
|
|
@ -1557,6 +1560,9 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
data = data.Where(x => x.CheckInStatus == status || x.CheckOutStatus == status).ToList();
|
||||
}
|
||||
|
||||
if (profileType.Trim().ToUpper() != "ALL")
|
||||
data = data.Where(x => x.ProfileType == profileType.Trim().ToUpper()).ToList();
|
||||
|
||||
var pageData = data
|
||||
.Skip((page - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue