From a2f06e43a6f4ed3c613aefbb8bc0ccf3dd30ff8f Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期五, 26 十二月 2025 13:34:20 +0800
Subject: [PATCH] 1

---
 项目代码/WCSServices/WIDESEAWCS_Server/HostedService/WebSocketSetup.cs |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/HostedService/WebSocketSetup.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/HostedService/WebSocketSetup.cs"
index 383a146..978fed6 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/HostedService/WebSocketSetup.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/HostedService/WebSocketSetup.cs"
@@ -1,5 +1,8 @@
 锘縰sing HslCommunication.WebSocket;
+using RYB_PTL_API;
 using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_DTO;
+using WIDESEAWCS_DTO.TaskInfo;
 
 namespace WIDESEAWCS_Server.HostedService
 {
@@ -26,5 +29,50 @@
                 });
             }
         }
+        /// <summary>
+        ///// 璁㈤槄PTL浜嬩欢
+        ///// </summary>
+        //public static void SubscribeEvent(this IServiceCollection services)
+        //{
+        //    if (!_eventSubscribed)
+        //    {
+        //        RYB_PTL.UserResultAvailable += new RYB_PTL.UserResultAvailableEventHandler(RYB_PTL_UserResultAvailable);
+        //        _eventSubscribed = true;
+        //    }
+        //}
+        ///// <summary>
+        ///// PTL鍥炶皟浜嬩欢澶勭悊锛堝彧澶勭悊鎵嬫媿浜嬩欢锛�
+        ///// </summary>
+        //public static void RYB_PTL_UserResultAvailable(RYB_PTL.RtnValueStruct rs)
+        //{
+        //    try
+        //    {
+        //        if (rs.KeyCode == null)
+        //        {
+        //            return;
+        //        }
+        //        // 鏋勫缓鍥炶皟鏁版嵁
+        //        var pTLCallBackDTO = new PTLCallBackDTO
+        //        {
+        //            sIp = rs.Ip,
+        //            sTagID = rs.Tagid,
+        //            sValue = rs.Number,
+        //            sKeyCode = rs.KeyCode,
+        //            sLocator = rs.Locator
+        //        };
+
+        //        // 鏍规嵁涓氬姟闇�瑕佹瀯寤轰换鍔′俊鎭�
+        //        var taskBackLight = new TaskBackLight()
+        //        {
+        //            TagNo = "B1",
+        //            TagCode = pTLCallBackDTO.sLocator,
+        //        };
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        // 璁板綍鏃ュ織鎴栧鐞嗗紓甯�
+        //        Console.WriteLine($"澶勭悊PTL鎵嬫媿鍥炶皟鏃跺嚭閿�: {ex.Message}");
+        //    }
+        //}
     }
 }

--
Gitblit v1.9.3