A railway worker who crashed his van after having a “couple of pints” with colleagues has lost his licence.