Officials say Shanghai has cut off the community transmission of COVID-19 in all its 16 districts.