| | |
| | | return Db.Queryable<Dt_StockInfo>().Where(x => x.MaterielCode == materielCode).ToList(); |
| | | } |
| | | |
| | | public List<Dt_StockInfo> GetStockInfos(string materielCode, string lotNo, List<string> locationCodes) |
| | | public List<Dt_StockInfo> GetStockInfos(int materielId,decimal width, List<string> locationCodes) |
| | | { |
| | | List<Dt_StockInfo> stockInfos = null; |
| | | if (!string.IsNullOrEmpty(lotNo)) |
| | | { |
| | | var stockSort = Db.Queryable<Dt_StockInfo>().Where(x => locationCodes.Contains(x.LocationCode) && x.MaterielCode == materielCode && x.BatchNo == lotNo).ToList(); |
| | | } |
| | | else |
| | | { |
| | | var stockSort = Db.Queryable<Dt_StockInfo>().Where(x => locationCodes.Contains(x.LocationCode) && x.MaterielCode == materielCode).ToList(); |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | |