예제 #1
0
 /**
  * @author zhang.jie 页面跳转-客房列表
  * @param request
  * @return 2015-9-17
  */
 @PolicyJournal(accessLevel = AccessLevel.PRIVATE)
 @RequestMapping("/to_hotelRoom_query")
 public ModelAndView to_hotel_query(HttpServletRequest request, HotelRoomBo hotelRoomBo) {
   ModelAndView mav = new ModelAndView("/hotelroom/to_hotelRoom_query");
   LoginUser user = LoginSessionUtil.getSystemSession(request);
   // 判断当前用户是否为加盟商
   String agentId = null;
   if (user.getAgentId() != null) {
     String id = user.getAgentId().toString();
     hotelRoomBo.setAgentId(id);
     agentId = user.getAgentId().toString();
   }
   String roomTypeId = request.getParameter("roomTypeId");
   if (StringUtils.isNotBlank(roomTypeId)) {
     hotelRoomBo.setId(roomTypeId);
   }
   // 未删除
   hotelRoomBo.setStatus("1");
   // 分页
   Page<List<Map<String, Object>>> page = Page.getPage(request);
   // 分页查询
   hotelRoomService.queryHotelRoomListByConditions(hotelRoomBo, page);
   List<Map<String, Object>> hotelList = hotelRoomService.selectHotelNameByagentId(agentId);
   mav.addObject("hotelList", hotelList);
   mav.addObject("page", page);
   mav.addObject("hotelRoomBo", hotelRoomBo);
   return mav;
 }
예제 #2
0
 /**
  * @author zhang.jie 页面跳转-房态操作查询
  * @param request
  * @return 2015-10-30
  */
 @PolicyJournal(accessLevel = AccessLevel.PRIVATE)
 @RequestMapping("/to_hotelRoomStatus_query")
 public ModelAndView to_hotelRoomStatus_query(
     HttpServletRequest request,
     String hotelName,
     String roomStatus,
     String calendarDate,
     String name) {
   // 分页
   Page<List<Map<String, Object>>> page = Page.getPage(request);
   String agentId = null;
   LoginUser user = LoginSessionUtil.getSystemSession(request);
   if (user.getAgentId() != null) {
     agentId = user.getAgentId().toString();
   }
   // 分页查询
   hotelRoomService.selectRoomStatus(hotelName, roomStatus, calendarDate, name, agentId, page);
   ModelAndView mav = new ModelAndView("/hotelroom/to_hotelRoomStatus_query");
   mav.addObject("page", page);
   return mav;
 }
예제 #3
0
  /**
   * @author zhang.jie 页面跳转-酒店详情修改页面
   * @param request
   * @return 2015-9-21
   */
  @PolicyJournal(accessLevel = AccessLevel.PRIVATE)
  @RequestMapping("/to_roomedit_dialog")
  public ModelAndView to_roomedit_dialog(HttpServletRequest request, String id) {
    String agentId = null;
    // 非商户
    String isAgent = "0";
    LoginUser user = LoginSessionUtil.getSystemSession(request);
    if (user.getAgentId() != null) {
      agentId = user.getAgentId().toString();
      // 商户
      isAgent = "1";
    }
    Page<List<Map<String, Object>>> page = Page.getPage(request);
    List<Map<String, Object>> list1 = hotelRoomService.selectHotelNameByagentId(agentId);
    ModelAndView mav = null;
    if (isAgent.equals("0")) {
      mav = new ModelAndView("/hotelroom/to_room_edit_admin");
    } else if (isAgent.equals("1")) {
      mav = new ModelAndView("/hotelroom/to_room_edit");
    }

    // 根据id查询酒店客房信息
    Map<String, Object> map = this.hotelRoomService.selectHotelRoomByPk(id);
    // 根据客房id查询产品
    HotelRoomPlanBo hotelRoomPlan = new HotelRoomPlanBo();
    hotelRoomPlan.setRoomId(id);
    hotelRoomPlan.setStatus("1");
    List<Map<String, Object>> list =
        this.hotelRoomPlanService.selectHotelRoomPlanByExample(hotelRoomPlan);
    mav.addObject("list", list);
    mav.addObject("planSize", list.size());
    mav.addObject("map", map);
    mav.addObject("list1", list1);
    mav.addObject("isAgent", isAgent);
    return mav;
  }