From 7278264f027d62664a0209699d0f66a22fd06a8e Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期一, 13 四月 2026 10:24:04 +0800
Subject: [PATCH] feat: 更新依赖版本并优化MES接口调用

---
 Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs |   36 ++++++++++++------------------------
 1 files changed, 12 insertions(+), 24 deletions(-)

diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs
index 1d4292c..1483686 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs
@@ -82,28 +82,22 @@
                     return response.Error($"褰撳墠搴撳瓨鐘舵�佷笉鍏佽杩涚珯鎿嶄綔锛屽綋鍓嶇姸鎬侊細{stockInfo.StockStatus}");
                 }
 
-                // 4. 鑾峰彇绯荤粺閰嶇疆 - 鐩存帴浠庢暟鎹簱鏌ヨ
-                var configs = _sysDictionaryService.GetVueDictionary(new[] { "MES_EquipmentCode", "MES_ResourceCode" });
-
-                string equipmentCode = GetConfigValue(configs, "MES_EquipmentCode", "WCS_001");
-                string resourceCode = GetConfigValue(configs, "MES_ResourceCode", "RESOURCE_001");
-
-                // 5. 鏋勯�燤ES璇锋眰
+                // 4. 鏋勯�燤ES璇锋眰
                 var mesRequest = new InboundInContainerRequest
                 {
-                    EquipmentCode = equipmentCode,
-                    ResourceCode = resourceCode,
+                    EquipmentCode = "STK-GROUP-001",
+                    ResourceCode = "STK-GROUP-001",
                     LocalTime = DateTime.Now,
                     ContainerCode = dto.PalletCode
                 };
 
                 string requestJson = System.Text.Json.JsonSerializer.Serialize(mesRequest);
 
-                // 6. 璋冪敤MES鎺ュ彛锛堝悓姝ユ柟娉曪級
+                // 5. 璋冪敤MES鎺ュ彛锛堝悓姝ユ柟娉曪級
                 var mesResult = _mesService.InboundInContainer(mesRequest);
                 stopwatch.Stop();
 
-                // 7. 璁板綍鏃ュ織
+                // 6. 璁板綍鏃ュ織
                 await _mesLogService.LogAsync(new MesApiLogDto
                 {
                     ApiType = "InboundInContainer",
@@ -115,7 +109,7 @@
                     Creator = App.User.UserName
                 });
 
-                // 8. 杩斿洖缁撴灉
+                // 7. 杩斿洖缁撴灉
                 if (mesResult.IsSuccess)
                 {
                     return response.OK("鎵樼洏杩涚珯鎴愬姛");
@@ -182,17 +176,11 @@
                     return response.Error($"褰撳墠搴撳瓨鐘舵�佷笉鍏佽鍑虹珯鎿嶄綔锛屽綋鍓嶇姸鎬侊細{stockInfo.StockStatus}");
                 }
 
-                // 4. 鑾峰彇绯荤粺閰嶇疆
-                var configs = _sysDictionaryService.GetVueDictionary(new[] { "MES_EquipmentCode", "MES_ResourceCode" });
-
-                string equipmentCode = GetConfigValue(configs, "MES_EquipmentCode", "WCS_001");
-                string resourceCode = GetConfigValue(configs, "MES_ResourceCode", "RESOURCE_001");
-
-                // 5. 鏋勯�燤ES璇锋眰
+                // 4. 鏋勯�燤ES璇锋眰
                 var mesRequest = new OutboundInContainerRequest
                 {
-                    EquipmentCode = equipmentCode,
-                    ResourceCode = resourceCode,
+                    EquipmentCode = "STK-GROUP-001",
+                    ResourceCode = "STK-GROUP-001",
                     LocalTime = DateTime.Now,
                     ContainerCode = dto.PalletCode,
                     ParamList = dto.ParamList?.Select(p => new ParamItem
@@ -205,11 +193,11 @@
 
                 string requestJson = System.Text.Json.JsonSerializer.Serialize(mesRequest);
 
-                // 6. 璋冪敤MES鎺ュ彛锛堝悓姝ユ柟娉曪級
+                // 5. 璋冪敤MES鎺ュ彛锛堝悓姝ユ柟娉曪級
                 var mesResult = _mesService.OutboundInContainer(mesRequest);
                 stopwatch.Stop();
 
-                // 7. 璁板綍鏃ュ織
+                // 6. 璁板綍鏃ュ織
                 await _mesLogService.LogAsync(new MesApiLogDto
                 {
                     ApiType = "OutboundInContainer",
@@ -221,7 +209,7 @@
                     Creator = App.User.UserName
                 });
 
-                // 8. 杩斿洖缁撴灉
+                // 7. 杩斿洖缁撴灉
                 if (mesResult.IsSuccess)
                 {
                     return response.OK("鎵樼洏鍑虹珯鎴愬姛");

--
Gitblit v1.9.3