From d3be22cfbdc08dc9814e8ddf58b2b8c3f8b3622a Mon Sep 17 00:00:00 2001 From: Bright Date: Tue, 22 Jul 2025 10:27:05 +0700 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20=E0=B8=81=E0=B8=A3=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=A7=E0=B8=B1=E0=B8=99=E0=B8=97=E0=B8=B5=E0=B9=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/DisciplineComplaintController.cs | 8 ++++---- .../DisciplineDisciplinaryController.cs | 8 ++++---- .../DisciplineInvestigateController.cs | 15 ++++++++------- .../Controllers/DisciplineResultController.cs | 4 ++-- 4 files changed, 18 insertions(+), 17 deletions(-) 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) &&