From 419b73ec425d56c4f81283974987d715df8ffb28 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期五, 06 三月 2026 17:21:29 +0800
Subject: [PATCH] fix: 修正仓储方法调用与枚举值使用

---
 Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
index e02e62f..7f03664 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -405,7 +405,7 @@
             {
                 // 1. 鏌ヨ鍒版湡搴撳瓨
                 var expiredStocks = await _stockInfoService.Repository
-                    .QueryAsync(s => s.OutboundDate <= DateTime.Now
+                    .QueryDataAsync(s => s.OutboundDate <= DateTime.Now
                         && s.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.GetHashCode());
 
                 if (expiredStocks == null || !expiredStocks.Any())
@@ -419,7 +419,7 @@
                     if (stock.LocationId > 0)
                     {
                         stock.LocationDetails = await _locationInfoService.Repository
-                            .GetFirstAsync(s => s.Id == stock.LocationId);
+                            .QueryFirstAsync(s => s.Id == stock.LocationId);
                     }
                 }
 
@@ -436,11 +436,11 @@
 
                 // 2. 妫�鏌ュ凡瀛樺湪鐨勪换鍔�
                 var palletCodes = expiredStocks.Select(s => s.PalletCode).ToList();
-                var existingTasks = await Repository.QueryAsync(t =>
+                var existingTasks = await Repository.QueryDataAsync(t =>
                     palletCodes.Contains(t.PalletCode)
                     && (t.TaskStatus == TaskStatusEnum.New.GetHashCode()
-                        || t.TaskStatus == TaskStatusEnum.Executing.GetHashCode()
-                        || t.TaskInStatus == TaskInStatusEnum.InNew.GetHashCode()));
+                        || t.TaskStatus == TaskStatusEnum.SC_Executing.GetHashCode()
+                        || t.TaskStatus == TaskInStatusEnum.InNew.GetHashCode()));
 
                 var processedPallets = existingTasks.Select(t => t.PalletCode).ToHashSet();
 
@@ -494,14 +494,14 @@
                 }
 
                 // 6. 閫氱煡 WCS锛堝紓姝ワ紝涓嶅奖鍝嶄富娴佺▼锛�
-                _ = Task.Run(async () =>
+                _ = Task.Run(() =>
                 {
                     foreach (var task in taskList)
                     {
                         try
                         {
                             var wmstaskDto = _mapper.Map<WMSTaskDTO>(task);
-                            await _httpClientHelper.Post<WebResponseContent>(
+                            _httpClientHelper.Post<WebResponseContent>(
                                 "http://logistics-service/api/logistics/notifyoutbound",
                                 JsonSerializer.Serialize(wmstaskDto));
                         }

--
Gitblit v1.9.3