It is very common these days. Last year a pitcher from Southern California was hurt, everyone knew it, and he was selected in the 1st round by the Nationals. Actually paid more than his slot to sign. He has since had TJ surgery. The Nationals pretty much were sure that would be needed when they drafted him.
The late Nick Adenhart had TJ surgery before the draft several years ago. It did drop him out of the first round at that time, but he signed for first round money.
So much depends on what they see before the surgery. If they like that enough, the surgery won't stop them from drafting the player. It's not a plus, but it is not the issue it once was.
There are free agents signing large contracts after they had TJ surgery these days. It doesn't scare away the organizations like it used to.
Best of luck