It costs you about 4 hours from Shanghai to Yiwu by train and about 2 hours from Hangzhou to Yiwu by train.