From ce1292c9cf37195b6abd2699dfc5d6cb3e143c9b Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期日, 12 四月 2026 23:38:19 +0800
Subject: [PATCH] feat(MES): 添加MES接口相关实体和DTO JS扩展文件至JSX格式并更新配置

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs
index 7ec833f..9bd9909 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs
@@ -1,6 +1,7 @@
 锘縰sing Autofac;
 using Autofac.Core;
 using Autofac.Extensions.DependencyInjection;
+using Magicodes.ExporterAndImporter.Excel.Utility.TemplateExport;
 using Microsoft.AspNetCore.Builder;
 using Microsoft.AspNetCore.Mvc.Controllers;
 using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
@@ -27,10 +28,10 @@
 using WIDESEAWCS_QuartzJob;
 using WIDESEAWCS_QuartzJob.QuartzExtensions;
 using WIDESEAWCS_QuartzJob.Seed;
+using WIDESEAWCS_RedisService.Extensions;
 using WIDESEAWCS_Server.Filter;
 using WIDESEAWCS_Server.HostedService;
 using WIDESEAWCS_Tasks.SocketServer;
-using WIDESEAWCS_RedisService.Extensions;
 using WIDESEAWCS_WCSServer.Filter;
 
 var builder = WebApplication.CreateBuilder(args);
@@ -45,18 +46,24 @@
         .ReadFrom.Configuration(context.Configuration) // 浠庡簲鐢ㄧ▼搴忛厤缃腑璇诲彇Serilog鐩稿叧璁剧疆锛堝appsettings.json锛�
         .ReadFrom.Services(services)  // 浠庝緷璧栨敞鍏ュ鍣ㄤ腑璇诲彇鏈嶅姟閰嶇疆锛屽厑璁稿湪閰嶇疆涓娇鐢ㄥ凡娉ㄥ唽鐨勬湇鍔�
         .Enrich.FromLogContext()  // 鍚敤鏃ュ織涓婁笅鏂囷紝鍙互鍦ㄦ棩蹇椾腑鍖呭惈濡傝姹侷D銆佺敤鎴稩D绛夊姩鎬佸睘鎬�
-
+        .Enrich.WithProperty("Application", "WCS")
         // 璁剧疆Microsoft鍛藉悕绌洪棿鐨勬棩蹇楃骇鍒负Information
         // 杩欐牱鍙互鍑忓皯Microsoft妗嗘灦鏈韩鐨勮缁嗘棩蹇楋紝閬垮厤杩囧鐨凞ebug鏃ュ織
         .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
         .WriteTo.Console()  // 娣诲姞鎺у埗鍙拌緭鍑烘帴鏀跺櫒锛屾棩蹇楀皢鏄剧ず鍦ㄦ帶鍒跺彴绐楀彛涓�
-        // 娣诲姞鏂囦欢杈撳嚭鎺ユ敹鍣紝灏嗘棩蹇楀啓鍏ユ枃浠剁郴缁�
+                            // 娣诲姞鏂囦欢杈撳嚭鎺ユ敹鍣紝灏嗘棩蹇楀啓鍏ユ枃浠剁郴缁�
         .WriteTo.File(
             /*Path.Combine(AppContext.BaseDirectory, "Logs", "serilog-.log"),*/  // 鎸囧畾鏃ュ織鏂囦欢鐨勫畬鏁磋矾寰勶細搴旂敤绋嬪簭鐩綍 + "Log"鏂囦欢澶� + "serilog-鏃ユ湡.log"
             "logs/serilog-.log",
-            rollingInterval: RollingInterval.Day,  // 璁剧疆鏃ュ織鏂囦欢鎸夊ぉ婊氬姩锛屾瘡澶╃敓鎴愪竴涓柊鐨勬棩蹇楁枃浠�
+            rollingInterval: RollingInterval.Day,  // 璁剧疆鏃ュ織鏂囦欢鎸夊ぉ婊氬姩锛屾瘡澶╃敓鎴愪竴涓柊鐨勬棩蹇楁枃浠�  U1od4UGVsIKZG39S5Yak
             retainedFileCountLimit: 30,  // 鏈�澶氫繚鐣欐渶杩�30澶╃殑鏃ュ織鏂囦欢锛岃秴杩�30澶╃殑鏂囦欢浼氳嚜鍔ㄥ垹闄�
-            shared: true);  // 鍏佽澶氫釜杩涚▼鍚屾椂鍐欏叆鍚屼竴涓棩蹇楁枃浠讹紝閫傜敤浜庡瀹炰緥閮ㄧ讲鍦烘櫙
+            shared: true)  // 鍏佽澶氫釜杩涚▼鍚屾椂鍐欏叆鍚屼竴涓棩蹇楁枃浠讹紝閫傜敤浜庡瀹炰緥閮ㄧ讲鍦烘櫙
+        .WriteTo.Seq(
+                 serverUrl: "http://localhost:5341",
+                 apiKey: "U1od4UGVsIKZG39S5Yak", // 濡係eq闇�瑕丄piKey鍒欓厤缃湡瀹炲瘑閽�
+                 batchPostingLimit: 1000, // 鎵归噺鍙戦�佹暟閲�
+                 period: TimeSpan.FromSeconds(2) // 鍙戦�侀棿闅�
+             );
 });
 
 builder.Host.UseServiceProviderFactory(new AutofacServiceProviderFactory()).ConfigureContainer<ContainerBuilder>(builder =>

--
Gitblit v1.9.3