From 0cc7b55a04bc96c76e8ac3b02793dff1c69e578a Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期二, 14 四月 2026 15:02:26 +0800
Subject: [PATCH] 1

---
 WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs |   62 ++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+), 1 deletions(-)

diff --git a/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs b/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
index b0c68fc..534f144 100644
--- a/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
+++ b/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
@@ -1,4 +1,5 @@
-锘縰sing HslCommunication.WebSocket;
+锘縰sing Autofac.Core.Resolving.Middleware;
+using HslCommunication.WebSocket;
 using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc;
@@ -100,6 +101,12 @@
         {
             return Service.AgvCarrying(row, startColumn, endColumn, layer, targetLayer);
         }
+
+        [HttpPost, HttpGet, Route("LedShowTask"), AllowAnonymous]
+        public WebResponseContent LedShowTask(string stationCode, string palletCode, int taskType)
+        {
+            return Service.LedShowTask(stationCode,palletCode,taskType);
+        }
         //[HttpPost, HttpGet, Route("WebSocketPushMessage"), AllowAnonymous]
         //public WebResponseContent WebSocketPushMessage(string message)
         //{
@@ -113,6 +120,8 @@
         //        return WebResponseContent.Instance.Error(ex.Message);
         //    }
         //}
+
+
         [HttpPost, HttpGet, Route("RecWMSTaskCompleted"), AllowAnonymous]
         public WebResponseContent RecWMSTaskCompleted(int taskNum)
         {
@@ -173,5 +182,56 @@
                 return WebResponseContent.Instance.Error(ex.Message);
             }
         }
+
+        /// <summary>
+        /// 浠诲姟鎵嬪姩瀹屾垚
+        /// </summary>
+        /// <param name="taskNum"></param>
+        /// <returns></returns>
+        [HttpGet, HttpPost, Route("ManualTaskCompleted"), AllowAnonymous]
+        public async Task<WebResponseContent> ManualTaskCompleted(int taskNum)
+        {
+            return await Service.ManualTaskCompleted(taskNum);
+        }
+
+        /// <summary>
+        /// RGV浠诲姟閲嶅彂
+        /// </summary>
+        /// <param name="taskNum"></param>
+        /// <returns></returns>
+        [HttpGet, HttpPost, Route("RGVTaskResending"), AllowAnonymous]
+        public WebResponseContent RGVTaskResending(int taskNum)
+        {
+            try
+            {
+                Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == taskNum);
+                if(task == null)
+                {
+                    return WebResponseContent.Instance.Error("鏈壘鍒拌浠诲姟淇℃伅");
+                }
+                if (task.TaskState == TaskStatusEnum.RGV_Executing.ObjToInt())
+                {
+                    if (task.TaskType >= TaskTypeEnum.Inbound.ObjToInt())
+                    {
+                        _taskService.UpdateTask(task, TaskStatusEnum.RGV_NEW);
+                    }
+                    else if (task.TaskType >= TaskTypeEnum.Outbound.ObjToInt() && task.TaskType < TaskTypeEnum.Inbound.ObjToInt())
+                    {
+                        _taskService.UpdateTask(task, TaskStatusEnum.RGV_Execute);
+                    }
+                }
+                else
+                {
+                    return WebResponseContent.Instance.Error("闈濺GV鎵ц涓姸鎬�");
+                }
+
+                return WebResponseContent.Instance.OK();
+            }
+            catch(Exception ex)
+            {
+                return WebResponseContent.Instance.Error(ex.Message);
+            }
+        }
+
     }
 }

--
Gitblit v1.9.3