From 4e839ad077304eaecb6dfb35fdc9b0d30a209a76 Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期六, 28 二月 2026 13:21:55 +0800
Subject: [PATCH] 优化
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs | 136 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 133 insertions(+), 3 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 5b98c3b..d2a3697 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,8 +2,9 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
+using System.Threading.Tasks;
using WIDESEAWCS_Core;
-using WIDESEAWCS_DTO.TaskInfo;
+using WIDESEAWCS_DTO.WMS;
using WIDESEAWCS_ITaskInfoService;
namespace WIDESEAWCS_Server.Controllers.WMS
@@ -23,9 +24,138 @@
/// <param name="taskDTOs"></param>
/// <returns></returns>
[HttpPost, Route("ReceiveTask"), AllowAnonymous]
- public WebResponseContent ReceiveWMSTask([FromBody] List<WMSTasksDTO> taskDTOs)
+ public object ReceiveWMSTask([FromBody] List<WMSTasksDTO> taskDTOs)
{
- return _taskService.ReceiveWMSTask(taskDTOs);
+ WebResponseContent content = _taskService.ReceiveWMSTask(taskDTOs);
+ 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="wMSCancelTask"></param>
+ /// <returns></returns>
+ [HttpPost, Route("CancelWMSTask"), AllowAnonymous]
+ public object CancelWMSTask([FromBody] WMSCancelTask 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>
+ /// 淇敼浠诲姟浼樺厛绾�
+ /// </summary>
+ /// <param name="updateTaskPriority"></param>
+ /// <returns></returns>
+ [HttpPost, Route("UpdateWMSTaskPriority"), AllowAnonymous]
+ public object UpdateWMSTaskPriority([FromBody] WMSUpdateTaskPriority 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>
+ [HttpPost, Route("LocationInquiry"), AllowAnonymous]
+ 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