Merge branch 'develop'
This commit is contained in:
commit
aab6884f56
1 changed files with 6 additions and 2 deletions
|
|
@ -59,7 +59,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
||||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||||
[HttpGet()]
|
[HttpGet()]
|
||||||
public async Task<ActionResult<ResponseObject>> GetDisciplineSuspend(DateTime? startDate, DateTime? endDate, int page = 1, int pageSize = 25, string keyword = "", string profileType = "", string? sortBy = "", bool? descending = false)
|
public async Task<ActionResult<ResponseObject>> GetDisciplineSuspend(DateTime? startDate, DateTime? endDate, int page = 1, int pageSize = 25, string keyword = "", string profileType = "", string? sortBy = "", bool? descending = false, string? status="")
|
||||||
{
|
{
|
||||||
var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_SUSPENDED");
|
var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_SUSPENDED");
|
||||||
var jsonData = JsonConvert.DeserializeObject<JObject>(getPermission);
|
var jsonData = JsonConvert.DeserializeObject<JObject>(getPermission);
|
||||||
|
|
@ -78,7 +78,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
||||||
) :
|
) :
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
&&
|
&&
|
||||||
(
|
(
|
||||||
(x.CitizenId != null && x.CitizenId.Contains(keyword)) ||
|
(x.CitizenId != null && x.CitizenId.Contains(keyword)) ||
|
||||||
((x.Prefix ?? "") + (x.FirstName ?? "") + " " + (x.LastName ?? "")).Contains(keyword) ||
|
((x.Prefix ?? "") + (x.FirstName ?? "") + " " + (x.LastName ?? "")).Contains(keyword) ||
|
||||||
|
|
@ -94,6 +94,10 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
||||||
(profileType.ToUpper() == "OFFICER" && x.profileType == "OFFICER") ||
|
(profileType.ToUpper() == "OFFICER" && x.profileType == "OFFICER") ||
|
||||||
(profileType.ToUpper() == "EMPLOYEE" && x.profileType == "EMPLOYEE")
|
(profileType.ToUpper() == "EMPLOYEE" && x.profileType == "EMPLOYEE")
|
||||||
)
|
)
|
||||||
|
&&
|
||||||
|
(
|
||||||
|
!string.IsNullOrEmpty(status) ? x.Status!.Trim().ToUpper() == status : true
|
||||||
|
)
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
var query = data_search
|
var query = data_search
|
||||||
.Select(x => new
|
.Select(x => new
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue