From 2ae5aa151f7b40a082e34aa7ed22b4b64edd1d3c Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 11 六月 2025 17:13:56 +0800
Subject: [PATCH] 修改堆垛机通讯协议及交互逻辑

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs |   27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs"
index f297e69..dae6e2e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs"
@@ -17,7 +17,14 @@
 {
     public partial class TaskService
     {
+        /// <summary>
+        /// WCS IP鍦板潃
+        /// </summary>
         public string url = AppSettings.Configuration["WCS"];
+        /// <summary>
+        /// AGV IP鍦板潃
+        /// </summary>
+        public string AGVurl = AppSettings.Configuration["AGV"];
         /// <summary>
         /// PDA鐢宠鍏ュ簱--鍫嗗灈鏈虹珛搴撳叆搴�
         /// </summary>
@@ -120,7 +127,7 @@
                         TargetAddress = locationInfo.LocationCode,
                         TaskStatus = InTaskStatusEnum.InNew.ObjToInt(),
                         TaskType = taskType,
-                        Depth= locationInfo.Depth,
+                        Depth = locationInfo.Depth,
                     };
                     BaseDal.AddData(task);
                     int beforeStatus = locationInfo.LocationStatus;
@@ -138,11 +145,16 @@
                             orderNo = stockInfo.Details.FirstOrDefault()?.OrderNo ?? "";
 
                             stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
+                            stockInfo.Details.ForEach(x =>
+                            {
+                                x.Status = StockStatusEmun.鍏ュ簱纭.ObjToInt();
+                            });
                             _stockService.StockInfoService.Repository.UpdateData(stockInfo);
+                            _stockService.StockInfoDetailService.Repository.UpdateData(stockInfo.Details);
                         }
                         else
                         {
-                            return content = WebResponseContent.Instance.Error("鏈壘鍒板簱瀛樹俊鎭�");
+                            return content.Error("鏈壘鍒板簱瀛樹俊鎭�");
                         }
                     }
                     else
@@ -152,9 +164,10 @@
                         {
                             _basicService.LocationInfoService.UpdateLocationLock(locationInfo, task.TaskNum, StockChangeType.Inbound.ObjToInt(), false);
                         }
+                        task.Grade = 1;
                     }
                     _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
-                     
+
                     tasks.Add(task);
                     _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), orderNo, task.TaskNum);
 
@@ -162,17 +175,17 @@
                     if (!response.Status)
                     {
                         _unitOfWorkManage.RollbackTran();
-                        return content = WebResponseContent.Instance.Error($"{response.Message}");
+                        return content.Error($"{response.Message}");
                     }
                     _unitOfWorkManage.CommitTran();
-                    return content = WebResponseContent.Instance.OK();
+                    return content.OK();
                 }
-                return content = WebResponseContent.Instance.Error("鏈壘鍒板彲鍒嗛厤璐т綅");
+                return content.Error("鏈壘鍒板彲鍒嗛厤璐т綅");
             }
             catch (Exception ex)
             {
                 _unitOfWorkManage.RollbackTran();
-                content = WebResponseContent.Instance.Error(ex.Message);
+                content.Error(ex.Message);
             }
             return content;
         }

--
Gitblit v1.9.3