| | |
| | | } |
| | | |
| | | //浼樺厛鍑烘弧 |
| | | public List<Dt_StockInfo> PriorityBig(int Num, int Type) |
| | | public List<Dt_StockInfo> PriorityBig(int Num, string Type) |
| | | { |
| | | List<Dt_StockInfo> stockInfo = new List<Dt_StockInfo>(); |
| | | List<Dt_StockInfo> stockInfos = BaseDal.QueryData(x => x.StockType == Type && !x.MaterielCode1.Equals("") && !x.MaterielCode2.Equals("") && !x.MaterielCode3.Equals("") && !x.MaterielCode4.Equals("")).ToList(); |
| | | List<Dt_StockInfo> stockInfos = BaseDal.QueryData(x => x.MaterielName == Type && x.StockStatus == (int)StockStatusEmun.绌洪棽 && !x.MaterielCode1.Equals("") && !x.MaterielCode2.Equals("") && !x.MaterielCode3.Equals("") && !x.MaterielCode4.Equals("")).ToList(); |
| | | //鍒嗛厤鏁伴噺 |
| | | int k = stockInfos.Count(); |
| | | if (k >= Num) |
| | | { |
| | | stockInfo.AddRange(stockInfos.Take(Num)); |
| | | } |
| | | else |
| | | { |
| | | throw new Exception(string.Format("搴撳瓨鏁伴噺涓嶈冻")); |
| | | } |
| | | //閿佸畾搴撳瓨 |
| | | int s = stockInfo.Count() - 1; |
| | |
| | | } |
| | | |
| | | //浼樺厛鍑烘畫 |
| | | public List<Dt_StockInfo> PriorityLittle(int Num, int Type) |
| | | public List<Dt_StockInfo> PriorityLittle(int Num, string Type) |
| | | { |
| | | List<Dt_StockInfo> stockInfo = BaseDal.QueryData(x => x.StockType == Type && x.MaterielCode4.Equals("")).ToList(); |
| | | List<Dt_StockInfo> stockInfo = BaseDal.QueryData(x => x.MaterielName == Type && (x.MaterielCode4.Equals("") || x.MaterielCode4 == null) && x.StockStatus == (int)StockStatusEmun.绌洪棽).ToList(); |
| | | int k = stockInfo.Count(); |
| | | |
| | | //鍒嗛厤鏁伴噺 |
| | |
| | | { |
| | | stockInfo[i].StockStatus = (int)StockStatusEmun.鍑哄簱閿佸畾; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | throw new Exception(string.Format("搴撳瓨鏁伴噺涓嶈冻")); |
| | | } |
| | | |
| | | return stockInfo; |