From e7cf443b37f8f4d8a1bc4fe4cd6f058f39e5c7f5 Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期六, 14 十二月 2024 01:15:03 +0800
Subject: [PATCH] 更新

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
similarity index 86%
rename from "\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs"
rename to "\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
index 277cf6c..37f7521 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
@@ -6,7 +6,6 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
-using WIDESEA_Common.StockEnum;
 using WIDESEA_Core;
 using WIDESEA_Core.BaseServices;
 using WIDESEA_Core.Enums;
@@ -23,7 +22,17 @@
 {
     public partial class StockInfoService : ServiceBase<Dt_StockInfo, IStockInfoRepository>, IStockInfoService
     {
-        
+        private readonly IMapper _mapper;
+        private readonly IBasicRepository _basicRepository;
+
+        public IStockInfoRepository Repository => BaseDal;
+
+        public StockInfoService(IStockInfoRepository BaseDal, IMapper mapper, IBasicRepository basicRepository) : base(BaseDal)
+        {
+            _mapper = mapper;
+            _basicRepository = basicRepository;
+        }
+
         public List<Dt_StockInfo> GetOutboundStocks(List<Dt_StockInfo> stockInfos, string materielCode, float needQuantity, out float residueQuantity)
         {
             List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>();
@@ -100,5 +109,12 @@
             residueQuantity = needQuantity;
             return outStocks;
         }
+
+        public List<Dt_StockInfo> GetUseableStocks(string materielCode, int warehoseId)
+        {
+            List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(warehoseId);
+
+            return BaseDal.GetStockInfos(materielCode, locationCodes);
+        }
     }
 }

--
Gitblit v1.9.3