From ef5ec7dd8571266ba1a2cf3546be4481fe7d57ce Mon Sep 17 00:00:00 2001 From: Suphonchai Phoonsawat Date: Fri, 13 Dec 2024 13:43:59 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=9A=E0=B8=B1?= =?UTF-8?q?=E0=B9=89=E0=B8=81=20check-time=20=E0=B9=83=E0=B8=99=E0=B8=81?= =?UTF-8?q?=E0=B8=A3=E0=B8=93=E0=B8=B5=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=A5?= =?UTF-8?q?=E0=B8=87=E0=B9=80=E0=B8=A7=E0=B8=A5=E0=B8=B2=E0=B9=80=E0=B8=82?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B9=81=E0=B8=A5=E0=B8=B0=E0=B8=AD=E0=B8=AD?= =?UTF-8?q?=E0=B8=81=E0=B9=83=E0=B8=99=E0=B8=A7=E0=B8=B1=E0=B8=99=E0=B8=9B?= =?UTF-8?q?=E0=B8=B1=E0=B8=88=E0=B8=88=E0=B8=B8=E0=B8=9A=E0=B8=B1=E0=B8=99?= =?UTF-8?q?=E0=B9=80=E0=B8=A3=E0=B8=B5=E0=B8=A2=E0=B8=9A=E0=B8=A3=E0=B9=89?= =?UTF-8?q?=E0=B8=AD=E0=B8=A2=E0=B9=81=E0=B8=A5=E0=B9=89=E0=B8=A7=20?= =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B8=9A=E0=B8=9A=E0=B9=81=E0=B8=AA=E0=B8=94?= =?UTF-8?q?=E0=B8=87=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5?= =?UTF-8?q?=E0=B9=84=E0=B8=A1=E0=B9=88=E0=B8=96=E0=B8=B9=E0=B8=81=E0=B8=95?= =?UTF-8?q?=E0=B9=89=E0=B8=AD=E0=B8=87=E0=B8=97=E0=B8=B3=E0=B9=83=E0=B8=AB?= =?UTF-8?q?=E0=B9=89=E0=B8=9E=E0=B8=A3=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=A5?= =?UTF-8?q?=E0=B8=87=E0=B9=80=E0=B8=A7=E0=B8=A5=E0=B8=B2=E0=B9=83=E0=B8=99?= =?UTF-8?q?=E0=B8=A7=E0=B8=B1=E0=B8=99=E0=B9=80=E0=B8=94=E0=B8=B5=E0=B8=A2?= =?UTF-8?q?=E0=B8=A7=E0=B8=81=E0=B8=B1=E0=B8=99=E0=B8=AD=E0=B8=B5=E0=B8=81?= =?UTF-8?q?=E0=B8=84=E0=B8=A3=E0=B8=B1=E0=B9=89=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BMA.EHR.Leave/Controllers/LeaveController.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/BMA.EHR.Leave/Controllers/LeaveController.cs b/BMA.EHR.Leave/Controllers/LeaveController.cs index a4154325..9ff701d5 100644 --- a/BMA.EHR.Leave/Controllers/LeaveController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveController.cs @@ -425,8 +425,16 @@ namespace BMA.EHR.Leave.Service.Controllers } else { + // ถ้า check-in + check-out ไปแล้ว + if (data.CheckIn.Date == DateTime.Now.Date) + { + return Error("คุณได้ทำการลงเวลาเข้าและออกเรียบร้อยแล้ว คุณจะสามารถลงเวลาได้อีกครั้งในวันถัดไป"); + } + if (data.CheckOut != null) { + + ret = new CheckInResultDto { StartTimeMorning = duty == null ? "00:00" : duty.StartTimeMorning,