| | |
| | | // 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> |
| | | { |
| | |
| | | { |
| | | //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"字符串 |
| | |
| | | //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()) |
| | | { |
| | |
| | | { |
| | | _httpClient?.Dispose(); |
| | | } |
| | | } |
| | | } |