| | |
| | | /// </summary> |
| | | /// <param name="warehouseId"></param> |
| | | /// <returns></returns> |
| | | public List<string> GetCanOutLocationCodes(int warehouseId) |
| | | public List<string> GetCanOutLocationCodes(List<Dt_Warehouse> warehouse) |
| | | { |
| | | return QueryData(x => x.LocationCode, x => x.WarehouseId == warehouseId && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())).Distinct().ToList(); |
| | | var warehouseIds = warehouse.Select(x => x.WarehouseId).ToList(); |
| | | return QueryData(x => x.LocationCode, |
| | | x => warehouseIds.Contains(x.WarehouseId) && |
| | | x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && |
| | | (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || |
| | | x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())) |
| | | .Distinct() |
| | | .ToList(); |
| | | } |
| | | |
| | | |