If you look at it as the trade was Diggs for Jefferson, than the Vikings clearly "won" the trade.
That's not what happened though. Trade was DIggs for draft picks. Getting a top 5 WR for essentially one late first round pick is a clear win for the Bills. Vikings than won the draft with Jefferson falling to them and making a good pick. There was no way to know at the time of the trade that Jefferson would be available.
Regardless of who "won", it ended up working out insanely well for both sides.