From e83bd2f6a38957c0d47c9e0a6c6b2ca45836e114 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期六, 08 十一月 2025 10:13:43 +0800
Subject: [PATCH] 提交

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs"
index e6d9f57..0b48c40 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs"
@@ -28,24 +28,24 @@
             _logger = logger;
         }
 
-        public async Task FeedbackInbound(  FeedbackInboundRequestModel model)
+        public async Task<ResponseModel> FeedbackInbound(  FeedbackInboundRequestModel model)
         {
             string json = JsonConvert.SerializeObject(model);
             var content = new StringContent(json, Encoding.UTF8, "application/json");
             var _client = _httpClientFactory.CreateClient("MESUrl");
             _client.DefaultRequestHeaders.Clear();
             _client.DefaultRequestHeaders.Add("Accept", "application/json");
-
+            _logger.LogInformation("InvokeMESService  FeedbackInbound :  " + json);
             var response = await _client.PostAsync("AldMaterialWarehousing/MaterialWarehousing", content);
             string body = await response.Content.ReadAsStringAsync();
-
+            _logger.LogInformation("InvokeMESService  FeedbackInbound  body:  " + body);
             if (!response.IsSuccessStatusCode)
             {
 
                 throw new HttpRequestException(body);
             }
 
-            // JsonConvert.DeserializeObject<ResponseModel>(body);
+           return JsonConvert.DeserializeObject<ResponseModel>(body);
         }
 
         public async Task FeedbackOutbound(  FeedbackOutboundRequestModel model)
@@ -73,15 +73,15 @@
             string json = JsonConvert.SerializeObject(model);
 
 
-            string userDataEncoded = Uri.EscapeDataString(json);
-            //string baseUrl = "http://mestest.ald.com//OrBitWCFServiceR15/orbitwebapi.ashx?"; 
-            string userTicket = await GetToken(UserName, Password);
-            string api = "WMS_BarcodeInformation";
+            //string userDataEncoded = Uri.EscapeDataString(json);
+            ////string baseUrl = "http://mestest.ald.com//OrBitWCFServiceR15/orbitwebapi.ashx?"; 
+            //string userTicket = await GetToken(UserName, Password);
+            //string api = "WMS_BarcodeInformation";
 
 
             var client = _httpClientFactory.CreateClient("MESUrl");
             // 鎷兼帴 URL 鍙傛暟
-            string url = $"{client.BaseAddress}UserTicket={userTicket}&API={api}&UserData={userDataEncoded}";
+           // string url = $"{client.BaseAddress}UserTicket={userTicket}&API={api}&UserData={userDataEncoded}";
 
 
             client.DefaultRequestHeaders.Clear();
@@ -91,7 +91,7 @@
 
             var content = new StringContent(json, Encoding.UTF8, "application/json");
 
-            using var response = await client.PostAsync(url, content);
+            using var response = await client.PostAsync("", content);
             var responseText = await response.Content.ReadAsStringAsync();
             if (!response.IsSuccessStatusCode)
             {

--
Gitblit v1.9.3