From 75f34e9ba2e8b249c96333f3d7936c8968e12ec7 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期三, 11 二月 2026 14:44:12 +0800
Subject: [PATCH] 集成WMS调用与入库任务处理

---
 Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
index 339d933..31d8b0d 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
@@ -1,4 +1,5 @@
 锘縰sing AutoMapper;
+using WIDESEA_Common.StockEnum;
 using WIDESEA_Core.BaseRepository;
 using WIDESEA_Core.BaseServices;
 using WIDESEA_IStockService;
@@ -17,5 +18,43 @@
             _mapper = mapper;
         }
 
+        /// <summary>
+        /// 鑾峰彇搴撳瓨淇℃伅鍒楄〃锛堝嚭搴撴棩鏈熷皬浜庡綋鍓嶆椂闂翠笖搴撳瓨鐘舵�佷负鍏ュ簱瀹屾垚鐨勮褰曪級
+        /// </summary>
+        /// <returns></returns>
+        public async Task<List<Dt_StockInfo>> GetStockInfoAsync()
+        {
+            return await BaseDal.QueryDataAsync(x => x.OutboundDate < DateTime.Now && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.GetHashCode());
+        }
+
+        /// <summary>
+        /// 鑾峰彇搴撳瓨淇℃伅鍒楄〃锛堝嚭搴撴棩鏈熷皬浜庡綋鍓嶆椂闂翠笖搴撳瓨鐘舵�佷负鍏ュ簱瀹屾垚鐨勮褰曪紝涓斾粨搴揑D鍖归厤锛�
+        /// </summary>
+        /// <param name="WarehouseId"></param>
+        /// <returns></returns>
+        public async Task<List<Dt_StockInfo>> GetStockInfoAsync(int WarehouseId)
+        {
+            return await BaseDal.QueryDataAsync(x => x.OutboundDate < DateTime.Now && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.GetHashCode() && x.WarehouseId == WarehouseId);
+        }
+
+        /// <summary>
+        /// 鑾峰彇搴撳瓨淇℃伅锛堟牴鎹墭鐩樼爜鏌ヨ锛�
+        /// </summary>
+        /// <param name="PalletCode"></param>
+        /// <returns></returns>
+        public async Task<Dt_StockInfo> GetStockInfoAsync(string PalletCode)
+        {
+            return await BaseDal.QueryFirstAsync(x => x.PalletCode == PalletCode);
+        }
+
+        /// <summary>
+        /// 鏇存柊搴撳瓨鏁版嵁
+        /// </summary>
+        /// <param name="stockInfo"></param>
+        /// <returns></returns>
+        public async Task<bool> UpdateStockAsync(Dt_StockInfo stockInfo)
+        {
+            return await BaseDal.UpdateDataAsync(stockInfo);
+        }
     }
 }

--
Gitblit v1.9.3