From 0b2869539598059704e1d208e2bcb18603b0fe0f Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期五, 01 五月 2026 00:00:30 +0800
Subject: [PATCH] feat(出库时效): 添加出库时效配置功能

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

diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
index 59cbd0a..43e60a1 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
@@ -36,6 +36,7 @@
     hostingContext.Configuration.ConfigureApplication();
     config.Sources.Clear();
     config.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
+    config.AddJsonFile("outbound_time_config.json", optional: true, reloadOnChange: true);
 });
 
 builder.Host.UseSerilog((context, services, loggerConfiguration) =>
@@ -75,12 +76,15 @@
 builder.Services.AddSingleton<RoundRobinService>();
 builder.Services.Configure<AutoOutboundTaskOptions>(
     builder.Configuration.GetSection("AutoOutboundTask"));
+builder.Services.Configure<OutboundTimeConfigOptions>(
+    builder.Configuration.GetSection(OutboundTimeConfigOptions.SectionName));
 builder.Services.AddMemoryCacheSetup(); // 缂撳瓨鏈嶅姟
 builder.Services.AddWebSocketSetup();
 builder.Services.AddSqlsugarSetup(); // SqlSugar 鏁版嵁搴撻厤缃�
 builder.Services.AddDbSetup(); // Db 鏁版嵁搴撻厤缃�
 builder.Services.AddInitializationHostServiceSetup(); // 搴旂敤绋嬪簭鍒濆鍖栨湇鍔℃敞鍐�
 builder.Services.AddHostedService<AutoOutboundTaskBackgroundService>();  // 鍚姩鑷姩鍑哄簱浠诲姟鍚庡彴鏈嶅姟
+builder.Services.AddHostedService<StockMonitorBackgroundService>();  // 鍚姩搴撳瓨鐩戞帶鍚庡彴鏈嶅姟
 // builder.Services.AddHostedService<PermissionDataHostService>(); // 鏉冮檺鏁版嵁鏈嶅姟
 builder.Services.AddAutoMapperSetup();
 

--
Gitblit v1.9.3