Gapped boundary theory of the twisted gauge theory model of three-dimensional topological orders