fix 处理上传照片url问题
This commit is contained in:
@@ -9,6 +9,7 @@ using Dlhis.Entity.Device.Enums;
|
||||
using Dlhis.InfoCheck.Api;
|
||||
using Dlhis.InfoCheck.Api.Requests;
|
||||
using Dlhis.Jip.Api;
|
||||
using Dlhis.Jip.Api.Requests;
|
||||
using Kurisu.AspNetCore.Authentication.Abstractions;
|
||||
using Kurisu.AspNetCore.CustomClass;
|
||||
using Kurisu.AspNetCore.DataAccess.Extensions;
|
||||
@@ -230,7 +231,12 @@ public class GainfoFaceService : IGainfoFaceService
|
||||
|
||||
try
|
||||
{
|
||||
var r = await _jinkoJipApi.SyncFaceToSapAsync(face.UserCode, face.Face);
|
||||
var r = await _jinkoJipApi.SyncFaceToSapAsync(new SyncFaceRequest
|
||||
{
|
||||
UserCode = face.UserCode,
|
||||
Base64 = face.Face
|
||||
});
|
||||
|
||||
if (r.OLX == "S")
|
||||
{
|
||||
await _faceDbContext.Updateable<GainfoFaceEntity>()
|
||||
|
||||
@@ -82,6 +82,6 @@ public interface IJinkoJipApi
|
||||
/// <param name="base64"></param>
|
||||
/// <returns></returns>
|
||||
[Post("/JIP/HCM/HCM_I_PHOTO")]
|
||||
[RequestContentHandler(typeof(SyncFaceContentHandler))]
|
||||
Task<SapFaceSyncResponse> SyncFaceToSapAsync(string userCode, string base64);
|
||||
//[RequestContentHandler(typeof(SyncFaceContentHandler))]
|
||||
Task<SapFaceSyncResponse> SyncFaceToSapAsync(SyncFaceRequest request);
|
||||
}
|
||||
12
Src/Dlhis.Jip.Api/Requests/SyncFaceRequest.cs
Normal file
12
Src/Dlhis.Jip.Api/Requests/SyncFaceRequest.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Dlhis.Jip.Api.Requests;
|
||||
|
||||
public class SyncFaceRequest
|
||||
{
|
||||
[JsonProperty("I_WORKCODE")]
|
||||
public string UserCode { get; set; }
|
||||
|
||||
[JsonProperty("I_PHOTO_STR")]
|
||||
public string Base64 { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user