DS7_JinGang
hanxuntao 1 year ago
parent 642abc6d68
commit ba452e7d01

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress /> <Use64BitIISExpress />

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress /> <Use64BitIISExpress />
<IISExpressSSLPort /> <IISExpressSSLPort />

@ -129,7 +129,43 @@ namespace DSWeb.Areas.Dispatch.Helper
return responseString; return responseString;
} }
public static string DoPostHead(string url, Dictionary<string, string> headdic, string json)
{
string responseString = "";//post返回的结果
ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, err) => { return true; };
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url);
req.Method = "POST";
if (headdic.Count > 0)
{
foreach (var item in headdic)
{
req.Headers.Add(item.Key, item.Value);
}
}
if (!string.IsNullOrWhiteSpace(json))
{
byte[] postBytes = Encoding.UTF8.GetBytes(json);
req.ContentType = "application/json; charset=utf-8";
req.ContentLength = Encoding.UTF8.GetByteCount(json);
Stream stream = req.GetRequestStream();
stream.Write(postBytes, 0, postBytes.Length);
req.Timeout = 100000;
stream.Close();
}
else
{
req.ContentLength = 0;
}
var response = req.GetResponse();
Stream streamResponse = response.GetResponseStream();
StreamReader streamRead = new StreamReader(streamResponse);
responseString = streamRead.ReadToEnd();
response.Close();
streamRead.Close();
return responseString;
}
public static string DoPost(string url, string json,string certificatepath,string password) public static string DoPost(string url, string json,string certificatepath,string password)
{ {
string responseString = "";//post返回的结果 string responseString = "";//post返回的结果

@ -3244,9 +3244,12 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlDAL
var errstr = ""; var errstr = "";
var apiJson = JsonConvert.SerializeObject(postObj); var apiJson = JsonConvert.SerializeObject(postObj);
apiJson = apiJson.Replace("paramsendlangchao", "params"); apiJson = apiJson.Replace("paramsendlangchao", "params");
var HeaderDic = new Dictionary<string, string>
{
{ "X-Odoo-Database-Name","tccs1"}
};
var apiRtn = Areas.Dispatch.Helper.WebRequestHelper.DoPostHead(INSUITEWEB, HeaderDic,apiJson);
var apiRtn = Areas.Dispatch.Helper.WebRequestHelper.DoPost(INSUITEWEB, apiJson);
var objRtn2 = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(apiRtn, new Root()); var objRtn2 = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(apiRtn, new Root());
int voucount = 0; int voucount = 0;
int errvoucount = 0; int errvoucount = 0;

@ -10988,7 +10988,7 @@ namespace DSWeb.MvcShipping.DAL.MsCwVouchersGlChFeeDAL
#endregion #endregion
#region 收入RMB #region 收入RMB
if (dsVWChFeeAR.Tables[0].Rows[i]["PROFITACCID"].ToString().Trim() != "") if (dsVWChFeeAR.Tables[0].Rows[i]["PROFITACCID"].ToString().Trim() != ""&& dsVWChFeeAR.Tables[0].Rows[i]["PROFITACCID"].ToString().Trim() != "-1")
{ {
var CRACCID = BasicDataRefDAL.GetCwAccitems(dsVWChFeeAR.Tables[0].Rows[i]["PROFITACCID"].ToString().Trim(), accitemslist); var CRACCID = BasicDataRefDAL.GetCwAccitems(dsVWChFeeAR.Tables[0].Rows[i]["PROFITACCID"].ToString().Trim(), accitemslist);

@ -4,7 +4,7 @@
<ProjectView>ShowAllFiles</ProjectView> <ProjectView>ShowAllFiles</ProjectView>
<NameOfLastUsedPublishProfile>配置文件1</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>配置文件1</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress /> <Use64BitIISExpress />
<IISExpressSSLPort /> <IISExpressSSLPort />
<IISExpressAnonymousAuthentication /> <IISExpressAnonymousAuthentication />

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress /> <Use64BitIISExpress />
<IISExpressSSLPort /> <IISExpressSSLPort />

Loading…
Cancel
Save