From 314076388f664f8ce1a1d19c4c9717fe54634e05 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期六, 18 四月 2026 15:51:51 +0800
Subject: [PATCH] Merge branch 'dev' of http://115.159.85.185:8098/r/SuZhouGuanHong/ShanMeiXinNengYuan into dev

---
 Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MesService.cs |   42 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 41 insertions(+), 1 deletions(-)

diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MesService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MesService.cs
index 79bd0bd..3234a69 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MesService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MesService.cs
@@ -10,7 +10,7 @@
     /// <summary>
     /// MES鏈嶅姟瀹炵幇 - 闄曡タ椤峰埢鑳芥簮绉戞妧MES绯荤粺瀵规帴
     /// </summary>
-    public class MesService : IMesService
+    public class MesService : IMesService 
     {
         private readonly HttpClientHelper _httpClient;
         private readonly string _baseUrl;
@@ -43,10 +43,30 @@
             };
         }
 
+        private HttpRequestConfig BuildConfig(string token)
+        {
+            return new HttpRequestConfig
+            {
+                Headers = new Dictionary<string, string>
+                {
+                    { "Authorization", token }
+                },
+                TimeoutMs = 30000,
+                MaxRetryCount = 0,
+                EnableLogging = true
+            };
+        }
+
         private HttpResponseResult<MesResponse> Post<T>(string url, T request)
         {
             string json = JsonConvert.SerializeObject(request);
             return _httpClient.Post<MesResponse>(url, json, "application/json", BuildConfig());
+        }
+
+        private HttpResponseResult<MesResponse> Post<T>(string url, T request, HttpRequestConfig config)
+        {
+            string json = JsonConvert.SerializeObject(request);
+            return _httpClient.Post<MesResponse>(url, json, "application/json", config);
         }
 
         public HttpResponseResult<MesResponse> BindContainer(BindContainerRequest request)
@@ -57,6 +77,16 @@
         public HttpResponseResult<MesResponse> UnBindContainer(UnBindContainerRequest request)
         {
             return Post(_baseUrl + UnBindContainerPath, request);
+        }
+
+        public HttpResponseResult<MesResponse> BindContainer(BindContainerRequest request, string token)
+        {
+            return Post(_baseUrl + BindContainerPath, request, BuildConfig(token));
+        }
+
+        public HttpResponseResult<MesResponse> UnBindContainer(UnBindContainerRequest request, string token)
+        {
+            return Post(_baseUrl + UnBindContainerPath, request, BuildConfig(token));
         }
 
         public HttpResponseResult<MesResponse> ContainerNgReport(ContainerNgReportRequest request)
@@ -73,5 +103,15 @@
         {
             return Post(_baseUrl + OutboundInContainerPath, request);
         }
+
+        public HttpResponseResult<MesResponse> InboundInContainer(InboundInContainerRequest request, string token)
+        {
+            return Post(_baseUrl + InboundInContainerPath, request, BuildConfig(token));
+        }
+
+        public HttpResponseResult<MesResponse> OutboundInContainer(OutboundInContainerRequest request, string token)
+        {
+            return Post(_baseUrl + OutboundInContainerPath, request, BuildConfig(token));
+        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3