From 2779947fe07c41250237437365f367b5a78a03b6 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期二, 10 六月 2025 23:57:58 +0800
Subject: [PATCH] 1

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs |   44 ++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 42 insertions(+), 2 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
index 0df30d5..1181cd4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -77,7 +77,7 @@
                       (x.EnableStatus == (int)EnableStatusEnum.Normal || x.EnableStatus == (int)EnableStatusEnum.OnlyOut));
                     if (locationInfo == null)
                     {
-                        return responseContent.Error($"娴嬭瘯鏋惰揣浣嶃�傘�傘�傘�傘�傘�傘�傘�傘��:{stockInfo.LocationCode}鍑哄簱鏉′欢涓嶆弧瓒�");
+                        return responseContent.Error($"娴嬭瘯鏋惰揣浣�:{stockInfo.LocationCode}鍑哄簱鏉′欢涓嶆弧瓒�");
                     }
                     //鐢熸垚娴嬭瘯鏋跺嚭搴撲换鍔� 閿佸畾搴撳瓨 鏇存敼璐т綅鐘舵��
                     Dt_Task taskOut = new()
@@ -1424,6 +1424,46 @@
                 return WebResponseContent.Instance.Error(ex.Message);
             }
         }
-       
+        /// <summary>
+        /// 鑾峰彇MES闃荤剨鎵规淇℃伅
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        public WebResponseContent GetZHMesMaterialLot(string materialLot)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.WMS_MES_GetProductByLot.ToString());
+                object obj = new { LotNo = materialLot };
+                MESRoot<object> root = new MESRoot<object>()
+                {
+                    From = "WMS",
+                    DateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
+                    Content = obj
+                };
+                JsonSerializerSettings settings = new JsonSerializerSettings
+                {
+                    ContractResolver = new CamelCasePropertyNamesContractResolver()
+                };
+                string request = JsonConvert.SerializeObject(root, settings);
+                string response = HttpMesHelper.Post(apiInfo.ApiAddress, request);
+                MesResponseContent mesResponseContent = response.DeserializeObject<MesResponseContent>();
+                //璋冪敤鎺ュ彛
+                if (mesResponseContent.BSucc == true)
+                {
+                    content.OK(mesResponseContent.StrMsg, mesResponseContent.Content);
+                }
+                else
+                {
+                    content.Error(mesResponseContent.StrMsg);
+                }
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
     }
 }

--
Gitblit v1.9.3