feat 接入海宁餐补api
This commit is contained in:
@@ -37,6 +37,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{48
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dlhis.External", "Src\Dlhis.External\Dlhis.External.csproj", "{8472596E-0DE7-4A17-93D6-F0FC7D44FDF5}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dlhis.External", "Src\Dlhis.External\Dlhis.External.csproj", "{8472596E-0DE7-4A17-93D6-F0FC7D44FDF5}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dlhis.Canteen.Api", "Src\Dlhis.Canteen.Api\Dlhis.Canteen.Api.csproj", "{961523DE-51BF-42A0-A294-708752C5718D}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -91,6 +93,10 @@ Global
|
|||||||
{8472596E-0DE7-4A17-93D6-F0FC7D44FDF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{8472596E-0DE7-4A17-93D6-F0FC7D44FDF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{8472596E-0DE7-4A17-93D6-F0FC7D44FDF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{8472596E-0DE7-4A17-93D6-F0FC7D44FDF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{8472596E-0DE7-4A17-93D6-F0FC7D44FDF5}.Release|Any CPU.Build.0 = Release|Any CPU
|
{8472596E-0DE7-4A17-93D6-F0FC7D44FDF5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{961523DE-51BF-42A0-A294-708752C5718D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{961523DE-51BF-42A0-A294-708752C5718D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{961523DE-51BF-42A0-A294-708752C5718D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{961523DE-51BF-42A0-A294-708752C5718D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -106,6 +112,7 @@ Global
|
|||||||
{85A345C7-913E-4C1B-BE1C-600DE408A02F} = {57074FD8-1A2F-40C7-8476-001778A3F65D}
|
{85A345C7-913E-4C1B-BE1C-600DE408A02F} = {57074FD8-1A2F-40C7-8476-001778A3F65D}
|
||||||
{1F337648-8A22-4601-A842-0F634FBA2825} = {4EBCE46B-CE3A-4A47-9432-82A1854CA58A}
|
{1F337648-8A22-4601-A842-0F634FBA2825} = {4EBCE46B-CE3A-4A47-9432-82A1854CA58A}
|
||||||
{8472596E-0DE7-4A17-93D6-F0FC7D44FDF5} = {489252FB-A44B-46EE-B065-21CDCB724441}
|
{8472596E-0DE7-4A17-93D6-F0FC7D44FDF5} = {489252FB-A44B-46EE-B065-21CDCB724441}
|
||||||
|
{961523DE-51BF-42A0-A294-708752C5718D} = {3D8A98C1-83C9-4375-AEAB-4F72AFAF365B}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {7439494A-E2FD-4FEA-8ABF-74AE57A4A5A0}
|
SolutionGuid = {7439494A-E2FD-4FEA-8ABF-74AE57A4A5A0}
|
||||||
|
|||||||
13
Src/Dlhis.Canteen.Api/Dlhis.Canteen.Api.csproj
Normal file
13
Src/Dlhis.Canteen.Api/Dlhis.Canteen.Api.csproj
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Kurisu.RemoteCall" Version="0.1.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
20
Src/Dlhis.Canteen.Api/IHainingMealSupplementApi.cs
Normal file
20
Src/Dlhis.Canteen.Api/IHainingMealSupplementApi.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using Dlhis.Canteen.Api.Request;
|
||||||
|
using Dlhis.Canteen.Api.Response;
|
||||||
|
using Kurisu.RemoteCall.Attributes;
|
||||||
|
|
||||||
|
namespace Dlhis.Canteen.Api;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 海宁餐补API
|
||||||
|
/// </summary>
|
||||||
|
[EnableRemoteClient(Name = "haining-service", BaseUrl = "http://172.19.0.10:8090")]
|
||||||
|
public interface IHainingMealSupplementApi
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 餐补写入
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[Post("/api/canteen/InputCredit")]
|
||||||
|
Task<HainingResponse<object>> AddMealSupplementAsync(AddHainingMealSupplementRequest request);
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Dlhis.Canteen.Api.Request;
|
||||||
|
|
||||||
|
public class AddHainingMealSupplementRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 流水号
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
[JsonProperty("orderNo")]
|
||||||
|
public string UniqueId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 工号
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
[JsonProperty("ename")]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 餐补金额
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("credit")]
|
||||||
|
public decimal Amount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 考勤日期
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
[JsonProperty("sysdate")]
|
||||||
|
public DateTime Date { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("payRef")]
|
||||||
|
public string Remark { get; set; }
|
||||||
|
}
|
||||||
10
Src/Dlhis.Canteen.Api/Response/HainingResponse.cs
Normal file
10
Src/Dlhis.Canteen.Api/Response/HainingResponse.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
namespace Dlhis.Canteen.Api.Response;
|
||||||
|
|
||||||
|
public class HainingResponse<T>
|
||||||
|
{
|
||||||
|
public int Code { get; set; }
|
||||||
|
|
||||||
|
public string Message { get; set; }
|
||||||
|
|
||||||
|
public T Data { get; set; }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user