Compare commits

..

No commits in common. "43740ec9b28a93d56d7c000888b3dec2e9bdd178" and "0cb199d0ee298df6b0aa977eeaebafe26d9fbd9c" have entirely different histories.

5 changed files with 9 additions and 7 deletions

View file

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

View file

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

View file

@ -6,9 +6,7 @@ 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,6 +315,8 @@ 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;
}
}
}
@ -326,6 +328,7 @@ namespace BMA.EHR.Leave.Service.Controllers
if (doc != null)
{
leaveRequest.LeaveDraftDocument = doc;
_context.Entry(leaveRequest.LeaveDraftDocument).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
}
}

View file

@ -225,7 +225,12 @@ 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