feat 出差人员筛选,移除无用代码

This commit is contained in:
2024-07-04 17:53:53 +08:00
parent 218027ffd4
commit cae9035e4a
12 changed files with 52 additions and 104 deletions

View File

@@ -24,14 +24,16 @@ public class SyncPersonJob : BaseJob
foreach (var werk in werks)
{
if (werk.BackgroundJobKey.IsEmpty())
if (!werk.BackgroundJobKey.IsEmpty())
{
var jobKey = BackgroundJob.Enqueue<IGainfoUpdateService>(x => x.TodoByWerkAsync(werk.Werk));
werk.BackgroundJobKey = jobKey;
await DbContext.UpdateAsync(werk);
Logger.LogInformation("SAP创建人事范围{werk}后台调度任务", werk.Werk);
continue;
}
var jobKey = BackgroundJob.Enqueue<IGainfoUpdateService>(x => x.TodoByWerkAsync(werk.Werk));
werk.BackgroundJobKey = jobKey;
await DbContext.UpdateAsync(werk);
Logger.LogInformation("SAP创建人事范围{werk}后台调度任务", werk.Werk);
}
}
}