From 5e851678cc02257bbbd179446de36082430ca5bc Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期一, 13 四月 2026 15:12:04 +0800
Subject: [PATCH] feat(MES): 添加Mes_Log扩展逻辑

---
 Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
index e5332e1..a3e0f16 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
@@ -81,6 +81,7 @@
 builder.Services.AddDbSetup(); // Db 鏁版嵁搴撻厤缃�
 builder.Services.AddInitializationHostServiceSetup(); // 搴旂敤绋嬪簭鍒濆鍖栨湇鍔℃敞鍐�
 builder.Services.AddHostedService<AutoOutboundTaskBackgroundService>();  // 鍚姩鑷姩鍑哄簱浠诲姟鍚庡彴鏈嶅姟
+builder.Services.AddHostedService<StockMonitorBackgroundService>();  // 鍚姩搴撳瓨鐩戞帶鍚庡彴鏈嶅姟
 // builder.Services.AddHostedService<PermissionDataHostService>(); // 鏉冮檺鏁版嵁鏈嶅姟
 builder.Services.AddAutoMapperSetup();
 
@@ -98,6 +99,8 @@
     options.Filters.Add(typeof(ApiAuthorizeFilter));
     options.Filters.Add(typeof(ActionExecuteFilter));
 });
+
+builder.Services.AddSignalR();
 
 builder.Services.AddScoped<HttpClientHelper>();
 
@@ -174,4 +177,6 @@
 
 app.MapControllers();
 
+app.MapHub<WIDESEA_WMSServer.Hubs.StockHub>("/stockHub");
+
 app.Run();

--
Gitblit v1.9.3