From a95a257a702360e7632b5daeb5b554163382720c Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期四, 17 四月 2025 17:00:59 +0800
Subject: [PATCH] 1

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index c5ab563..ac63085 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -208,7 +208,7 @@
                                 task.NextAddress = router.NextPosi;
                                 task.DeviceCode = router.ChildPosi;
                             }
-                            else if (item.TaskType == TaskTypeEnum.MesPalletReturn.ObjToInt() && router.IsEnd)
+                            else if ((item.TaskType == TaskTypeEnum.MesPalletLargeReturn.ObjToInt() || item.TaskType == TaskTypeEnum.MesPalletSmallReturn.ObjToInt()) && router.IsEnd)
                             {
                                 task.NextAddress = router.NextPosi;
                                 task.DeviceCode = router.ChildPosi;
@@ -236,7 +236,7 @@
                                 else if(item.RoadWay.Contains("AGV_CP") && taskTypeGroup == TaskTypeGroup.InboundGroup)
                                 {
                                     task.DeviceCode = stationManger.StationDeviceCode;
-                                    task.AgvTaskNum = task.DeviceCode + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum;
+                                    task.AgvTaskNum = task.Roadway + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum;
                                 }
                                 else
                                 {
@@ -844,5 +844,27 @@
         {
             return BaseDal.QueryFirst(x => x.PalletCode == PalletCode && x.SourceAddress == locationCode && (x.TaskState == (int)TaskStatusEnum.SC_Execute || x.TaskState == (int)TaskStatusEnum.SC_Executing));
         }
+        /// <summary>
+        /// 鎺ュ彈WMS鎵嬪姩瀹屾垚浠诲姟
+        /// </summary>
+        /// <param name="taskNum"></param>
+        /// <returns></returns>
+        public WebResponseContent RecWMSTaskCompleted(int taskNum)
+        {
+            try
+            {
+                Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum);
+                if (task != null)
+                {
+                    task.TaskState = TaskStatusEnum.Finish.ObjToInt();
+                    BaseDal.DeleteAndMoveIntoHty(task, OperateTypeEnum.浜哄伐瀹屾垚);
+                }
+                return WebResponseContent.Instance.OK();
+            }
+            catch (Exception ex)
+            {
+                return WebResponseContent.Instance.Error(ex.Message);
+            }
+        }
     }
 }

--
Gitblit v1.9.3