cronjob + ลงเวลากรณีพิเดศษ
This commit is contained in:
parent
72f64728bb
commit
e76d994098
16 changed files with 1518 additions and 9 deletions
|
|
@ -56,6 +56,26 @@ namespace BMA.EHR.Application.Repositories.Leaves.TimeAttendants
|
|||
|
||||
#region " Methods "
|
||||
|
||||
public void UpdateUserDutyTime()
|
||||
{
|
||||
try
|
||||
{
|
||||
var data = _dbContext.Set<UserDutyTime>()
|
||||
.Where(u => !u.IsProcess)
|
||||
.Where(u => u.EffectiveDate.Value.Date <= DateTime.Now.Date)
|
||||
.ToList();
|
||||
|
||||
foreach (var d in data)
|
||||
{
|
||||
var result = _userProfileRepository.UpdateDutyTimeAsync(d.ProfileId, d.DutyTimeId, d.EffectiveDate.Value.Date).Result;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<List<UserDutyTime>> GetListByProfileIdAsync(Guid profileId)
|
||||
{
|
||||
var data = await _dbContext.Set<UserDutyTime>().AsQueryable()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue