From 67348f250a1b7970059698002949a5e0a5f3c52f Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期四, 14 八月 2025 08:51:04 +0800
Subject: [PATCH] 上传最新代码

---
 项目代码/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs |   45 +++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 43 insertions(+), 2 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 200d3ac..c4a7efe 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -253,11 +253,18 @@
                         }
                         else
                         {
-                            if (taskTypeGroup == TaskTypeGroup.InboundGroup)
+                            if (taskTypeGroup == TaskTypeGroup.InboundGroup && !task.Roadway.Contains("YL"))
                             {
                                 task.CurrentAddress = router.StartPosi;
                                 task.NextAddress = "";
                                 task.DeviceCode = router.ChildPosiDeviceCode;
+                            }
+                            else
+                            {
+                                router = routers.FirstOrDefault(x=>x.ChildPosiDeviceCode==task.Roadway);
+                                task.CurrentAddress = router.StartPosi;
+                                task.NextAddress = router.NextPosi;
+                                task.DeviceCode = router.ChildPosi;
                             }
                         }
                     }
@@ -323,7 +330,41 @@
             }
             return content;
         }
+        // <summary>
+        /// 璇锋眰鍏ュ簱浠诲姟
+        /// </summary>
+        /// <param name="palletCode">鎵樼洏鍙�</param>
+        /// <param name="sourceAddress">璧峰鍦板潃</param>
+        /// /// <param name="roadWay">宸烽亾</param>
+        /// <returns></returns>
+        public WebResponseContent RequestYLWMSTaskSimple(string palletCode, string sourceAddress)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                string address = AppSettings.Get("WMSApiAddress");
+                if (string.IsNullOrEmpty(address))
+                {
+                    return WebResponseContent.Instance.Error($"鏈壘鍒癢MSApi鍦板潃");
+                }
+                string responseStr = HttpHelper.Get($"{address}/api/Task/RequestYLWMSTaskSimple?stationCode={sourceAddress}&palletCode={palletCode}");
+                WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
+                if (responseContent != null && responseContent.Status && responseContent.Data != null)
+                {
+                    WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.ToString());
+                    if (taskDTO != null)
+                    {
+                        content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO });
+                    }
+                }
 
+            }
+            catch (Exception ex)
+            {
+                content = WebResponseContent.Instance.Error(ex.Message);
+            }
+            return content;
+        }
         // <summary>
         /// 璇锋眰鍏ュ簱浠诲姟
         /// </summary>
@@ -352,7 +393,7 @@
                 {
                     Id = 1,
                     TaskNum = DateTime.Now.ToString("mmss").ObjToInt(),
-                    PalletCode="",
+                    PalletCode= palletCode,
                     RoadWay= roadWay ?? "",
                     TaskType= taskType,
                     PalletType=1,

--
Gitblit v1.9.3