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

@ -148,13 +148,13 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
.Where(x =>
(!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.dateConsiderationStart.HasValue || !req.dateConsiderationEnd.HasValue ||
(x.DateConsideration.HasValue &&
x.DateConsideration.Value.Date >= req.dateConsiderationStart.Value.Date &&
x.DateConsideration.Value.Date <= req.dateConsiderationEnd.Value.Date))
x.DateConsideration.Value.Date <= req.dateConsiderationStart.Value.Date &&
x.DateConsideration.Value.Date >= req.dateConsiderationEnd.Value.Date))
&&
(string.IsNullOrEmpty(req.respondentType) || x.RespondentType == req.respondentType)
&&

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)
&&

View file

@ -141,13 +141,13 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
.Where(x =>
(!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.investigationDateStart.HasValue || !req.investigationDateEnd.HasValue ||
(x.DateConsideration.HasValue &&
x.DateConsideration.Value.Date >= req.investigationDateStart.Value.Date &&
x.DateConsideration.Value.Date <= req.investigationDateEnd.Value.Date))
(x.InvestigationDateStart.HasValue && x.InvestigationDateEnd.HasValue &&
x.InvestigationDateStart.Value.Date <= req.investigationDateStart.Value.Date &&
x.InvestigationDateEnd.Value.Date >= req.investigationDateEnd.Value.Date))
&&
(string.IsNullOrEmpty(req.respondentType) || x.RespondentType == req.respondentType)
&&
@ -168,8 +168,9 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
RespondentType = x.RespondentType,//ผู้ถูกสืบสวน
OffenseDetails = x.OffenseDetails,//ลักษณะความผิด
Status = x.Status,//สถานะหรือผลการสืบสวน
InvestigationDateStart = x.InvestigationDateStart,
InvestigationDateEnd = x.InvestigationDateEnd,
InvestigationDateStart = x.InvestigationDateStart, //วันที่เริ่มการสืบสวน
InvestigationDateEnd = x.InvestigationDateEnd, //วันที่สิ้นสุดการสืบสวน
DateReceived = x.DateReceived, //วันที่รับเรื่อง
CreatedAt = x.CreatedAt,//วันที่สร้างเรื่องสืบสวน
InvestigationDetail = x.InvestigationDetail,
InvestigationStatusResult = x.InvestigationStatusResult,

View file

@ -170,8 +170,8 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
.Where(x =>
(!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)
&&