From a0194deab4b4f19183f7b596bf5f9e3bb8a15ec9 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期三, 05 三月 2025 17:28:06 +0800
Subject: [PATCH] 1

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs"
index 89f653a..4b4eb9a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs"
@@ -1,4 +1,5 @@
-锘縰sing Microsoft.AspNetCore.Authorization;
+锘縰sing HslCommunication.WebSocket;
+using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc;
 using WIDESEAWCS_Core;
@@ -16,11 +17,13 @@
     {
         private readonly IHttpContextAccessor _httpContextAccessor;
         private readonly IRouterExtension _routerExtension;
+        //private readonly WebSocketServer _webSocketServer;
 
-        public TaskController(ITaskService service, IHttpContextAccessor httpContextAccessor, IRouterExtension routerExtension) : base(service)
+        public TaskController(ITaskService service, IHttpContextAccessor httpContextAccessor, IRouterExtension routerExtension/*, WebSocketServer webSocketServer*/) : base(service)
         {
             _httpContextAccessor = httpContextAccessor;
             _routerExtension = routerExtension;
+            //_webSocketServer = webSocketServer;
         }
 
         [HttpPost, Route("ReceiveTask"), AllowAnonymous]
@@ -69,10 +72,25 @@
         {
             return Service.SendSecureReplyToAgv(taskNum);
         }
+
         [HttpPost, HttpGet, Route("GetRouteEndPoint"), AllowAnonymous]
         public WebResponseContent GetRouteEndPoint(string startPoint, int routeType)
         {
             return WebResponseContent.Instance.OK(data: _routerExtension.GetEndPoint(startPoint, routeType));
         }
+
+        //[HttpPost, HttpGet, Route("WebSocketPushMessage"), AllowAnonymous]
+        //public WebResponseContent WebSocketPushMessage(string message)
+        //{
+        //    try
+        //    {
+        //         _webSocketServer.PublishAllClientPayload(message);
+        //        return WebResponseContent.Instance.OK();
+        //    }
+        //    catch(Exception ex)
+        //    {
+        //        return WebResponseContent.Instance.Error(ex.Message);
+        //    }
+        //}
     }
 }

--
Gitblit v1.9.3