Skip to content

Instantly share code, notes, and snippets.

@HelloThisIsFlo
Created January 26, 2017 08:38
Show Gist options
  • Save HelloThisIsFlo/7105c2ebc581d2044dea525c5ad279ac to your computer and use it in GitHub Desktop.
Save HelloThisIsFlo/7105c2ebc581d2044dea525c5ad279ac to your computer and use it in GitHub Desktop.
@RequestMapping("/itinerarySelection")
public String showItinerarySelection(Request request, Model model) {
// Retrieve ID (Here stored with the client)
String trackingId = request.getParameter("trackingId");
//////////////////////////////////
// Query the Application layer //
//////////////////////////////////
List<RouteCandidate> routeCandidates =
bookingService.requestPossibleRoutesForCargo(trackingId);
CargoRouting cargo =
bookingService.findCargoRoutingInformations(trackingId);
////////////////////////
// Format the result //
////////////////////////
routeCandidatesDTOs = assembler.toDTO(routeCandidates)
cargoDTO = assembler.toDTO(cargo)
model.put("routeCandidates", routeCandidatesDTOs);
model.put("cargo", cargoDTO);
return "templates/admin/selectItinerary";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment