fix 同步人员回复

This commit is contained in:
2024-11-28 14:33:15 +08:00
parent 2e6e334b23
commit 2004035d9b
2 changed files with 10 additions and 8 deletions

View File

@@ -1,5 +1,7 @@
using Dlhis.Entity.Basic.Entity;
using Dlhis.Basic.Api;
using Dlhis.Entity.Basic.Entity;
using Dlhis.ScheduledTask.Attributes;
using Hangfire;
using Kurisu.AspNetCore.Utils.Extensions;
namespace Dlhis.ScheduledTask.Jobs;
@@ -27,10 +29,9 @@ public class SyncPersonJob : BaseJob
continue;
}
//todo
// var jobKey = BackgroundJob.Enqueue<IGainfoUpdateService>(x => x.TodoByWerkAsync(werk.Werk));
// werk.BackgroundJobKey = jobKey;
// await DbContext.UpdateAsync(werk);
var jobKey = BackgroundJob.Enqueue<ISyncApi>(x => x.SyncGainfoByWerkAsync(werk.Werk));
werk.BackgroundJobKey = jobKey;
await DbContext.UpdateAsync(werk);
Logger.LogInformation("SAP创建人事范围{werk}后台调度任务", werk.Werk);
}