Non-local residents must meet three conditions at the same time:
First, buy a house in the name of the family. The so-called family means that the buyer is married;
Second, the family has no room in Shanghai;
Third, it can provide proof of paying taxes or social security of 1 year or more in Shanghai within two years before the signing date of the house purchase contract.
If you have a three-year long-term residence permit, you can enjoy the treatment of Shanghai locals and buy a house directly without providing a tax bill.