From 6861434f1445d1685b67a24897890c34f8c54f85 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期三, 08 四月 2026 17:22:26 +0800
Subject: [PATCH] WCS&WMS代码更新

---
 代码管理/WMS/WMSServices/WIDESEA_StockRepository/StockInfoRepository.cs |   59 +++++------------------------------------------------------
 1 files changed, 5 insertions(+), 54 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMSServices/WIDESEA_StockRepository/StockInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMSServices/WIDESEA_StockRepository/StockInfoRepository.cs"
index 58a4196..c7f8597 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMSServices/WIDESEA_StockRepository/StockInfoRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMSServices/WIDESEA_StockRepository/StockInfoRepository.cs"
@@ -1,16 +1,9 @@
-锘縰sing Org.BouncyCastle.Crypto;
-using SqlSugar;
-using SqlSugar.Extensions;
-using System;
+锘縰sing System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
-using WIDESEA_Common.LocationEnum;
-using WIDESEA_Common.StockEnum;
 using WIDESEA_Core.BaseRepository;
-using WIDESEA_Core.Enums;
-using WIDESEA_DTO.Stock;
 using WIDESEA_IBasicRepository;
 using WIDESEA_IStockRepository;
 using WIDESEA_Model.Models;
@@ -19,52 +12,10 @@
 {
     public class StockInfoRepository : RepositoryBase<Dt_StockInfo>, IStockInfoRepository
     {
-        public StockInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
+        private readonly IBasicRepository _basicRepository;
+        public StockInfoRepository(IUnitOfWorkManage unitOfWorkManage, IBasicRepository basicRepository) : base(unitOfWorkManage)
         {
-        }
-        public Dt_StockInfo GetStockInfo(string palletCode)
-        {
-            return Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).First();
-        }
-
-        public List<Dt_StockInfo> GetStockInfos(string materielCode)
-        {
-            return Db.Queryable<Dt_StockInfo>().Where(x => x.MaterielCode == materielCode).ToList();
-        }
-
-        public List<Dt_StockInfo> GetStockInfos(int materielId,decimal width,  List<string> locationCodes)
-        {
-            List<Dt_StockInfo> stockInfos = Db.Queryable<Dt_StockInfo>().Where(x => locationCodes.Contains(x.LocationCode) && x.MaterielId == materielId && x.MaterielWide==width && x.StockOutLength<=0).OrderBy(x=>x.CreateDate).ToList();
-            return stockInfos;
-        }
-        /// <summary>
-        /// 鑾峰彇鐢熺鍙娇鐢ㄥ簱瀛�
-        /// </summary>
-        public List<Dt_StockInfo> GetStockInfos(string materielCode, decimal width, List<string> locationCodes)
-        {
-            List<Dt_StockInfo> stockInfos = Db.Queryable<Dt_StockInfo>().Where(x => locationCodes.Contains(x.LocationCode) && x.MaterielCode.StartsWith(materielCode) && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt() && x.MaterielWide == width && x.StockOutLength <= 0 && x.StockLength > 0).OrderBy(x => x.CreateDate).ToList();
-            return stockInfos;
-        }
-
-        public List<Dt_StockInfo> GetStockInfos(string materielCode,  List<string> locationCodes)
-        {
-            List<Dt_StockInfo> stockInfos = Db.Queryable<Dt_StockInfo>().Where(x => locationCodes.Contains(x.LocationCode) && x.MaterielCode == materielCode && x.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt() && x.StockOutLength <= 0 && x.StockLength > 0).OrderBy(x => x.CreateDate).ToList();
-            return stockInfos;
-        }
-
-        public List<Dt_StockInfo> GetStockInfosByIds(List<int> ids)
-        {
-            return Db.Queryable<Dt_StockInfo>().Where(x => ids.Contains(x.Id)).ToList();
-        }
-
-        public List<Dt_StockInfo> GetStockInfosByPalletCodes(List<string> palletCodes)
-        {
-            return Db.Queryable<Dt_StockInfo>().Where(x => palletCodes.Contains(x.PalletCode)).ToList();
-        }
-
-        public List<Dt_StockInfo> GetStockInfosExclude(string materielCode, List<string> palletCodes)
-        {
-            return Db.Queryable<Dt_StockInfo>().Where(x => !palletCodes.Contains(x.PalletCode) && x.MaterielCode == materielCode).ToList();
+            _basicRepository = basicRepository;
         }
     }
-}
+}
\ No newline at end of file

--
Gitblit v1.9.3