25 lines
698 B
C#
25 lines
698 B
C#
using Dlhis.Basic.Api;
|
|
using Dlhis.ScheduledTask.Attributes;
|
|
|
|
namespace Dlhis.ScheduledTask.Jobs;
|
|
|
|
/// <summary>
|
|
/// 自动处理外包离职
|
|
/// </summary>
|
|
[RecurringJob(nameof(OutsourceAutoResignJob), "0 0 1 1/1 * ? ", Name = "自动处理外包离职")]
|
|
public class OutsourceAutoResignJob : BaseJob
|
|
{
|
|
private readonly IGainfoApi _gainfoApi;
|
|
|
|
/// <inheritdoc />
|
|
public OutsourceAutoResignJob(IServiceProvider serviceProvider, IGainfoApi gainfoApi) : base(serviceProvider)
|
|
{
|
|
_gainfoApi = gainfoApi;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override async Task RunAsync(IServiceProvider serviceProvider)
|
|
{
|
|
await _gainfoApi.OutsourceAutoResignAsync();
|
|
}
|
|
} |