Solution of quantum integrable systems from quiver gauge theories