From 207071d20e664a1d50863418d852624760f8b6da Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期六, 21 二月 2026 13:13:04 +0800
Subject: [PATCH] 添加wms基础代码

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs |   97 ++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 93 insertions(+), 4 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
index c3d1c8e..284ff52 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
@@ -2,6 +2,7 @@
 using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc;
+using System.Threading.Tasks;
 using WIDESEAWCS_Core;
 using WIDESEAWCS_DTO.WMS;
 using WIDESEAWCS_ITaskInfoService;
@@ -34,9 +35,26 @@
         /// <param name="wMSCancelTask"></param>
         /// <returns></returns>
         [HttpPost, Route("CancelWMSTask"), AllowAnonymous]
-        public WebResponseContent CancelWMSTask([FromBody] WMSCancelTask wMSCancelTask)
+        public object CancelWMSTask([FromBody] WMSCancelTask wMSCancelTask)
         {
-            return _taskService.CancelWMSTask(wMSCancelTask);
+            WebResponseContent content = _taskService.CancelWMSTask(wMSCancelTask);
+            if (!content.Status)
+            {
+                return new
+                {
+                    code = "404",
+                    msg = content.Message
+                };
+            }
+            else
+            {
+                return new
+                {
+                    code = "0",
+                    msg = content.Message,
+                    data = content.Data
+                };
+            }
         }
 
         /// <summary>
@@ -45,10 +63,81 @@
         /// <param name="updateTaskPriority"></param>
         /// <returns></returns>
         [HttpPost, Route("UpdateWMSTaskPriority"), AllowAnonymous]
-        public WebResponseContent UpdateWMSTaskPriority([FromBody] WMSUpdateTaskPriority updateTaskPriority) 
+        public object UpdateWMSTaskPriority([FromBody] WMSUpdateTaskPriority updateTaskPriority)
         {
-            return _taskService.UpdateWMSTaskPriority(updateTaskPriority);
+            WebResponseContent content = _taskService.UpdateWMSTaskPriority(updateTaskPriority);
+            if (!content.Status)
+            {
+                return new
+                {
+                    code = "404",
+                    msg = content.Message
+                };
+            }
+            else
+            {
+                return new
+                {
+                    code = "0",
+                    msg = content.Message,
+                    data = content.Data
+                };
+            }
         }
 
+        /// <summary>
+        /// 淇敼搴撲綅鍒嗗尯 
+        /// </summary>
+        /// <param name="WMSUpdateLocationArea"></param>
+        /// <returns></returns>
+        [HttpPost, Route("ModifyWMSLayoutZone"), AllowAnonymous]
+        public object ModifyWMSLayoutZone([FromBody] WMSUpdateLocationArea wMSUpdateLocationArea)
+        {
+            WebResponseContent content = _taskService.ModifyWMSLayoutZone(wMSUpdateLocationArea);
+            if (!content.Status)
+            {
+                return new
+                {
+                    code = "404",
+                    msg = content.Message
+                };
+            }
+            else
+            {
+                return new
+                {
+                    code = "0",
+                    msg = content.Message,
+                    data = content.Data
+                };
+            }
+        }
+
+        /// <summary>
+        /// 鍖哄煙搴撲綅淇℃伅鏌ヨ
+        /// </summary>
+        /// <param name="AreaCode">鍖哄煙鍙�</param>
+        /// <returns></returns>
+        public object  LocationInquiry(string AreaCode)
+        {
+            WebResponseContent content = _taskService.LocationInquiry(AreaCode);
+            if (!content.Status)
+            {
+                return new
+                {
+                    code = "404",
+                    msg = content.Message
+                };
+            }
+            else
+            {
+                return new
+                {
+                    code = "0",
+                    msg = content.Message,
+                    data = content.Data
+                };
+            }
+        }
     }
 }

--
Gitblit v1.9.3