From b2cc7bb7740e42e57cf50af02a8ca4b535cad484 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 11 三月 2026 17:02:21 +0800
Subject: [PATCH] 优化WMS接口逻辑

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
index 9157118..71e7fc8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
@@ -339,6 +339,7 @@
         #region 涓婃姤WMS
         public WebResponseContent TaskFeedback(Dt_Task dt_Task, int Status)
         {
+            WebResponseContent content = new WebResponseContent();
             WMSInOutBoundCompleteFeedback boundCompleteFeedback = new WMSInOutBoundCompleteFeedback();
             WMSReturn agvContent = null;
             try
@@ -355,17 +356,26 @@
                     boundCompleteFeedback.custStatus = "";
                     string response = HttpHelper.Post(apiInfo.ApiAddress, boundCompleteFeedback.Serialize());
                     agvContent = response.DeserializeObject<WMSReturn>();
-                    if (agvContent.code != 0) dt_Task.ExceptionMessage = agvContent.msg;
+                    content.OK(data: agvContent);
+                    if (agvContent.code != 200)
+                    {
+                        dt_Task.ExceptionMessage = agvContent.message;
+                        content.Error(agvContent.message);
+                    }
                 }
             }
             catch (Exception ex)
             {
                 dt_Task.ExceptionMessage = ex.Message;
             }
-            if (agvContent != null && agvContent.code == 0 && Status == 2)
-                BaseDal.DeleteAndMoveIntoHty(dt_Task, OperateTypeEnum.鑷姩瀹屾垚);
-            else
-                BaseDal.UpdateData(dt_Task);
+            finally
+            {
+                _trackloginfoService.AddTrackLog(boundCompleteFeedback, content, "鍑哄叆搴撲换鍔$姸鎬佸弽棣圵MS", "", "");
+                if (agvContent != null && agvContent.code == 200 && Status == 2)
+                    BaseDal.DeleteAndMoveIntoHty(dt_Task, OperateTypeEnum.鑷姩瀹屾垚);
+                else
+                    BaseDal.UpdateData(dt_Task);
+            }
             return WebResponseContent.Instance.OK();
         }
         #endregion

--
Gitblit v1.9.3