diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs index a93e60af..0a5b75c5 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs @@ -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) && diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs index 11254258..af802ff8 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs @@ -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) && diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs index 44725024..fcee819d 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs @@ -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, diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs index 4d36f3d8..82c4db32 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs @@ -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) &&