tjx
2025-10-17 266afcd9d3b53e97b9a81e61efd095bbdbc8de9e
service/QC/OaApi.cs
@@ -1,24 +1,17 @@
// OaApiService.cs
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Data.SqlClient;
using System.Data;
using System.IO;
using System.Net.Http;
using System.Data.SqlClient;
using System.Dynamic;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using NewPdaSqlServer.entity.Base;
using NewPdaSqlServer.DB;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.Security;
using NewPdaSqlServer.DB;
using SqlSugar;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
using NewPdaSqlServer.entity;
using System.Linq;
namespace NewPdaSqlServer.service.QC;
public class OaApiService : Repository<dynamic>
{
@@ -428,7 +421,7 @@
            {
                //new JObject { ["fieldName"] = "xh", ["fieldValue"] = record.xh?.ToString() ?? "" },
                new JObject { ["fieldName"] = "jydh", ["fieldValue"] = record.jydh?.ToString() ?? "" },
                 new JObject { ["fieldName"] = "jyr", ["fieldValue"] = record.jyr?.ToString() ?? "" },
                new JObject { ["fieldName"] = "jyr", ["fieldValue"] = record.jyr?.ToString() ?? "" },
                new JObject { 
                    ["fieldName"] = "jydrq", 
                    // 格式化为"yyyy-MM-dd"字符串
@@ -503,8 +496,8 @@
        //return Convert.ToBase64String(encrypted);
        RsaKeyParameters publicKeyParam = (RsaKeyParameters)PublicKeyFactory.CreateKey(Convert.FromBase64String(publicKey));
        string XML = string.Format("<RSAKeyValue><Modulus>{0}</Modulus><Exponent>{1}</Exponent></RSAKeyValue>",
        Convert.ToBase64String(publicKeyParam.Modulus.ToByteArrayUnsigned()),
        Convert.ToBase64String(publicKeyParam.Exponent.ToByteArrayUnsigned()));
            Convert.ToBase64String(publicKeyParam.Modulus.ToByteArrayUnsigned()),
            Convert.ToBase64String(publicKeyParam.Exponent.ToByteArrayUnsigned()));
        string encryptedContent = string.Empty;
        using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider())
        {
@@ -549,4 +542,4 @@
    {
        _httpClient?.Dispose();
    }
}
}