Compare commits

..

2 commits

Author SHA1 Message Date
Suphonchai Phoonsawat
43740ec9b2 fix #2591
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m46s
2026-07-06 12:27:52 +07:00
Suphonchai Phoonsawat
def3992d44 fix 2026-07-03 22:19:18 +07:00
5 changed files with 7 additions and 9 deletions

View file

@ -124,6 +124,8 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
}
return job!;
}
/// <summary>
/// ดึงข้อมูลงานที่ค้างอยู่ในสถานะ PENDING หรือ PROCESSING เกินเวลาที่กำหนด (นาที)

View file

@ -123,6 +123,8 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
return data;
}
/// <summary>
/// อัปเดตสถานะเป็น Processing

View file

@ -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; }
}
}

View file

@ -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;
}
}

View file

@ -225,12 +225,7 @@ if (manager != null)
// QueueName = "leave"
// });
//
// manager.AddOrUpdate("ประมวลผลงานที่ค้างอยู่ในสถานะ Pending หรือ Processing", Job.FromExpression<LeaveProcessJobStatusRepository>(x => x.ProcessPendingJobsAsync()), "0 3 * * *",
// new RecurringJobOptions
// {
// TimeZone = bangkokTimeZone,
// QueueName = "leave" // ← กำหนด queue
// });
}
// apply migrations