Generalized quantum hydrodynamics of a trapped dilute Bose gas