update remotecall and feat outsource自动离职

This commit is contained in:
2024-11-27 16:50:39 +08:00
parent e67351d2fa
commit 284437c6a6
16 changed files with 166 additions and 32 deletions

View 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();
}
}

View File

@@ -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();
}
}