/** 查询二级营销案审核列表 创建日期: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;
  }
 /** 根据一级预约营销案查询二级 创建日期: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;
 }
Пример #3
0
 public Page queryMarketTemplateList(Map<String, Object> map) {
   List<MarketTemplateBean> list = marketTemplateMapper.queryMarketTemplate(map);
   for (MarketTemplateBean marketTemplateBean : list) {
     if ("0".equals(marketTemplateBean.getState())) {
       String isStateAlink =
           "无效<a href='javascript:component.updateState("
               + marketTemplateBean.getTemplateId()
               + ",1);' title=''><img src='../../../resource/img/toggle_enabled.gif'/></a>";
       marketTemplateBean.setState(isStateAlink);
     } else {
       String isStateAlink =
           "有效<a href='javascript:component.updateState("
               + marketTemplateBean.getTemplateId()
               + ",0)' title=''><img src='../../../resource/img/toggle_disabled.gif'/></a>";
       marketTemplateBean.setState(isStateAlink);
     }
   }
   int count = marketTemplateMapper.queryMarketTemplateCount(map);
   Page page = new Page();
   page.setRecords(list);
   page.setTotalRecord(count);
   return page;
 }