From 52ba6b195a4126df405ef453d52ba6eaab6521da Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期五, 17 四月 2026 17:37:32 +0800
Subject: [PATCH] 优化3-4楼提升机以及添加报错接口

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs"
index 7bf7905..fa1faeb 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs"
@@ -34,6 +34,7 @@
             try
             {
                 Dt_HKLocationInfo? hKLocationInfo = null;
+                int containerType = taskDTO.containerCode.Contains("LXM") ? (int)LocationTypeEnum.LargePallet : (int)LocationTypeEnum.SmallPallet;
                 if (taskType == (int)TaskTypeEnum.STURR)
                 {
                     var reslut = _stationInfo.Repository.QueryFirst(x => x.StationCode == taskDTO.fromLocationCode) ?? throw new Exception($"鏈壘鍒拌捣鐐硅揣浣嶃�恵taskDTO.fromLocationCode}銆�");
@@ -47,7 +48,7 @@
                 #endregion
                 //鑾峰彇璐т綅淇℃伅
                 else
-                    hKLocationInfo = _hKLocationInfoService.GetFreeLocationInfo(taskDTO.toAreaCode) ?? throw new Exception($"鏈壘鍒扮粓鐐瑰簱鍖恒�恵taskDTO.toAreaCode}銆戝彲鐢ㄧ┖璐т綅锛�");
+                    hKLocationInfo = _hKLocationInfoService.GetFreeLocationInfo(taskDTO.toAreaCode, containerType) ?? throw new Exception($"鏈壘鍒扮粓鐐瑰簱鍖恒�恵taskDTO.toAreaCode}銆戝彲鐢ㄧ┖璐т綅锛�");
                 if (taskType == (int)TaskTypeEnum.Q1TSJ4)
                 {
                     var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "TSJ") as OtherDevice;
@@ -466,6 +467,11 @@
 
 
 
+        /// <summary>
+        /// 娴峰悍璁惧鎶ヨ
+        /// </summary>
+        /// <param name="hKDeviceAalarmDTO"></param>
+        /// <returns></returns>
         public WebResponseContent HKDeviceAlarm(HKDeviceAalarmDTO hKDeviceAalarmDTO)
         {
             WebResponseContent content = new WebResponseContent();
@@ -485,7 +491,7 @@
                     extra = hKDeviceAalarmDTO.extra,
                 };
 
-                string response = HttpHelper.Post(apiInfo.ApiAddress, hIKROBOTDeviceAlarm.Serialize());
+                string response = HttpHelper.Post(apiInfo.ApiAddress,hIKROBOTDeviceAlarm.Serialize());
                 wMSReturn = response.DeserializeObject<WMSReturn>();
                 if (wMSReturn.success == true && wMSReturn.message == "success")
                 {

--
Gitblit v1.9.3