@RequestMapping(value = "/staff/occupancy/{id}", method = RequestMethod.GET)
 public @ResponseBody ResponseEntity<?> getOcc(@PathVariable("id") long id) {
   return new ResponseEntity<>(occupancyservice.findItinary(id), HttpStatus.OK);
 }
  // try this http://localhost:8080/room/report?date=2015-11-24
  @RequestMapping(value = "/staff/report", method = RequestMethod.GET)
  public @ResponseBody ResponseEntity<?> SearchRoom(
      @RequestParam(value = "date", required = true) Date date) {

    return new ResponseEntity<>(occupancyservice.RoomStatus(date), HttpStatus.OK);
  }
 // create a guest and an itinary first
 // then try
 // http://localhost:8080/staff/occupancy?guestId=1&itinaryId=1&roomId=3&checkinDate=2015-11-22&checkoutDate=2015-11-24
 @RequestMapping(value = "/staff/occupancy", method = RequestMethod.POST)
 public @ResponseBody ResponseEntity<?> createOcc(@RequestBody Occupancy occ) {
   // return new ResponseEntity<>(occupancyservice.createOccupancy(guestId,itiId,roomId,num,
   // inDate,outDate), HttpStatus.OK);}
   return new ResponseEntity<>(occupancyservice.createOccupancy(occ), HttpStatus.OK);
 }
  // try this
  // http://localhost:8080/room/search?checkinDate=2015-11-24&checkoutDate=2015-11-25&roomType=K&roomProp=SMK
  @RequestMapping(value = "/guest/search", method = RequestMethod.POST)
  public @ResponseBody ResponseEntity<?> SearchRoom(@RequestBody Occupancy occupancy) {

    System.out.println("Get room type is " + occupancy.getRoom());
    return new ResponseEntity<>(occupancyservice.searchAvlRoom(occupancy), HttpStatus.OK);
  }