Section 11A. In any city with a population over seventy-five thousand which accepts the provisions of this section, notwithstanding the provisions of section eleven or any other general or special law or ordinance to the contrary, inspectors of plumbing and the inspectors of gasfitting shall be appointed by the mayor, subject to the provisions of chapter thirty-one of the General Laws.