From c6265b1f32a6c6c4e4dd478efe27d23e7d825859 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期三, 12 十一月 2025 16:40:25 +0800
Subject: [PATCH] 优化任务逻辑,新增API支持动态货位更新重构任务处理逻辑,支持基于区域的任务分配,优化货位状态更新,减少重复代码 更新项目路径和文档路径,反映文件结构调整。  新增 UpdateStartLocationInfo和RequestLocationAPI 方法,支持动态更新货位信息。

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Task/TaskController.cs |   61 ++++++++++++++++++------------
 1 files changed, 36 insertions(+), 25 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Task/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Task/TaskController.cs"
index 97cca29..70ab2b1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Task/TaskController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Task/TaskController.cs"
@@ -23,7 +23,7 @@
     /// </summary>
     /// <param name="saveModel">浠诲姟鍙�</param>
     /// <returns>鎴愬姛鎴栧け璐�</returns>
-    [HttpGet, Route("CompleteTaskAsync"), AllowAnonymous]
+    [HttpGet,HttpPost, Route("CompleteTaskAsync"), AllowAnonymous]
     public async Task<WebResponseContent> CompleteTaskAsync(int taskNum)
     {
         return await Service.CompleteAsync(taskNum);
@@ -34,7 +34,7 @@
     /// </summary>
     /// <param name="taskNum"></param>
     /// <returns></returns>
-    [HttpPost, Route("TaskCancel"), AllowAnonymous]
+    [HttpPost, HttpGet,Route("TaskCancel"), AllowAnonymous]
     public WebResponseContent TaskCancel(int taskNum)
     {
         return Service.TaskCancel(taskNum);
@@ -44,7 +44,7 @@
     /// 鑾峰彇浠诲姟淇℃伅
     /// </summary>
     /// <returns></returns>
-    [HttpPost, Route("GetTaskInfo")]
+    [HttpPost, HttpGet, Route("GetTaskInfo")]
     public WebResponseContent GetTaskInfo()
     {
         return Service.GetTaskInfo();
@@ -55,7 +55,7 @@
     /// </summary>
     /// <param name="input">璇锋眰鏁版嵁</param>
     /// <returns></returns>
-    [HttpPost, AllowAnonymous, Route("RequestInboundTaskAsync")]
+    [HttpPost, HttpGet, AllowAnonymous, Route("RequestInboundTaskAsync")]
     [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })]
     public async Task<WebResponseContent> RequestInboundTaskAsync([FromBody] RequestTaskDto input)
     {
@@ -63,23 +63,11 @@
     }
 
     /// <summary>
-    /// 鏇存柊璐т綅浠诲姟鐘舵�佸埌涓嬩竴涓妭鐐�
-    /// </summary>
-    /// <param name="input">璇锋眰鏁版嵁</param>
-    /// <returns></returns>
-    [HttpPost, AllowAnonymous, Route("RequestLocationAsync")]
-    [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })]
-    public async Task<WebResponseContent> RequestLocationAsync([FromBody] RequestTaskDto input)
-    {
-        return await Service.RequestLocationAsync(input);
-    }
-
-    /// <summary>
     /// 绌烘墭鐩樻弧鐩樺嚭搴撹姹�
     /// </summary>
     /// <param name="request">璇锋眰鏁版嵁</param>
     /// <returns></returns>
-    [HttpPost, AllowAnonymous, Route("RequestOutboundTaskAsync")]
+    [HttpPost, HttpGet, AllowAnonymous, Route("RequestOutboundTaskAsync")]
     [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })]
     public async Task<Dt_Task> RequestOutboundTaskAsync([FromBody] RequestTaskDto taskDto)
     {
@@ -91,11 +79,25 @@
     /// </summary>
     /// <param name="request">璇锋眰鏁版嵁</param>
     /// <returns></returns>
-    [HttpPost, AllowAnonymous, Route("OutBoundTaskAsync")]
+    [HttpPost, HttpGet, AllowAnonymous, Route("OutBoundTaskAsync")]
     [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 2 })]
-    public Task<WebResponseContent> OutBoundTaskAsync(string palletCode)
+    public Task<WebResponseContent> OutBoundTaskAsync(string palletCode, string remark)
     {
-        return Service.OutBoundTaskAsync(palletCode);
+        return Service.OutBoundTaskAsync(palletCode, remark);
+    }
+
+    [HttpPost, HttpGet, AllowAnonymous, Route("OtherOutBoundTaskAsync")]
+    [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 2 })]
+    public Task<WebResponseContent> OtherOutBoundTaskAsync([FromBody] List<DtStockInfoDetail> details)
+    {
+        return Service.OtherOutBoundTaskAsync(details);
+    }
+
+    [HttpPost, HttpGet, AllowAnonymous, Route("HandAllocateOutBoundTaskAsync")]
+    [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 2 })]
+    public Task<WebResponseContent> HandAllocateOutBoundTaskAsync([FromBody] List<DtStockInfoDetail> details)
+    {
+        return Service.HandAllocateOutBoundTaskAsync(details);
     }
 
     /// <summary>
@@ -144,16 +146,25 @@
     }
 
     [HttpPost, AllowAnonymous, Route("AGVIsNeedRelocationAsync")]
-    [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })]
     public async Task<WebResponseContent> AGVIsNeedRelocationAsync([FromBody] RequestTaskDto taskDto)
     {
         return await Service.AGVIsNeedRelocationAsync(taskDto);
     }
 
-    [HttpPost, AllowAnonymous, Route("SendERPTaskCompletion")]
-    [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })]
-    public Task<WebResponseContent> ERPAllocate(string palletCode)
+    [HttpPost, AllowAnonymous, Route("GetTaskData")]
+    public async Task<WebResponseContent> GetTaskData()
     {
-        return Service.ERPAllocate(palletCode);
+        return await Service.GetTaskData();
+    }
+
+    [HttpPost, AllowAnonymous, Route("UpdateStartLocationInfo")]
+    public async Task<WebResponseContent> UpdateStartLocationInfo([FromBody]Dt_Task task)
+    {
+        return await Service.UpdateStartLocationInfo(task);
+    }
+    [HttpPost,HttpGet, AllowAnonymous, Route("RequestLocation")]
+    public Task<WebResponseContent> RequestLocation(string palletCode)
+    {
+        return Service.RequestLocation(palletCode);
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3