Refactor LeaveProcessJobStatusRepository to filter employee records by status and ensure proper task processing
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m48s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m48s
This commit is contained in:
parent
47c0cfc62a
commit
8fa105606b
1 changed files with 3 additions and 3 deletions
|
|
@ -445,7 +445,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
|||
var apiKey = _configuration["API_KEY"];
|
||||
var body = new
|
||||
{
|
||||
records = employees
|
||||
records = employees.Where(x => x.status == "ABSENT" || x.status == "LATE").ToList()
|
||||
};
|
||||
|
||||
var apiResult = await PostExternalAPIAsync(apiPath, AccessToken ?? "", body, apiKey);
|
||||
|
|
@ -729,7 +729,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
|||
var apiKey = _configuration["API_KEY"];
|
||||
var body = new
|
||||
{
|
||||
records = employees
|
||||
records = employees.Where(x => x.status == "ABSENT" || x.status == "LATE").ToList()
|
||||
};
|
||||
|
||||
var apiResult = await PostExternalAPIAsync(apiPath, AccessToken ?? "", body, apiKey);
|
||||
|
|
@ -754,7 +754,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
|||
|
||||
// ทำงานที่ต้องการที่นี่ (เช่น เรียก API, ประมวลผลข้อมูล ฯลฯ)
|
||||
await ProcessTaskAsync(job.RootDnaId,job.StartDate, job.EndDate);
|
||||
//await ProcessEmpTaskAsync(job.RootDnaId,job.StartDate, job.EndDate);
|
||||
await ProcessEmpTaskAsync(job.RootDnaId,job.StartDate, job.EndDate);
|
||||
|
||||
// อัปเดตสถานะเป็น Completed
|
||||
await UpdateToCompletedAsync(job.Id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue