コード例 #1
0
  /**
   * 省级、地市审核列表 创建日期: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;
  }
コード例 #2
0
  /** 添加二级预约营销案 创建日期:2013-10-29上午11:22:08 修改日期: 作者:zhanglu TODO return */
  public HandlerResult addReservationMarketSecond(HandlerRequestContext context) {
    HandlerResult result = HandlerResult.newInstance();
    HttpServletRequest request = context.getRequest();
    LoginRequestBean loginReqBean = (LoginRequestBean) request.getAttribute("reqParams");
    UserInfoBean userInfoBean = SSOUtil.checkSSOState(loginReqBean, request).getUserInfoBean();

    ReservationMarketSecondBean rmarketSecondBean =
        (ReservationMarketSecondBean)
            BeanUtil.getBeanFromRequest(request, ReservationMarketSecondBean.class);
    String remarketsecondPKId = sequenceService.getSequence("RESERVATION_SECOND_PKID_SEQ");
    rmarketSecondBean.setMarketSecondPkId(remarketsecondPKId);
    // 从CRM获取到的礼品信息ID
    String giftIds = request.getParameter("giftIds");
    rmarketSecondBean.setBossGiftId(giftIds);
    // 从CRM获取到的礼品信息名称
    String giftNames = request.getParameter("giftNames");
    rmarketSecondBean.setBossGiftName(giftNames);
    // 从CRM获取到业务信息ID
    String bisIds = request.getParameter("bisIds");
    rmarketSecondBean.setBizCode(bisIds);
    // 从CRM获取到的业务信息名称
    String bisNames = request.getParameter("bisNames");
    rmarketSecondBean.setBizName(bisNames);
    // 从CRM获取到的礼品和业务信息备注
    String fBz = request.getParameter("fBz");
    rmarketSecondBean.setGiftBinzInfo(fBz);
    // 二级预约营销案BOSS编码
    String fmarketLevel2Boss = request.getParameter("fmarketLevel2Boss");
    rmarketSecondBean.setBossSecondCode(fmarketLevel2Boss);

    rmarketSecondBean.setCity(userInfoBean.getUserAreaCode());
    rmarketSecondBean.setCfgUserId(userInfoBean.getLoginName());

    // 新建二级预约营销案默认为有效
    rmarketSecondBean.setState("1");
    // 新建二级预约营销案默认为待审核状态
    rmarketSecondBean.setVerifyState("0");
    // 省级审核状态默认为待审核:0
    rmarketSecondBean.setProVerifyState("0");
    // 地市级审核状态默认为待审核:0
    rmarketSecondBean.setLocalVerifyState("0");
    // 是否是目标用户营销方案默认为否:0
    rmarketSecondBean.setIsInGroup("0");
    String moneyVal = request.getParameter("moneyVal");
    if (StringUtil.isNull(moneyVal)) {
      moneyVal = "0";
    }
    rmarketSecondBean.setMoneyVal(new BigDecimal(moneyVal));
    try {
      reservationMarketSecondService.addReservationMarketSecond(rmarketSecondBean);
      result.setRetCode(IResultCode.SYS_SUCCESS);
      result.setSysCode(SystemCodeConstants.INSERT_INFO_SUCCEED);
    } catch (Exception e) {
      // TODO: handle exception
      e.printStackTrace();
      result.setRetCode(IResultCode.SYS_FAILED);
      result.setSysCode(SystemCodeConstants.INSERT_INFO_FAILED);
    }

    return result;
  }