refactor 优化代码
This commit is contained in:
86
Src/Dlhis.Jip.Api/IJinkoJipApi.cs
Normal file
86
Src/Dlhis.Jip.Api/IJinkoJipApi.cs
Normal file
@@ -0,0 +1,86 @@
|
||||
using Dlhis.Jip.Api.ClientHandlers;
|
||||
using Dlhis.Jip.Api.Request;
|
||||
using Dlhis.Jip.Api.RequestContentHandlers;
|
||||
using Dlhis.Jip.Api.Requests;
|
||||
using Dlhis.Jip.Api.Responses;
|
||||
using Dlhis.Jip.Api.ResultHandlers;
|
||||
using Kurisu.RemoteCall.Attributes;
|
||||
|
||||
namespace Dlhis.Jip.Api;
|
||||
|
||||
/// <summary>
|
||||
/// jinko-jip api https://jip.jinkosolar.com
|
||||
/// </summary>
|
||||
[Auth(TokenHandler = typeof(JipTokenHandler))]
|
||||
[EnableRemoteClient(Name = "jip-service", BaseUrl = "${JinkoOptions:Jip:BaseUrl}", PolicyHandler = typeof(JipClientHandler))]
|
||||
public interface IJinkoJipApi
|
||||
{
|
||||
/// <summary>
|
||||
/// 上传考勤记录
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[Post("/JIP/HCM/HCM_SWIPE_DATA_SAVE")]
|
||||
Task<UploadAttendanceResponse> UploadAttendancesAsync(UploadAttendanceRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// 获取出差信息
|
||||
/// </summary>
|
||||
/// <param name="factory">厂区</param>
|
||||
/// <param name="start">开始时间</param>
|
||||
/// <param name="end">结束时间</param>
|
||||
/// <code>
|
||||
/// var obj = new
|
||||
/// {
|
||||
/// I_PAGE = 1,
|
||||
/// I_LINE = 500,
|
||||
/// IV_BEGDA = beginDay,
|
||||
/// IV_ENDDA = endDay,
|
||||
/// IT_CCMDD = new List{object}
|
||||
/// {
|
||||
/// new
|
||||
/// {
|
||||
/// IV_CCMDD = factory
|
||||
/// }
|
||||
/// }
|
||||
/// }
|
||||
/// </code>
|
||||
/// <code>
|
||||
///var obj = new
|
||||
///{
|
||||
/// IV_BEGDA = beginDay,
|
||||
/// IV_ENDDA = endDay,
|
||||
/// IT_2002GH = new List{object}
|
||||
/// {
|
||||
/// new
|
||||
/// {
|
||||
/// IV_GONGH = userCode
|
||||
/// }
|
||||
/// }
|
||||
///};
|
||||
/// </code>
|
||||
/// <returns></returns>
|
||||
[Post("/JIP/HCM/HCM_TRAVELINFO")]
|
||||
[RequestContentHandler(typeof(BusinessTripContentHandler))]
|
||||
Task<SapBusinessTripInfoResponse> GetBusinessTripInfosByFactoryAsync(string factory, DateTime start, DateTime end);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 同步餐补状态
|
||||
/// </summary>
|
||||
/// <param name="requests"></param>
|
||||
/// <returns></returns>
|
||||
[Post("/JIP/DHR/DHR_DL_CALLBACK")]
|
||||
[RequestResultHandler(typeof(DHRResultHandler))]
|
||||
Task<string> SyncMealSupplementRecordsAsync(List<SyncMealSupplementRecordRequest> requests);
|
||||
|
||||
/// <summary>
|
||||
/// 同步照片到sap
|
||||
/// </summary>
|
||||
/// <param name="userCode"></param>
|
||||
/// <param name="base64"></param>
|
||||
/// <returns></returns>
|
||||
[Post("/JIP/HCM/HCM_I_PHOTO")]
|
||||
[RequestContentHandler(typeof(SyncFaceContentHandler))]
|
||||
Task<SapFaceSyncResponse> SyncFaceToSapAsync(string userCode, string base64);
|
||||
}
|
||||
Reference in New Issue
Block a user