Originally Posted by
Jesus_Phish
There's a timeline which shows the events, remember that the hobbit is one movie of three movies from one book, which is part of a series of four mains books and one other book that contains other stories and goings on.
Timeline
2941 - The year The Hobbit takes place, marked by Bilbo obtaining the One Ring. The Hobbit ends the same year, I won't spoil anything.
2989 - Moria is recolonized
2994 - Moria is destroyed
3001 - The events of The Lord of The Rings begins with Bilbo giving Frodo the One Ring.
Additionally
The dwarves "won" the battle at Morias East gate when they "killed" Azog. They just didn't have the numbers to take Moria back. The company of dwarves you see in the movie are not the last remaining dwarves, but rather the ones who take on the quest led by Thorin. The remaining dwarves live in Rhovanion.