From 37454e625df68d40897112b2e8c2e3cf4d7163e3 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期三, 25 三月 2026 11:43:10 +0800
Subject: [PATCH] 1

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs"
index 8152876..02c9b08 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs"
@@ -30,7 +30,6 @@
 using WIDESEA_DTO.Quartz;
 using WIDESEA_WMSServer;
 using WIDESEA_WMSServer.Filter;
-using WIDESEA_WMSServer.Jobs;
 using WIDESEAWCS_Core.LogHelper;
 
 var builder = WebApplication.CreateBuilder(args);
@@ -188,6 +187,8 @@
 });
 builder.Services.AddSingleton<IJobFactory, JobFactory>();
 builder.Services.AddTransient<AgvTaskJob>();//Job使用瞬时依赖注入
+builder.Services.AddTransient<InventoryLockJob>();//Job使用瞬时依赖注入
+builder.Services.AddTransient<ErpJob>();//Job使用瞬时依赖注入
 builder.Services.AddSingleton<ISchedulerCenter, SchedulerCenterServer>();
 
 builder.Services.AddQuartz(q =>
@@ -202,13 +203,13 @@
         .WithIdentity("ErpJob-trigger")
         .WithCronSchedule("0 0 10,14,20 * * ?"));
 
-    var inventoryLockJobKey = new JobKey("InventoryLockJob");
-    q.AddJob<InventoryLockJob>(opts => opts.WithIdentity(inventoryLockJobKey));
+    //var inventoryLockJobKey = new JobKey("InventoryLockJob");
+    //q.AddJob<InventoryLockJob>(opts => opts.WithIdentity(inventoryLockJobKey));
 
-    q.AddTrigger(opts => opts
-        .ForJob(inventoryLockJobKey)
-        .WithIdentity("InventoryLockJob-trigger")
-        .WithCronSchedule("0 0/10 * * * ?")); // 每10分钟执行一次
+    //q.AddTrigger(opts => opts
+    //    .ForJob(inventoryLockJobKey)
+    //    .WithIdentity("InventoryLockJob-trigger")
+    //    .WithCronSchedule("0 0/10 * * * ?")); // 每10分钟执行一次
 });
 
 builder.Services.AddQuartzHostedService(q => q.WaitForJobsToComplete = true);

--
Gitblit v1.9.3