fix 获取档案失败自动发起同步任务
This commit is contained in:
13
Src/Dlhis.Scheduled.Api/Dlhis.Scheduled.Api.csproj
Normal file
13
Src/Dlhis.Scheduled.Api/Dlhis.Scheduled.Api.csproj
Normal 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>
|
||||
17
Src/Dlhis.Scheduled.Api/IHangfireApi.cs
Normal file
17
Src/Dlhis.Scheduled.Api/IHangfireApi.cs
Normal 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);
|
||||
}
|
||||
12
Src/Dlhis.Scheduled.Api/Request/SapNoRequest.cs
Normal file
12
Src/Dlhis.Scheduled.Api/Request/SapNoRequest.cs
Normal 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; }
|
||||
}
|
||||
Reference in New Issue
Block a user