From 9f3b0f54b2c109bf32c250385b23df364c6ba4a4 Mon Sep 17 00:00:00 2001
From: leiqunqing <zhengqifeng@hnkhzn.com>
Date: 星期三, 28 一月 2026 21:40:29 +0800
Subject: [PATCH] 添加接口

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs |   87 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 87 insertions(+), 0 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 b7e92f2..26f0e3a 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"
@@ -18,6 +18,7 @@
 using AutoMapper;
 using SqlSugar;
 using System.Diagnostics.CodeAnalysis;
+using System.Threading.Tasks;
 using WIDESEAWCS_Common;
 using WIDESEAWCS_Common.TaskEnum;
 using WIDESEAWCS_Core;
@@ -99,6 +100,92 @@
             }
             return content;
         }
+
+        /// <summary>
+        /// 鍙栨秷浠诲姟
+        /// </summary>
+        /// <param name="taskCode">浠诲姟鍙�</param>
+        /// <param name="containerCode">鏂欑鏉$爜</param>
+        /// <returns></returns>
+        public WebResponseContent CancelWMSTask(WMSCancelTask wMSCancelTask)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                Dt_Task dt_Task = BaseDal.QueryFirst(x => x.WMSTaskNum == wMSCancelTask.TaskCode);
+                if (dt_Task == null) throw new Exception("鏈煡璇㈠埌浠诲姟鍙风浉鍏充换鍔�");
+                if (dt_Task.TaskType == TaskTypeEnum.MLInbound.ObjToInt() || dt_Task.TaskType == TaskTypeEnum.CPInbound.ObjToInt() || dt_Task.TaskType == TaskTypeEnum.CJInbound.ObjToInt())
+                    dt_Task.TaskType = TaskInStatusEnum.InCancel.ObjToInt();
+                else if (dt_Task.TaskType == TaskTypeEnum.MLOutbound.ObjToInt() || dt_Task.TaskType == TaskTypeEnum.CPOutbound.ObjToInt() || dt_Task.TaskType == TaskTypeEnum.CJOutbound.ObjToInt())
+                    dt_Task.TaskType = TaskOutStatusEnum.OutCancel.ObjToInt();
+                BaseDal.UpdateData(dt_Task);
+                content.OK();
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+
+
+        /// <summary>
+        /// 淇敼浠诲姟浼樺厛绾�
+        /// </summary>
+        /// <param name="updateTaskPriority"></param>
+        /// <returns></returns>
+        public WebResponseContent UpdateWMSTaskPriority(WMSUpdateTaskPriority updateTaskPriority)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                Dt_Task dt_Task = BaseDal.QueryFirst(x => x.WMSTaskNum == updateTaskPriority.taskCode);
+                if (dt_Task == null) throw new Exception("鏈煡璇㈠埌浠诲姟鍙风浉鍏充换鍔�");
+                dt_Task.Grade = updateTaskPriority.taskPriority;
+                BaseDal.UpdateData(dt_Task);
+                content.OK();
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+
+        /// <summary>
+        /// 淇敼搴撲綅鍒嗗尯
+        /// </summary>
+        /// <returns></returns>
+        public WebResponseContent ModifyWMSLayoutZone(WMSUpdateLocationArea wMSUpdateLocationArea)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                if(wMSUpdateLocationArea.WarehouseId == 1)
+                {
+                    foreach (var LocationCode in wMSUpdateLocationArea.LocationCodes)
+                    {
+                        Dt_RGVLocationInfo dt_RGVLocationInfo = _rGVLocationInfoService.Repository.QueryFirst(x => x.LocationCode == LocationCode);
+                        UpdateLocationCode(dt_RGVLocationInfo,wMSUpdateLocationArea.UpdateAreaCode);
+
+                    }
+                }
+                
+                content.OK();
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+
+        private void UpdateLocationCode(object LocationInfo, string updateAreaCode)
+        {
+           
+        }
+
+
         /// <summary>
         /// 鎺ユ敹WMS浠诲姟淇℃伅
         /// </summary>

--
Gitblit v1.9.3