From 67348f250a1b7970059698002949a5e0a5f3c52f Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期四, 14 八月 2025 08:51:04 +0800 Subject: [PATCH] 上传最新代码 --- 项目代码/WMS/WMSServices/WIDESEA_StockRepository/ProStockInfoRepository.cs | 65 -------------------------------- 1 files changed, 0 insertions(+), 65 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockRepository/ProStockInfoRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockRepository/ProStockInfoRepository.cs" index 2675255..b78cdfd 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockRepository/ProStockInfoRepository.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockRepository/ProStockInfoRepository.cs" @@ -21,70 +21,5 @@ { _basicRepository = basicRepository; } - //鏍规嵁鏄庣粏鏁版嵁鏌ユ壘鍙敤搴撳瓨搴撳瓨 - public List<Dt_ProStockInfo> GetProStocks(Dt_ProOutOrderDetail proOutOrderDetail,List<string> locationInfos) - { - List<Dt_ProStockInfo>? proStockInfos = null; - bool isCanLot= string.IsNullOrEmpty(proOutOrderDetail.PLot); - bool isCanDate = string.IsNullOrEmpty(proOutOrderDetail.DateCode); - bool isCanVer = string.IsNullOrEmpty(proOutOrderDetail.OutSpecifyVer); - ////鍒ゆ柇瀹㈡埛鍑哄叆瑙勫垯 - //Dt_CustomerInfo customerInfo = _basicRepository.CustomerInfoRepository.QueryFirst(x=>x.Code== proOutOrderDetail.Customer); - //if (customerInfo==null) - //{ - // throw new Exception("鏈壘鍒板鎴蜂俊鎭�"); - //} - //if (customerInfo.OutRule==CustomerOutRuleEnum.SaleOrderRule.ObjToInt()) - //{ - // proStockInfos = Db.Queryable<Dt_ProStockInfo>().Where(x => locationInfos.Contains(x.LocationCode) && x.ProStockAttribute == ProStockAttributeEnum.鎴愬搧.ObjToInt()) - // .Includes(x => x.proStockInfoDetails) - // .Where(x => x.proStockInfoDetails - // .Any(v => - // v.SaleOrder==proOutOrderDetail.SaleOrder - // && v.ProductCode == proOutOrderDetail.PCode - // && v.ProductVersion == proOutOrderDetail.PVer - // && (isCanLot ? isCanLot : v.BagNo == proOutOrderDetail.PLot) - // && (isCanDate ? isCanDate : v.DateCode == proOutOrderDetail.DateCode) - // )) - // .ToList(); - //} - //else - //{ - proStockInfos = Db.Queryable<Dt_ProStockInfo>().Where(x => locationInfos.Contains(x.LocationCode) && x.ProStockAttribute == ProStockAttributeEnum.鎴愬搧.ObjToInt()) - .Includes(x => x.proStockInfoDetails) - .Where(x => x.proStockInfoDetails - .Any(v => - v.ProductCode == proOutOrderDetail.PCode - && v.ProductVersion.StartsWith(proOutOrderDetail.PVer.Substring(0,1)) - && (isCanLot ? isCanLot : v.BagNo == proOutOrderDetail.PLot) - && (isCanDate ? isCanDate : v.DateCode == proOutOrderDetail.DateCode) - )) - .ToList(); - //} - proStockInfos = proStockInfos?.OrderBy(x => x.proStockInfoDetails.FirstOrDefault()?.DateCode).ThenBy(x=>x.CreateDate).ThenBy(x=>x.proStockInfoDetails.Sum(x=>x.StockPcsQty)).ToList(); - return proStockInfos; - } - /// <summary> - /// 鑾峰彇MES鎻愬簱搴撳瓨(灏炬暟浠�) - /// </summary> - /// <param name="mesRworkOutboundOrder"></param> - /// <param name="locationInfos"></param> - /// <returns></returns> - public List<Dt_ProStockInfo> GetProStocks(Dt_MesRworkOutboundOrder mesRworkOutboundOrder, List<string> locationInfos) - { - List<Dt_ProStockInfo>? proStockInfos = null; - bool isCanDate = string.IsNullOrEmpty(mesRworkOutboundOrder.DateCode); - proStockInfos = Db.Queryable<Dt_ProStockInfo>().Where(x => locationInfos.Contains(x.LocationCode) && x.ProStockAttribute==ProStockAttributeEnum.灏炬暟.ObjToInt()) - .Includes(x => x.proStockInfoDetails) - .Where(x => x.proStockInfoDetails - .Any(v => v.SaleOrder == mesRworkOutboundOrder.SaleOrder - && v.ProductCode == mesRworkOutboundOrder.ProductCode - && v.ProductVersion == mesRworkOutboundOrder.ProductVersion - && (isCanDate ? isCanDate : v.DateCode == mesRworkOutboundOrder.DateCode) - )) - .ToList(); - proStockInfos = proStockInfos.OrderBy(x => x.proStockInfoDetails.FirstOrDefault()?.DateCode).ThenBy(x => x.proStockInfoDetails.Sum(x => x.StockPcsQty)).ToList(); - return proStockInfos; - } } } -- Gitblit v1.9.3