This commit is contained in:
PastSaid
2024-12-05 15:39:19 +08:00
parent 5472714e30
commit 9725ab5376
128 changed files with 46381 additions and 69 deletions

View File

@@ -57,6 +57,7 @@
<Content Include="sql\发票打印信息清空.sql" />
<Content Include="sql\多组织即时库存查询.sql" />
<Content Include="sql\将excel表格查询出来.sql" />
<Content Include="sql\批号来源.sql" />
<Content Include="sql\拆分字段值.sql" />
<Content Include="sql\拼接表字段为查询语句.sql" />
<Content Include="sql\未分类\如然_更新平台单号2_202406251007.sql" />

View File

@@ -4,4 +4,5 @@ SELECT * FROM T_SEC_SIMPLEPASSPORT
---------<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>T_BAS_USERPARAMETER
--select * into T_BAS_USERPARAMETER_bak20211111 from T_BAS_USERPARAMETER;
---------<EFBFBD>ڶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
--delete T_BAS_USERPARAMETER where FPARAMETEROBJID='SEC_CHECKIDENTITY';
--delete T_BAS_USERPARAMETER where FPARAMETEROBJID='SEC_CHECKIDENTITY';
SELECT * FROM T_BAS_USERPARAMETER where FPARAMETEROBJID='SEC_CHECKIDENTITY';

View File

@@ -0,0 +1,70 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
namespace K3CExttensionMethods
{
public class HttpClient
{
/// <summary>
/// Seivice URL
/// </summary>
public string Url { get; set; }
/// <summary>
/// 内容
/// </summary>
public string Content { get; set; }
/// <summary>
/// Cookie保证登录后所有访问持有一个Cookie
/// </summary>
static CookieContainer Cookie = new CookieContainer();
/// <summary>
/// HTTP访问
/// </summary>
public string AsyncRequest()
{
HttpWebRequest httpRequest = HttpWebRequest.Create(Url) as HttpWebRequest;
httpRequest.Method = "POST";
httpRequest.ContentType = "application/json";
httpRequest.CookieContainer = Cookie;
httpRequest.Timeout = 1000 * 60 * 10;//10min
using (Stream reqStream = httpRequest.GetRequestStream())
{
JObject jObj = new JObject();
jObj.Add("format", 1);
jObj.Add("useragent", "ApiClient");
jObj.Add("rid", Guid.NewGuid().ToString().GetHashCode().ToString());
jObj.Add("parameters", Content);
jObj.Add("timestamp", DateTime.Now);
jObj.Add("v", "1.0");
string sContent = jObj.ToString();
var bytes = UnicodeEncoding.UTF8.GetBytes(sContent);
reqStream.Write(bytes, 0, bytes.Length);
reqStream.Flush();
}
using (var repStream = httpRequest.GetResponse().GetResponseStream())
{
using (var reader = new StreamReader(repStream))
{
return ValidateResult(reader.ReadToEnd());
}
}
}
private static string ValidateResult(string responseText)
{
if (responseText.StartsWith("response_error:"))
{
return responseText.TrimStart("response_error:".ToCharArray());
}
return responseText;
}
}
}

View File

@@ -49,6 +49,10 @@
<Reference Include="Kingdee.K3.SCM.Sal.Report.PlugIn">
<HintPath>..\..\..\..\..\Program Files (x86)\Kingdee\K3Cloud\WebSite\bin\Kingdee.K3.SCM.Sal.Report.PlugIn.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\Program Files (x86)\Kingdee\K3Cloud\WebSite\bin\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
@@ -58,6 +62,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="HttpClient.cs" />
<Compile Include="ListHeaderExtension.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>