Hastings man takes plea deal in sexual assault case