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/Jobs/InventoryLockJob.cs |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 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/Jobs/InventoryLockJob.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/Jobs/InventoryLockJob.cs"
index 248f47e..ceaea30 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/Jobs/InventoryLockJob.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/Jobs/InventoryLockJob.cs"
@@ -1,22 +1,30 @@
 锘縰sing Quartz;
 using SqlSugar;
+using SqlSugar.Extensions;
+using WIDESEA_Common.StockEnum;
+using WIDESEA_Model.Models;
+using WIDESEA_Model.Models.Basic;
 
-namespace WIDESEA_WMSServer.Jobs
+namespace WIDESEA_WMSServer
 {
     [DisallowConcurrentExecution]
     public class InventoryLockJob : IJob
     {
-        private readonly ILogger<ErpJob> _logger;
         private readonly ISqlSugarClient _db;
-        public InventoryLockJob(ILogger<ErpJob> logger, ISqlSugarClient db )
+        public InventoryLockJob(ISqlSugarClient db)
         {
-            _logger = logger;
             _db = db;
-      
         }
         public Task Execute(IJobExecutionContext context)
         {
-           return Task.CompletedTask;
+            string updateStatusSql = @"
+                                        UPDATE Dt_StockInfoDetail
+                                        SET Status = 98
+                                        WHERE  ValidDate IS NOT NULL AND ValidDate < GETDATE()
+                                        AND Status = 6";
+            int updateStatusResult = _db.Ado.ExecuteCommand(updateStatusSql);
+
+            return Task.CompletedTask;
         }
     }
 }

--
Gitblit v1.9.3