コード例 #1
0
  /**
   * 更新二级预约营销案测试状态 创建日期:2013-12-17下午5:24:51 修改日期: 作者:zhanglu
   *
   * @param:
   * @return:HandlerResult
   */
  public HandlerResult updateTestState(HandlerRequestContext context) {
    HandlerResult result = HandlerResult.newInstance();
    HttpServletRequest request = context.getRequest();

    ReservationMarketSecondBean marketFirstBean =
        (ReservationMarketSecondBean)
            BeanUtil.getBeanFromRequest(request, ReservationMarketSecondBean.class);

    LoginRequestBean loginReqBean = (LoginRequestBean) request.getAttribute("reqParams");
    UserInfoBean userInfoBean = SSOUtil.checkSSOState(loginReqBean, request).getUserInfoBean();

    String auditContent = request.getParameter("auditContent");
    String channelNum = userInfoBean.getChannelNum();
    String verifyState = marketFirstBean.getTestOnlineState();
    if (channelNum != null && !"".equals(channelNum)) {
      // 网厅
      if ("01".equals(channelNum) || "4".equals(channelNum)) {
        marketFirstBean.setWtTestOnlineState(marketFirstBean.getTestOnlineState());
        marketFirstBean.setTestOnlineState(null);
      }
      // 掌厅
    }
    try {
      MarketAuditBean marketAuditBean = new MarketAuditBean();
      marketAuditBean.setAuditPerson(userInfoBean.getLoginName());
      marketAuditBean.setAuditContent(auditContent);
      marketAuditBean.setAutitState(verifyState);
      marketFirstBean.setMarketAuditBean(marketAuditBean);
      reservationMarketSecondService.updateTestState(marketFirstBean);
      result.setRetCode(IResultCode.SYS_SUCCESS);
      result.setSysCode(SystemCodeConstants.UPDATE_INFO_SUCCEED);
    } catch (Exception e) {
      e.printStackTrace();
      result.setRetCode(IResultCode.SYS_FAILED);
      result.setSysCode(SystemCodeConstants.UPDATE_INFO_FAILED);
    }

    return result;
  }
コード例 #2
0
  public HandlerResult updateMarketSecondForVerify(HandlerRequestContext context) {
    HandlerResult result = HandlerResult.newInstance();
    HttpServletRequest request = context.getRequest();

    ReservationMarketSecondBean marketSecondBean =
        (ReservationMarketSecondBean)
            BeanUtil.getBeanFromRequest(request, ReservationMarketSecondBean.class);
    LoginRequestBean loginReqBean = (LoginRequestBean) request.getAttribute("reqParams");
    UserInfoBean userInfoBean = SSOUtil.checkSSOState(loginReqBean, request).getUserInfoBean();
    String auditContent = request.getParameter("auditContent");
    String city = userInfoBean.getUserAreaCode();
    String verifyState = "";
    String auditLevel = "";
    if ("0".equals(city)) { // 0 为江苏省
      verifyState = request.getParameter("proVerifyState");
      auditLevel = "1";
    } else {
      verifyState = request.getParameter("localVerifyState");
      auditLevel = "2";
    }
    try {
      String channelNum = userInfoBean.getChannelNum();
      if ("0".equals(city)) { // 0 为江苏省
        if (channelNum != null && !"".equals(channelNum)) {
          // 网厅
          if ("01".equals(channelNum) || "4".equals(channelNum)) {
            marketSecondBean.setWtProVerifyState(verifyState);
            marketSecondBean.setProVerifyState(null);
            marketSecondBean.setLocalVerifyState(null);
          } else if ("02".equals(channelNum) || "5".equals(channelNum)) {
            marketSecondBean.setWtProVerifyState(null);
            marketSecondBean.setProVerifyState(verifyState);
            marketSecondBean.setLocalVerifyState(null);
          }
        }

      } else {
        if (channelNum != null && !"".equals(channelNum)) {
          // 网厅
          if ("01".equals(channelNum) || "4".equals(channelNum)) {
            marketSecondBean.setWtLocalVerifyState(verifyState);
            marketSecondBean.setProVerifyState(null);
            marketSecondBean.setLocalVerifyState(null);
          } else if ("02".equals(channelNum) || "5".equals(channelNum)) {
            marketSecondBean.setWtLocalVerifyState(null);
            marketSecondBean.setProVerifyState(null);
            marketSecondBean.setLocalVerifyState(verifyState);
          }
        }
      }
      MarketAuditBean marketAuditBean = new MarketAuditBean();
      marketAuditBean.setAuditPerson(userInfoBean.getLoginName());
      marketAuditBean.setAuditContent(auditContent);
      marketAuditBean.setAutitState(verifyState);
      marketAuditBean.setAuditLevel(auditLevel);
      marketSecondBean.setMarketAuditBean(marketAuditBean);
      reservationMarketSecondService.updateMarketSecondForVerify(marketSecondBean); // 更新二级营销案
      result.setRetCode(IResultCode.SYS_SUCCESS);
      result.setSysCode(SystemCodeConstants.UPDATE_INFO_SUCCEED);
    } catch (Exception e) {
      e.printStackTrace();
      result.setRetCode(IResultCode.SYS_FAILED);
      result.setSysCode(SystemCodeConstants.UPDATE_INFO_FAILED);
    }
    return result;
  }