From 9ebef6aedf4c3139d75eaf2380a7f386514edd8d Mon Sep 17 00:00:00 2001 From: Kittapath Date: Tue, 16 Jan 2024 12:52:30 +0700 Subject: [PATCH 1/2] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=8A?= =?UTF-8?q?=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=9C=E0=B8=B9=E0=B9=89=E0=B8=96?= =?UTF-8?q?=E0=B8=B9=E0=B8=81=E0=B8=9E=E0=B8=B1=E0=B8=81=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=8A=E0=B8=81=E0=B8=B2=E0=B8=A3=20error=20Object=20referen?= =?UTF-8?q?ce=20not?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/DisciplineSuspendController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs index 2c50a504..46b2e7cc 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs @@ -55,7 +55,7 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers [HttpGet()] public async Task> GetDisciplineSuspend(int page = 1, int pageSize = 25, string keyword = "") { - var data_search = (from x in _context.DisciplineReport_Profiles + var data_search = (from x in _context.DisciplineReport_Profiles.Include(x => x.DisciplineDisciplinary) where (x.CitizenId == null ? false : x.CitizenId.Contains(keyword)) || (x.Prefix == null ? false : x.Prefix.Contains(keyword)) || (x.FirstName == null ? false : x.FirstName.Contains(keyword)) || From f60beb9f369d92f4dcb2bcba8e2a4cc3080f581c Mon Sep 17 00:00:00 2001 From: Kittapath Date: Tue, 16 Jan 2024 17:23:26 +0700 Subject: [PATCH 2/2] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=E0=B8=AA=E0=B8=96=E0=B8=B2=E0=B8=99=E0=B8=99=E0=B8=B0?= =?UTF-8?q?=E0=B8=A2=E0=B8=B7=E0=B9=88=E0=B8=99=E0=B8=AD=E0=B8=B8=E0=B8=98?= =?UTF-8?q?=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DisciplineComplaintController.cs | 2 +- .../DisciplineComplaint_AppealController.cs | 22 +++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs index 00efd128..10edc6ea 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs @@ -99,7 +99,7 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers public async Task> GetDisciplineComplaintReport() { var data = await _context.DisciplineComplaints - .Where(x => x.Status.Contains("SEND_INVESTIGATE")) + // .Where(x => x.Status.Contains("SEND_INVESTIGATE")) .Select(x => new { Id = x.Id,//id ข้อมูลเรื่องร้องเรียน diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs index 3df05c96..6ba1f765 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaint_AppealController.cs @@ -48,6 +48,20 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers private string? UserId => _httpContextAccessor?.HttpContext?.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value; private string? FullName => _httpContextAccessor?.HttpContext?.User?.FindFirst("name")?.Value; + private static string StatusDisciplineComplaintAppeal(string value) + { + switch (value) + { + case "NEW": return "ใหม่"; + case "RECEIVE_DOC": return "ได้รับเอกสารแล้ว"; + case "RECEIVE_APPEAL": return "รับอุทธรณ์/ร้องทุกข์"; + case "NO_RECEIVE_APPEAL": return "ไม่รับอุทธรณ์/ร้องทุกข์"; + case "DIAGNOSTIC": return "ตั้งองค์คณะวินิจฉัย"; + case "SUMMARY": return "สรุปผลการพิจารณา"; + case "DONE": return "ปิดคำร้อง"; + default: return ""; + } + } #endregion @@ -335,8 +349,8 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers } await _repositoryNoti.PushNotificationAsync( req.ProfileId, - $"เจ้าหน้าที่ได้ทำการสร้างคำร้องอุทธรณ์ร้องทุกข์ให้คุณ", - $"เจ้าหน้าที่ได้ทำการสร้างคำร้องอุทธรณ์ร้องทุกข์ให้คุณ", + $"เจ้าหน้าที่ได้ทำการสร้างคำร้องอุทธรณ์ร้องทุกข์", + $"เจ้าหน้าที่ได้ทำการสร้างคำร้องอุทธรณ์ร้องทุกข์", "", true, true @@ -517,8 +531,8 @@ namespace BMA.EHR.DisciplineComplaint_Appeal.Service.Controllers await _context.DisciplineComplaint_Appeal_Historys.AddAsync(disciplineComplaint_Appeal_History); await _repositoryNoti.PushNotificationAsync( data.ProfileId, - $"มีการแก้ไขสถานะคำขออุทธรณ์/ร้องทุกข์จาก {data.Fullname}", - $"มีการแก้ไขสถานะคำขออุทธรณ์/ร้องทุกข์จาก {data.Fullname}", + $"มีการแก้ไขสถานะคำขออุทธรณ์/ร้องทุกข์จาก {data.Fullname} เป็น {StatusDisciplineComplaintAppeal(req.Status.Trim().ToUpper())}", + $"มีการแก้ไขสถานะคำขออุทธรณ์/ร้องทุกข์จาก {data.Fullname} เป็น {StatusDisciplineComplaintAppeal(req.Status.Trim().ToUpper())}", "", true, true