pan
2025-11-30 c100108c13c74ebd99253c4c144b262720b55ecd
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
@@ -186,7 +186,7 @@
        public List<Dt_StockInfo> GetStockInfos(string materielCode, string lotNo, string supplyCode, List<string> locationCodes)
        {
            var query = Db.Queryable<Dt_StockInfo>()
             .Where(x => locationCodes.Contains(x.LocationCode)
             .Where(x => locationCodes.Contains(x.LocationCode) && x.StockStatus==StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt()
             //  && x.StockStatus == (int)StockStatusEmun.姝e父)
             ).Includes(x => x.Details);
@@ -311,9 +311,9 @@
                // 鎵ц鏌ヨ骞舵寜鍏堣繘鍏堝嚭鎺掑簭
                var stocks = stockQuery.ToList()
                    .Where(x => x.Details.Any(d =>
                        d.MaterielCode == materielCode &&
                        d.BatchNo == orderDetail.BatchNo &&
                        d.SupplyCode == orderDetail.SupplyCode &&
                        d.MaterielCode == materielCode &&
                        string.IsNullOrEmpty(orderDetail.BatchNo)?true: d.BatchNo == orderDetail.BatchNo&&
                        string.IsNullOrEmpty(orderDetail.BatchNo)?true:d.SupplyCode == orderDetail.SupplyCode &&
                        d.StockQuantity > d.OutboundQuantity
                    ))
                    .OrderBy(x => x.CreateDate)
@@ -323,8 +323,8 @@
                {
                    var relevantDetails = stock.Details
                        .Where(d => d.MaterielCode == materielCode &&
                                   d.BatchNo == orderDetail.BatchNo &&
                                   d.SupplyCode == orderDetail.SupplyCode &&
                                   string.IsNullOrEmpty(orderDetail.BatchNo) ? true : d.BatchNo == orderDetail.BatchNo &&
                                   string.IsNullOrEmpty(orderDetail.BatchNo) ? true : d.SupplyCode == orderDetail.SupplyCode &&
                                   d.StockQuantity > d.OutboundQuantity)
                        .ToList();