You are a non-resident for the year if you stayed under 183 days (and have no domicile in China). As a non-resident, you are taxed only on China-sourced income, at the monthly withholding rate table, and no annual reconciliation is required.
Nationwide (all cities)
Resident vs. non-resident
The definition: under the rules in Announcement No. 35 (2019) and the Ministry of Commerce's FDI Guide, a person with no domicile in China who stays in China for fewer than 183 days in a tax year is a non-resident individual. A non-resident is taxed only on income sourced in China, whereas a resident (183 days or more, or domiciled) is taxed on worldwide income.
How a non-resident's tax is calculated
How the tax is calculated for a non-resident: Announcement No. 35 sets the rules. For a non-resident staying up to 90 days, only the part of salary attributable to work in China and paid by a Chinese employer is taxed; staying 90 to 183 days, salary attributable to work in China is taxed (and salary for work abroad is not). The tax on the month's salary is computed by subtracting the statutory deduction from the monthly income and applying the monthly withholding rate table. If your status changed mid-year: the report-and-recalculate rule applies (see the tax settlement question). And a non-resident does not do the annual comprehensive-income reconciliation — that is for residents, who reconcile between March 1 and June 30 of the following year (with certain exemptions).