From 85fd548c3948b4ded198f304204e9ce602761edc Mon Sep 17 00:00:00 2001
From: xxyy <cathay_xy@163.com>
Date: 星期一, 10 三月 2025 08:36:21 +0800
Subject: [PATCH] 修复日志输出和更正创建者名称

---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs
index 3a75882..271e0af 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs
@@ -36,7 +36,7 @@
 
         public Task StartAsync(CancellationToken cancellationToken)
         {
-            _timer = new Timer(DoWork, null, TimeSpan.Zero, TimeSpan.FromMinutes(20));
+            _timer = new Timer(DoWork, null, TimeSpan.Zero, TimeSpan.FromMinutes(5));
             return Task.CompletedTask;
         }
 
@@ -51,9 +51,8 @@
                 IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo);
                 List<DtStockInfo> stockInfoList = stockInfos.Values.ToList();
 
-
                 var stockInfo = stockInfoList.Where(x => x.AreaCode == area.AreaCode && x.OutboundTime < DateTime.Now && x.IsFull == true) // 杩囨护鏉′欢
-                     .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID) // 杩囨护鏉′欢
+                     .Where(x => x.LocationInfo != null && x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID) // 杩囨护鏉′欢
                      .OrderBy(x => x.OutboundTime) // 鎺掑簭
                      .ToList(); // 鑾峰彇绗竴涓厓绱�
 
@@ -140,7 +139,7 @@
                 Creater = "System", // 淇鎷煎啓閿欒
                 CreateDate = DateTime.Now,
                 TaskId = 0,
-                ProductionLine= stockInfo.ProductionLine,
+                ProductionLine = stockInfo.ProductionLine,
                 ProcessCode = stockInfo.ProcessCode,
             };
         }

--
Gitblit v1.9.3