From 441b6f8d257a01b2998253ef0515a201777d7e68 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 04 七月 2025 14:06:49 +0800
Subject: [PATCH] 修改入库、移库、出库逻辑

---
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/PartialTaskService_Line.cs |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/PartialTaskService_Line.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/PartialTaskService_Line.cs"
index 9ff138c..3dc40fc 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/PartialTaskService_Line.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/PartialTaskService_Line.cs"
@@ -53,12 +53,18 @@
                 var ResultData = HttpHelper.PostAsync(WMSInterfaceAddress.StackerCraneRequestInbound, lineDTO.ToJson(), headers: new Dictionary<string, string>());
                 if (ResultData.Result == null) throw new Exception($"鍚慦MS璇锋眰鍏ュ簱鍒嗛厤璐т綅瓒呮椂!浠诲姟鍙�:{task.TaskNum}");
                 content = JsonConvert.DeserializeObject<WebResponseContent>(ResultData.Result);
-                if (!content.Status) throw new Exception(content.Message);
+                if (content.Status)
+                {
+                    var receiveWMSInfo = JsonConvert.DeserializeObject<ReceiveWMSInfo>(content.Data.ToJson());
+                    task.SourceIsPickPlace = receiveWMSInfo.SourceIsPickPlace;
+                    task.TargetIsPickPlace = receiveWMSInfo.TargetIsPickPlace;
+                    task.TargetAddress = receiveWMSInfo.TargetAddress;
+                    task.NextAddress = task.TargetAddress;
+                    task.ExceptionMessage = null;
+                }
+                else
+                    task.ExceptionMessage = content.Message;
 
-                var receiveWMSInfo = JsonConvert.DeserializeObject<ReceiveWMSInfo>(content.Data.ToJson());
-                task.IsPickPlace = receiveWMSInfo.IsPickPlace;
-                task.TargetAddress = receiveWMSInfo.TargetAddress;
-                task.NextAddress = task.TargetAddress;
                 BaseDal.UpdateData(task);
             }
             catch (Exception ex)

--
Gitblit v1.9.3