diff --git a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/CheckInJobStatusRepository.cs b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/CheckInJobStatusRepository.cs index 902dcf64..0442f557 100644 --- a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/CheckInJobStatusRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/CheckInJobStatusRepository.cs @@ -124,6 +124,8 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants } return job!; } + + /// /// ดึงข้อมูลงานที่ค้างอยู่ในสถานะ PENDING หรือ PROCESSING เกินเวลาที่กำหนด (นาที) diff --git a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/LeaveProcessJobStatusRepository.cs b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/LeaveProcessJobStatusRepository.cs index 5e9944ad..50e4fc80 100644 --- a/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/LeaveProcessJobStatusRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/TimeAttendants/LeaveProcessJobStatusRepository.cs @@ -123,6 +123,8 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants return data; } + + /// /// อัปเดตสถานะเป็น Processing diff --git a/BMA.EHR.Domain/Models/Leave/Requests/LeaveDocument.cs b/BMA.EHR.Domain/Models/Leave/Requests/LeaveDocument.cs index 807d6683..06f6bdc0 100644 --- a/BMA.EHR.Domain/Models/Leave/Requests/LeaveDocument.cs +++ b/BMA.EHR.Domain/Models/Leave/Requests/LeaveDocument.cs @@ -6,7 +6,9 @@ namespace BMA.EHR.Domain.Models.Leave.Requests public class LeaveDocument : EntityBase { public Document Document { get; set; } + public Guid DocumentId { get; set; } public LeaveRequest LeaveRequest { get; set; } + public Guid LeaveRequestId { get; set; } } } \ No newline at end of file diff --git a/BMA.EHR.Leave/Controllers/LeaveRequestController.cs b/BMA.EHR.Leave/Controllers/LeaveRequestController.cs index 8cfd6a34..3f34c70e 100644 --- a/BMA.EHR.Leave/Controllers/LeaveRequestController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveRequestController.cs @@ -315,8 +315,6 @@ namespace BMA.EHR.Leave.Service.Controllers if (doc != null) { leaveRequest.LeaveDocument.Add(new LeaveDocument { Document = doc }); - var a = leaveRequest.LeaveDocument.Last(); - _context.Entry(a).State = Microsoft.EntityFrameworkCore.EntityState.Modified; } } } @@ -328,7 +326,6 @@ namespace BMA.EHR.Leave.Service.Controllers if (doc != null) { leaveRequest.LeaveDraftDocument = doc; - _context.Entry(leaveRequest.LeaveDraftDocument).State = Microsoft.EntityFrameworkCore.EntityState.Modified; } } diff --git a/BMA.EHR.Leave/Program.cs b/BMA.EHR.Leave/Program.cs index 5a396430..8de0c0de 100644 --- a/BMA.EHR.Leave/Program.cs +++ b/BMA.EHR.Leave/Program.cs @@ -225,12 +225,7 @@ if (manager != null) // QueueName = "leave" // }); // - // manager.AddOrUpdate("ประมวลผลงานที่ค้างอยู่ในสถานะ Pending หรือ Processing", Job.FromExpression(x => x.ProcessPendingJobsAsync()), "0 3 * * *", - // new RecurringJobOptions - // { - // TimeZone = bangkokTimeZone, - // QueueName = "leave" // ← กำหนด queue - // }); + } // apply migrations