How can I level the joists and ceiling?
Sistering is a common approach to this situation. However, if it's a multiple-floor building, you should have an engineer involved to make sure that the footings in the basement are now sufficient and that the repairs will properly carry the weight of all the floors. You will also need to figure out how to deal with the internal walls on each of the floors.

To answer your specific question, gluing the joists together and holding them together with bolts is the common approach.