update remotecall and feat outsource自动离职
This commit is contained in:
25
Src/Dlhis.ScheduledTask/Jobs/OutsourceAutoResignJob.cs
Normal file
25
Src/Dlhis.ScheduledTask/Jobs/OutsourceAutoResignJob.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -22,20 +22,4 @@ public class Startup : DefaultStartup
|
||||
base.ConfigureServices(services);
|
||||
services.AddRedis();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
base.Configure(app, env);
|
||||
|
||||
var a = app.ApplicationServices.GetService<IJinkoJipApi>().SyncMealSupplementRecordsAsync(new List<SyncMealSupplementRecordRequest>()
|
||||
{
|
||||
new SyncMealSupplementRecordRequest
|
||||
{
|
||||
UniqueId = null,
|
||||
Status = null,
|
||||
Msg = null
|
||||
}
|
||||
}).GetAwaiter().GetResult();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user