A growing influx of migrants is causing the China to draft its first-ever immigration legislation to control the number of foreigners coming to work in the country.