fix 获取档案失败自动发起同步任务

This commit is contained in:
2024-04-15 17:01:09 +08:00
parent 380c86aae2
commit 48bb170272
12 changed files with 87 additions and 16 deletions

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Kurisu.RemoteCall" Version="0.2.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,17 @@
using Dlhis.Scheduled.Api.Request;
using Kurisu.Core.Result;
using Kurisu.RemoteCall.Attributes;
namespace Dlhis.Scheduled.Api;
[EnableRemoteClient(Name = "hangfire-service", BaseUrl = "${InternalRequest:ScheduledRequestUrl}")]
public interface IHangfireApi
{
/// <summary>
/// 同步人员
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[Post("api/hangfire/sap/person/no")]
Task<DefaultApiResult> SyncSapPersonAsync(SapNoRequest request);
}

View File

@@ -0,0 +1,12 @@
using System.ComponentModel.DataAnnotations;
namespace Dlhis.Scheduled.Api.Request;
public class SapNoRequest
{
/// <summary>
/// Code
/// </summary>
[Required(ErrorMessage = "编号不能为空")]
public string Code { get; set; }
}