finish api for dept info
Update database