This commit is contained in:
parent
179d61cc16
commit
887d015276
22 changed files with 20618 additions and 444 deletions
|
|
@ -58,7 +58,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet()]
|
||||
public async Task<ActionResult<ResponseObject>> GetDisciplineSuspend(int page = 1, int pageSize = 25, string keyword = "", string profileType = "")
|
||||
public async Task<ActionResult<ResponseObject>> GetDisciplineSuspend(DateTime? startDate, DateTime? endDate, int page = 1, int pageSize = 25, string keyword = "", string profileType = "")
|
||||
{
|
||||
var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_SUSPENDED");
|
||||
var jsonData = JsonConvert.DeserializeObject<JObject>(getPermission);
|
||||
|
|
@ -68,6 +68,16 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
|||
}
|
||||
var data_search = (from x in _context.DisciplineReport_Profiles.Include(x => x.DisciplineDisciplinary)
|
||||
where
|
||||
(
|
||||
endDate != null && startDate != null?
|
||||
(
|
||||
(x.StartDateSuspend.Value.Date >= startDate.Value.Date && x.StartDateSuspend.Value.Date <= endDate.Value.Date) ||
|
||||
(x.EndDateSuspend.Value.Date >= startDate.Value.Date && x.EndDateSuspend.Value.Date <= endDate.Value.Date) ||
|
||||
(x.StartDateSuspend.Value.Date <= startDate.Value.Date && x.EndDateSuspend.Value.Date >= endDate.Value.Date)
|
||||
) :
|
||||
true
|
||||
)
|
||||
&&
|
||||
(
|
||||
(x.CitizenId != null && x.CitizenId.Contains(keyword)) ||
|
||||
((x.Prefix ?? "") + (x.FirstName ?? "") + " " + (x.LastName ?? "")).Contains(keyword) ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue