/** 查询二级营销案审核列表 创建日期:2013-11-1下午4:58:48 修改日期: 作者:zhanglu TODO return */
  public HandlerResult queryReservationMarketSecondAuditList(HandlerRequestContext context) {
    HandlerResult result = HandlerResult.newInstance();
    HttpServletRequest request = context.getRequest();
    Map<String, String> param = BeanUtil.getMapFromRequest(request);
    LoginRequestBean loginReqBean = (LoginRequestBean) request.getAttribute("reqParams");
    UserInfoBean userInfoBean = SSOUtil.checkSSOState(loginReqBean, request).getUserInfoBean();
    String city = userInfoBean.getUserAreaCode();
    try {
      Page page = reservationMarketSecondService.queryReservationMarketSecondAuditList(param);

      List<ReservationMarketSecondBean> reservationSecondlist =
          (List<ReservationMarketSecondBean>) page.getRecords();
      List<ReservationMarketSecondBean> newList = new ArrayList<ReservationMarketSecondBean>();
      if (reservationSecondlist != null && reservationSecondlist.size() > 0) {
        for (int i = 0; i < reservationSecondlist.size(); i++) {
          ReservationMarketSecondBean rmsbean =
              (ReservationMarketSecondBean) reservationSecondlist.get(i);
          String verifySate = rmsbean.getVerifyState();
          if ("0".equals(verifySate)) {
            String auditAlink =
                "待审核<a href='javascript:component.updateListView(1);' title='点击审核通过'><img src='../../../resource/img/toggle_enabled.gif'/></a>";
            auditAlink +=
                "<a href='javascript:component.updateListView(2);' title='点击审核不通过'><img src='../../../resource/img/toggle_disabled.gif'/></a>";
            rmsbean.setLinkOper(auditAlink);
          } else if ("1".equals(verifySate)) {
            String auditAlink =
                "审核通过<a href='javascript:component.updateListView(2)' title='点击审核不通过'><img src='../../../resource/img/toggle_disabled.gif'/></a>";
            rmsbean.setLinkOper(auditAlink);
          } else if ("2".equals(verifySate)) {
            String auditAlink =
                "审核不通过<a href='javascript:component.updateListView(1)' title='点击审核通过'><img src='../../../resource/img/toggle_enabled.gif'/></a>";
            rmsbean.setLinkOper(auditAlink);
          }
          String viewOper =
              "<a href='javascript:component.viewOper(\""
                  + rmsbean.getMarketSecondPkId()
                  + "\",\""
                  + rmsbean.getMarketFirstName()
                  + "\")'; title='点击查看详细信息'>预览</a>";
          rmsbean.setViewOper(viewOper);
          newList.add(rmsbean);
        }
        page.setRecords(newList);
      }

      result.setRetObj(page);
      result.setRetCode(IResultCode.SYS_SUCCESS);
    } catch (Exception e) {
      e.printStackTrace();
      result.setRetCode(IResultCode.SYS_FAILED);
    }
    return result;
  }
Exemple #2
0
  /**
   * 根据品牌代码查询单一品牌
   *
   * @param context
   * @return
   */
  public HandlerResult queryOneBrand(HandlerRequestContext context) {

    HandlerResult result = HandlerResult.newInstance();
    HttpServletRequest request = context.getRequest();
    String brandNum = RequestUtil.getString(request, "pkid");
    try {
      BrandBean brandBean = brandService.queryOneBrand(brandNum);
      result.setRetObj(brandBean);
      result.setRetCode(IResultCode.SYS_SUCCESS);
    } catch (Exception e) {
      result.setRetCode(IResultCode.SYS_FAILED);
    }
    return result;
  }
Exemple #3
0
  /**
   * 品牌查询
   *
   * @param context brandName,brandNum,jb
   * @return
   * @author zhangel
   */
  public HandlerResult queryBrandList(HandlerRequestContext context) {
    HandlerResult result = HandlerResult.newInstance();
    HttpServletRequest request = context.getRequest();
    Map<String, String> param = BeanUtil.getMapFromRequest(request);

    try {
      Page page = brandService.queryBrandList(param);
      result.setRetObj(page);
      result.setRetCode(IResultCode.SYS_SUCCESS);
    } catch (Exception e) {
      result.setRetCode(IResultCode.SYS_FAILED);
    }
    return result;
  }
  /**
   * 省级、地市审核列表 创建日期:2013-12-17下午7:57:59 修改日期: 作者:zhanglu
   *
   * @param:
   * @return:HandlerResult
   */
  public HandlerResult queryMarketSecondForVerify(HandlerRequestContext context) {
    HandlerResult result = HandlerResult.newInstance();
    HttpServletRequest request = context.getRequest();
    Map<String, String> param = BeanUtil.getMapFromRequest(request);
    LoginRequestBean loginReqBean = (LoginRequestBean) request.getAttribute("reqParams");
    UserInfoBean userInfoBean = SSOUtil.checkSSOState(loginReqBean, request).getUserInfoBean();

    String city = userInfoBean.getUserAreaCode();
    if (StringUtil.isNull(city)) {
      //			city = userInfoBean.getUserAreaCode();
    }
    if ("0".equals(city)) { // 0 为江苏省
      city = "";
      param.put("proManager", "1");
    } else {
      param.put("cityManager", "1");
    }
    //		param.put("city", city);
    String channelNum = userInfoBean.getChannelNum();
    if (channelNum != null && !"".equals(channelNum)) {
      // 掌厅
      if ("02".equals(channelNum)) {
        channelNum = "5";
      }
      // 网厅
      if ("01".equals(channelNum)) {
        channelNum = "4";
      }
      // 短厅
      if ("03".equals(channelNum)) {
        channelNum = "6";
      }
      // 全渠道
      if ("0".equals(channelNum)) {
        channelNum = param.get("channalData");
      }
      param.put("channalData", channelNum);
    }
    try {
      Page page = reservationMarketSecondService.queryMarketForAudit(param);
      result.setRetObj(page);
      result.setRetCode(IResultCode.SYS_SUCCESS);
      result.setSysCode(SystemCodeConstants.QUERY_INFO_SUCCEED);
    } catch (Exception e) {
      e.printStackTrace();
      result.setRetCode(IResultCode.SYS_FAILED);
      result.setSysCode(SystemCodeConstants.QUERY_INFO_ERROR);
    }
    return result;
  }
 /** 查询某一个二级预约营销案 创建日期:2013-10-30下午7:26:39 修改日期: 作者:zhanglu TODO return */
 public HandlerResult queryReservationMarketSecondByPkid(HandlerRequestContext context) {
   HandlerResult result = HandlerResult.newInstance();
   HttpServletRequest request = context.getRequest();
   String marketSecondPkid = request.getParameter("marketSecondPkid");
   try {
     ReservationMarketSecondBean reservationMarketSecondBean =
         reservationMarketSecondService.queryReservationMarketSecondByPkid(marketSecondPkid);
     result.setRetObj(reservationMarketSecondBean);
     result.setRetCode(IResultCode.SYS_SUCCESS);
   } catch (Exception e) {
     // TODO: handle exception
     result.setRetCode(IResultCode.SYS_FAILED);
   }
   return result;
 }
Exemple #6
0
  /**
   * 品牌查询 brandName,brandNum,jb(可传入以","分开的jb)
   *
   * @param context
   * @return
   * @author zhangel
   */
  public HandlerResult queryBrandListEx(HandlerRequestContext context) {
    HandlerResult result = HandlerResult.newInstance();
    HttpServletRequest request = context.getRequest();
    Map<String, Object> param = BeanUtil.getMapFromRequestAdn(request);

    try {
      String jb = (String) param.get("jb");
      if (StringUtils.isNotBlank(jb)) {
        param.put("jb", jb.split(","));
      }
      List<BrandBean> brandBeans = brandService.queryBrandListEx(param);
      result.setRetObj(brandBeans);
      result.setRetCode(IResultCode.SYS_SUCCESS);
    } catch (Exception e) {
      result.setRetCode(IResultCode.SYS_FAILED);
    }
    return result;
  }
Exemple #7
0
  /**
   * 查询某楼层可用的楼层方案信息 创建日期:2013-11-27下午2:50:58 修改日期: 作者:zhanglu
   *
   * @param:
   * @return:HandlerResult
   */
  public HandlerResult queryUseableFloorFa(HandlerRequestContext context) {
    HandlerResult result = HandlerResult.newInstance();
    HttpServletRequest request = context.getRequest();
    String floorId = request.getParameter("floorId");

    try {
      FloorFaBean floorFaBean = floorFaService.queryFloorFaByFloorId(floorId);
      result.setRetObj(floorFaBean);
      result.setRetCode(IResultCode.SYS_SUCCESS);
      result.setSysCode(SystemCodeConstants.QUERY_INFO_SUCCEED);
    } catch (Exception e) {
      // TODO: handle exception
      e.printStackTrace();
      result.setRetCode(IResultCode.SYS_FAILED);
      result.setSysCode(SystemCodeConstants.QUERY_INFO_FAILED);
    }
    return result;
  }
Exemple #8
0
  /**
   * 根据主键查看楼层方案 创建日期:2013-11-26下午6:42:32 修改日期: 作者:zhanglu
   *
   * @param:
   * @return:HandlerResult
   */
  public HandlerResult queryFloorPlanByPkId(HandlerRequestContext context) {
    HandlerResult result = HandlerResult.newInstance();
    HttpServletRequest request = context.getRequest();
    String planId = request.getParameter("planId");

    try {
      List<FloorPlanBean> floorPlanBeanList = floorPlanService.queryFloorPlanByPk(planId);
      result.setRetObj(floorPlanBeanList);
      result.setRetCode(IResultCode.SYS_SUCCESS);
      result.setSysCode(SystemCodeConstants.QUERY_INFO_SUCCEED);
    } catch (Exception e) {
      // TODO: handle exception
      e.printStackTrace();
      result.setRetCode(IResultCode.SYS_FAILED);
      result.setSysCode(SystemCodeConstants.QUERY_INFO_FAILED);
    }
    return result;
  }
 /** 根据一级预约营销案查询二级 创建日期:2013-10-25下午5:51:20 修改日期: 作者:zhanglu TODO return */
 public HandlerResult queryReservationMarketSecondList(HandlerRequestContext context) {
   HandlerResult result = HandlerResult.newInstance();
   HttpServletRequest request = context.getRequest();
   Map<String, String> param = BeanUtil.getMapFromRequest(request);
   LoginRequestBean loginReqBean = (LoginRequestBean) request.getAttribute("reqParams");
   UserInfoBean userInfoBean = SSOUtil.checkSSOState(loginReqBean, request).getUserInfoBean();
   String city = userInfoBean.getUserAreaCode();
   param.put("city", city);
   // 查询有效的,即未删除的营销案
   param.put("state", "1");
   try {
     Page page = reservationMarketSecondService.queryReservationMarketSecondList(param);
     List<ReservationMarketSecondBean> reservationSecondlist =
         (List<ReservationMarketSecondBean>) page.getRecords();
     List<ReservationMarketSecondBean> newList = new ArrayList<ReservationMarketSecondBean>();
     if (reservationSecondlist != null && reservationSecondlist.size() > 0) {
       for (int i = 0; i < reservationSecondlist.size(); i++) {
         ReservationMarketSecondBean rmsbean =
             (ReservationMarketSecondBean) reservationSecondlist.get(i);
         String isViewList = rmsbean.getIsListView();
         if ("0".equals(isViewList)) {
           String isViewAlink =
               "<a href='javascript:component.updateListView();' title='点击更新为在列表中展示'>未展示<img src='../../../resource/img/toggle_enabled.gif'/></a>";
           rmsbean.setLinkOper(isViewAlink);
         } else {
           String isViewAlink =
               "<a href='javascript:component.updateListView()' title='点击更新为在列表中不展示'>展示<img src='../../../resource/img/toggle_disabled.gif'/></a>";
           rmsbean.setLinkOper(isViewAlink);
         }
         newList.add(rmsbean);
       }
       page.setRecords(newList);
     }
     result.setRetObj(page);
     result.setRetCode(IResultCode.SYS_SUCCESS);
   } catch (Exception e) {
     e.printStackTrace();
     result.setRetCode(IResultCode.SYS_FAILED);
   }
   return result;
 }
Exemple #10
0
 /**
  * 查询楼层方案信息 创建日期:2013-11-26下午4:10:12 修改日期: 作者:zhanglu
  *
  * @param:
  * @return:HandlerResult
  */
 public HandlerResult queryFloorPlan(HandlerRequestContext context) {
   HandlerResult result = HandlerResult.newInstance();
   HttpServletRequest request = context.getRequest();
   Map<String, String> param = BeanUtil.getMapFromRequest(request);
   LoginRequestBean loginReqBean = (LoginRequestBean) request.getAttribute("reqParams");
   UserInfoBean userInfoBean = SSOUtil.checkSSOState(loginReqBean, request).getUserInfoBean();
   if (!"0".equals(userInfoBean.getUserAreaCode())) {
     param.put("userAreaCode", userInfoBean.getUserAreaCode());
   }
   try {
     Page page = floorPlanService.queryFloorPlan(param);
     result.setRetObj(page);
     result.setRetCode(IResultCode.SYS_SUCCESS);
     result.setSysCode(SystemCodeConstants.QUERY_INFO_SUCCEED);
   } catch (Exception e) {
     // TODO: handle exception
     e.printStackTrace();
     result.setRetCode(IResultCode.SYS_FAILED);
     result.setSysCode(SystemCodeConstants.QUERY_INFO_FAILED);
   }
   return result;
 }