Fix Bug กรองวันที่
Some checks failed
release-dev / release-dev (push) Failing after 10s

This commit is contained in:
Bright 2025-07-22 10:27:05 +07:00
parent 757035a4b0
commit d3be22cfbd
4 changed files with 18 additions and 17 deletions

View file

@ -145,14 +145,14 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
//วันที่รับเรือง
(!req.dateReceivedStart.HasValue || !req.dateReceivedEnd.HasValue ||
(x.DateReceived.HasValue &&
x.DateReceived.Value.Date >= req.dateReceivedStart.Value.Date &&
x.DateReceived.Value.Date <= req.dateReceivedEnd.Value.Date))
x.DateReceived.Value.Date <= req.dateReceivedStart.Value.Date &&
x.DateReceived.Value.Date >= req.dateReceivedEnd.Value.Date))
&&
//วันที่สอบสวน
(!req.disciplinaryDateStart.HasValue || !req.disciplinaryDateEnd.HasValue ||
(x.DisciplinaryDateStart.HasValue && x.DisciplinaryDateEnd.HasValue &&
x.DisciplinaryDateStart.Value.Date >= req.disciplinaryDateStart.Value.Date &&
x.DisciplinaryDateEnd.Value.Date <= req.disciplinaryDateEnd.Value.Date))
x.DisciplinaryDateStart.Value.Date <= req.disciplinaryDateStart.Value.Date &&
x.DisciplinaryDateEnd.Value.Date >= req.disciplinaryDateEnd.Value.Date))
&&
(string.IsNullOrEmpty(req.respondentType) || x.RespondentType == req.respondentType)
&&