fix 调整为face appid

This commit is contained in:
2025-03-10 17:24:43 +08:00
parent e8b1f8bd3a
commit a2bad07677
4 changed files with 19 additions and 10 deletions

View File

@@ -8,6 +8,9 @@ namespace Dlhis.Basic.Common.Message;
public class JinkoApiService : IJinkoApiService
{
private readonly IHttpClientFactory _httpClientFactory;
private const string _agentId = "2984453842";
private const string _appKey = "dingppvj6wvtgbagwpsw";
private const string _appSecret = "k9mxYwilZgQiuhV_RVYRueoIAWHCQWrUdhbj6DAmiEiqMzSQE4igt0kAj97rmLaS";
public JinkoApiService(IHttpClientFactory httpClientFactory)
{
@@ -23,10 +26,10 @@ public class JinkoApiService : IJinkoApiService
var form = new FormUrlEncodedContent(new Dictionary<string, string>
{
{ "appkey", "dingumelppews6rah7x9" },
{ "appsecret", "nsWfJTVjYesHVzrLiP-t1TQqMQvC1L_kZNfXfnIyzcXK4pCTfKprkjZcxAbsDR_l" }
{ "appkey", _appKey },
{ "appsecret", _appSecret }
});
//appkey=dingumelppews6rah7x9&appsecret=nsWfJTVjYesHVzrLiP-t1TQqMQvC1L_kZNfXfnIyzcXK4pCTfKprkjZcxAbsDR_l
var response = await httpClient.GetStringAsync($"/gettoken?{await form.ReadAsStringAsync()}");
var jObj = JObject.Parse(response);
@@ -50,7 +53,7 @@ public class JinkoApiService : IJinkoApiService
var body = new
{
agent_id = "2768073678",
agent_id = _agentId,
userid_list = userStringIds,
msg = new
{

View File

@@ -296,13 +296,13 @@ public class GainfoFaceService : IGainfoFaceService
face = new GainfoFaceEntity
{
UserCode = gainfo.Code,
Face = request.Face
Face = request.Face,
CreatedBy = _currentUser.GetIntSubjectId(),
CreateTime = DateTime.Now,
ModifiedBy = _currentUser.GetIntSubjectId(),
ModifiedTime = DateTime.Now
};
face.CreatedBy = _currentUser.GetIntSubjectId();
face.CreateTime = DateTime.Now;
face.ModifiedBy = _currentUser.GetIntSubjectId();
face.ModifiedTime = DateTime.Now;
await _faceDbContext.InsertAsync(face);
}
else

View File

@@ -19,6 +19,11 @@ public class WorkGridUserPageResponse
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 员工数
/// </summary>
public int UserCount { get; set; }
/// <summary>
/// 员工明细
/// </summary>
@@ -36,7 +41,7 @@ public class WorkGridUserPageDetailResponse
/// 人员姓名
/// </summary>
public string Name { get; set; }
/// <summary>
/// 最大连续排班信息
/// </summary>

View File

@@ -186,6 +186,7 @@ public class WorkGridService : IWorkGridService
if (myWorkGrid != null)
{
myWorkGrid.UserCount = await _dbContext.Queryable<WorkGridUserEntity>().Where(x => x.WorkGridCode == myWorkGrid.Code).CountAsync();
myWorkGrid.UserInfos = await _dbContext.Queryable<WorkGridUserEntity>()
.LeftJoin<GainfoEntity>((x, ga) => x.UserCode == ga.Code)
.Where((x, ga) => x.WorkGridCode == myWorkGrid.Code)