Here is an official gov.cn page (in English) showing the restrictions:
So the currency import or export of Chinese currency is limited 20,000 CNY butIn addition, if the total of allyou have foreign and CNY is more thancurrency exceeding USD 5000 you need to fill out some paperwork (and retain a copy so you can remove whatever of that money you may still have when you leave, if it adds up to more than $5,000 USD including the CNY you are taking out).
In practice nobody checks anybody's pockets or money belts, but 20,000 CNY is quite a stack of cash (biggest note being 100 CNY) and all bags are X-rayed at customs (very rarely do they ask to have a look inside though) so if you've got a suitcase stuffed with cash they may well find it.