|
|
@@ -4262,7 +4262,41 @@ namespace SiteCore
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public static void sendOrderInfoToNewAIPlant(string data)
|
|
|
+ {
|
|
|
+ Thread thread = new Thread(new ThreadStart(() =>
|
|
|
+ {
|
|
|
+ string url = "http://121.43.175.84/admin-api/erp/open/diansan/notice/order";
|
|
|
+ HttpClient client = new HttpClient();
|
|
|
+ var request = new HttpRequestMessage
|
|
|
+ {
|
|
|
+ Method = HttpMethod.Post,
|
|
|
+ RequestUri = new Uri(url),
|
|
|
+
|
|
|
+ Content = new StringContent(data)
|
|
|
+ {
|
|
|
+ Headers =
|
|
|
+ {
|
|
|
+ ContentType = new MediaTypeHeaderValue("application/json")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var response = client.SendAsync(request).Result;
|
|
|
+ response.EnsureSuccessStatusCode();
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ XLog.SaveLog(0, "sendOrderInfoToNewPlant:" + e);
|
|
|
+ }
|
|
|
+
|
|
|
+ }));
|
|
|
+
|
|
|
+ thread.Start();
|
|
|
|
|
|
+ }
|
|
|
|
|
|
public static string generateDateTimeRandomNos()
|
|
|
{
|