function update

add function about generate coding by database