From 9335b068994ded46e7844d81967a12eb652f77ef Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期二, 04 十一月 2025 08:05:56 +0800
Subject: [PATCH] 处理出库作业手动分配无法输入小数问题

---
 Wms/Utility/Tools/HttpHelper.cs |   40 +++++++++++++++++++++++++++++++++++++---
 1 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/Wms/Utility/Tools/HttpHelper.cs b/Wms/Utility/Tools/HttpHelper.cs
index 28bef60..1614f8c 100644
--- a/Wms/Utility/Tools/HttpHelper.cs
+++ b/Wms/Utility/Tools/HttpHelper.cs
@@ -4,7 +4,9 @@
 using System.IO;
 using System.Linq;
 using System.Net;
+using System.Net.Security;
 using System.Reflection;
+using System.Security.Cryptography.X509Certificates;
 using System.Text;
 using System.Xml;
 using Newtonsoft.Json;
@@ -13,6 +15,11 @@
 {
     public class HttpHelper
     {
+        private static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
+        {
+            return true; //濡傛灉涓嶅笇鏈涢獙璇佽瘉涔︽湁鏁堟�э紝鐩存帴杩斿洖 true
+        }
+
         private static HttpWebRequest GetHttpWebRequest(string url, Dictionary<string, string> headerDic, string method)
         {
             HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
@@ -105,6 +112,10 @@
             }
             try
             {
+                if (url.Contains("https")) 
+                {
+                    ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
+                }
                 var requestData = GetResponseString(request);
                 LogFile.SaveLogToFile($"{logStr}鍙嶉锛�( {requestData} ),", logStr2);
                 return requestData;
@@ -206,14 +217,35 @@
                 //淇敼鍙傛暟鐨勫��
                 foreach (var de in Pars)
                 {
-                    string subNode = "DataList/Product/Batch";// + de.Key.ToString();
+                    string subNode = "DataList/Events/Event/Relation/Batch";// + de.Key.ToString();
                     
                     XmlNode node = xml.SelectSingleNode(subNode, nsmgr);
                     if (de != null)
                     {
                         XmlNode createNode = xml.CreateNode(XmlNodeType.Element, "Data", "");
-                        XmlAttribute attr = xml.CreateAttribute("code");
-                        attr.Value = de;
+                        XmlAttribute attr = xml.CreateAttribute("Code");  //绠辩爜
+                        attr.Value = de.Split(",")[0];
+                        createNode.Attributes.Append(attr);
+                        attr = xml.CreateAttribute("CorpOrderID");   //鍗曟嵁鍙�
+                        attr.Value = de.Split(",")[1];
+                        createNode.Attributes.Append(attr);
+                        attr = xml.CreateAttribute("Actor");      //鎿嶄綔浜�
+                        attr.Value = de.Split(",")[2];
+                        createNode.Attributes.Append(attr);
+                        attr = xml.CreateAttribute("ActDate");     //鎿嶄綔鏃堕棿
+                        attr.Value = de.Split(",")[3];
+                        createNode.Attributes.Append(attr);
+                        attr = xml.CreateAttribute("DisCorpID");  //杩愯緭浼佷笟
+                        attr.Value = "";
+                        createNode.Attributes.Append(attr);
+                        attr = xml.CreateAttribute("AssCorpID");   //濮旀墭浼佷笟
+                        attr.Value = "";
+                        createNode.Attributes.Append(attr);
+                        attr = xml.CreateAttribute("ToCorpID");  // 涓嬫父鏀惰揣浼佷笟缂栧彿
+                        attr.Value = "";
+                        createNode.Attributes.Append(attr);
+                        attr = xml.CreateAttribute("FromPerson");//鍙戣揣浜�
+                        attr.Value = "";   //de.Split(",")[2]
                         createNode.Attributes.Append(attr);
                         node.AppendChild(createNode);
                     }
@@ -463,4 +495,6 @@
 
 
     }
+
+    
 }

--
Gitblit v1.8.0