refactor 移除无效代码,增加注释
This commit is contained in:
@@ -2,6 +2,9 @@ using Kurisu.AspNetCore.DataAccess.SqlSugar.Attributes;
|
|||||||
|
|
||||||
namespace Dlhis.DataPermission.Model;
|
namespace Dlhis.DataPermission.Model;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 定义字段为设备码权限字段
|
||||||
|
/// </summary>
|
||||||
[AttributeUsage(AttributeTargets.Property)]
|
[AttributeUsage(AttributeTargets.Property)]
|
||||||
public class DeviceCodeAttribute : BaseDataPermissionAttribute
|
public class DeviceCodeAttribute : BaseDataPermissionAttribute
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ using Kurisu.AspNetCore.DataAccess.SqlSugar.Attributes;
|
|||||||
|
|
||||||
namespace Dlhis.DataPermission.Model;
|
namespace Dlhis.DataPermission.Model;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 定义字段为设备组码权限字段
|
||||||
|
/// </summary>
|
||||||
[AttributeUsage(AttributeTargets.Property)]
|
[AttributeUsage(AttributeTargets.Property)]
|
||||||
public class DeviceGroupCodeAttribute : BaseDataPermissionAttribute
|
public class DeviceGroupCodeAttribute : BaseDataPermissionAttribute
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ using Kurisu.AspNetCore.DataAccess.SqlSugar.Attributes;
|
|||||||
|
|
||||||
namespace Dlhis.DataPermission.Model;
|
namespace Dlhis.DataPermission.Model;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 定义字段为用户组码权限字段
|
||||||
|
/// </summary>
|
||||||
[AttributeUsage(AttributeTargets.Property)]
|
[AttributeUsage(AttributeTargets.Property)]
|
||||||
public class UserGroupCodeAttribute : BaseDataPermissionAttribute
|
public class UserGroupCodeAttribute : BaseDataPermissionAttribute
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Dlhis.Jip.Api.ClientHandlers;
|
using Dlhis.Jip.Api.ClientHandlers;
|
||||||
using Dlhis.Jip.Api.Request;
|
|
||||||
using Dlhis.Jip.Api.RequestContentHandlers;
|
using Dlhis.Jip.Api.RequestContentHandlers;
|
||||||
using Dlhis.Jip.Api.Requests;
|
using Dlhis.Jip.Api.Requests;
|
||||||
using Dlhis.Jip.Api.Responses;
|
using Dlhis.Jip.Api.Responses;
|
||||||
@@ -78,10 +77,8 @@ public interface IJinkoJipApi
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 同步照片到sap
|
/// 同步照片到sap
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="userCode"></param>
|
/// <param name="request"></param>
|
||||||
/// <param name="base64"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[Post("/JIP/HCM/HCM_I_PHOTO")]
|
[Post("/JIP/HCM/HCM_I_PHOTO")]
|
||||||
//[RequestContentHandler(typeof(SyncFaceContentHandler))]
|
|
||||||
Task<SapFaceSyncResponse> SyncFaceToSapAsync(SyncFaceRequest request);
|
Task<SapFaceSyncResponse> SyncFaceToSapAsync(SyncFaceRequest request);
|
||||||
}
|
}
|
||||||
@@ -8,13 +8,12 @@ namespace Dlhis.Jip.Api.ResultHandlers;
|
|||||||
|
|
||||||
public class DHRResultHandler : IRemoteCallResultHandler
|
public class DHRResultHandler : IRemoteCallResultHandler
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
|
||||||
public TResult Handle<TResult>(HttpStatusCode statusCode, string responseBody)
|
public TResult Handle<TResult>(HttpStatusCode statusCode, string responseBody)
|
||||||
{
|
{
|
||||||
var apiResult = JsonConvert.DeserializeObject<DHRResponse<object>>(responseBody);
|
var apiResult = JsonConvert.DeserializeObject<DHRResponse<object>>(responseBody);
|
||||||
|
|
||||||
var isSuccessStatusCode = ((int)statusCode >= 200) && ((int)statusCode <= 299);
|
var isSuccessStatusCode = ((int)statusCode >= 200) && ((int)statusCode <= 299);
|
||||||
if (!isSuccessStatusCode || apiResult.Code != 200)
|
if (!isSuccessStatusCode || apiResult?.Code != 200)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(apiResult?.Message))
|
if (!string.IsNullOrEmpty(apiResult?.Message))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user