We generalize the electric-magnetic (EM) duality in the quantum double (QD) models to the extended QD models of topological orders with gapped boundaries. We also map the extended QD models to the extended Levin-Wen (LW) models with gapped boundaries. To this end, we Fourier-transform and rewrite the extended QD model on a trivalent lattice with a boundary, where the bulk gauge group is a finite group G. Gapped boundary conditions of the model before the transformation are known to be characterized by the subgroups K ⊆ G supplying the boundary degrees of freedom. We find that after the transformation, the boundary conditions are then characterized by the Frobenius algebras AG,K in RepG. An AG,K is the dual space of the quotient of the group algebra of G over that of K , and RepG is the category of the representations of G. The EM duality on the boundary is revealed by mapping the K ’s to AG,K ’s. We also show that our transformed extended QD model can be mapped to an extended LW model on the same lattice via enlarging the Hilbert space of the latter. Moreover, our transformed extended QD model elucidates the phenomenon of anyon splitting in anyon condensation.