From b9f7560cbe0e562a40e9515a0559a3e951f0fee6 Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期一, 07 四月 2025 09:16:01 +0800
Subject: [PATCH] 问题修改
---
Wms/Utility/Tools/HttpHelper.cs | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/Wms/Utility/Tools/HttpHelper.cs b/Wms/Utility/Tools/HttpHelper.cs
index 28bef60..4b90152 100644
--- a/Wms/Utility/Tools/HttpHelper.cs
+++ b/Wms/Utility/Tools/HttpHelper.cs
@@ -65,17 +65,29 @@
}
}
- public static string DoGet(string url, Dictionary<string, string> paramDic = null, Dictionary<string, string> headerDic = null)
+ public static string DoGet(string url, string str, string logStr, Dictionary<string, string> paramDic = null, Dictionary<string, string> headerDic = null)
{
var paramString = GetUrlParamString(paramDic);
var request = GetHttpWebRequest(url + paramString, headerDic, "GET");
request.ContentType = "application/json";
+ //log璺緞
+ var logStr2 = $@".\log\{str}\{logStr}" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
try
{
- return GetResponseString(request);
+
+
+ //璁板綍log
+ LogFile.SaveLogToFile($"{str}锛�( {paramString} ),", logStr2);
+ var requestData = GetResponseString(request);
+ //璁板綍log
+ LogFile.SaveLogToFile($"{str}鍙嶉锛�( {requestData} ),", logStr2);
+ return requestData;
}
catch (WebException ex)
{
+
+ //璁板綍log
+ LogFile.SaveLogToFile($"{str}鍙嶉锛�( {ex.Message} ),", logStr2);
throw ex;
}
}
@@ -206,7 +218,7 @@
//淇敼鍙傛暟鐨勫��
foreach (var de in Pars)
{
- string subNode = "DataList/Product/Batch";// + de.Key.ToString();
+ string subNode = "DataList/Events/Event/DataField";// + de.Key.ToString();
XmlNode node = xml.SelectSingleNode(subNode, nsmgr);
if (de != null)
--
Gitblit v1.8.0