From 6695afe1e1c478dbb599a1d382d8d6628b456d03 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期六, 18 一月 2025 17:30:49 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
---
代码管理/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