コード例 #1
0
ファイル: BuyAction.java プロジェクト: stranger2008/rbtb2b
  /**
   * @MethodDescribe 方法描述 根据主键找出求购表的详细信息
   *
   * @author 创建人 林俊钦
   * @date 创建日期 Aug 1, 2011 1:28:15 PM
   */
  public String audit() throws Exception {

    // 进入审核页面时候的加载方法
    auditView("buy", buy.getBuy_id());

    String infoattr_id = buy.getInfoattr_id();
    sysmodule = this.sysmoduleService.get("buy");
    if (sysmodule != null && "0".equals(sysmodule.getIs_catattr())) {
      backAttr(infoattr_id, buy.getCat_attr());
    }
    noReasonKey = buy.getInfo_state();
    // 获取求购类型,分类和地区的中文字符
    if (buy.getBuy_type() != null) {
      String buy_type = CommparaFuc.get_commparakey_By_value(buy.getBuy_type(), para_code);
      buy.setBuy_type(buy_type);
    }
    if (buy.getCat_attr() != null) {
      String cat_attr = CategoryFuc.getCateNameByMap(buy.getCat_attr());
      buy.setCat_attr(cat_attr);
    }
    if (buy.getArea_attr() != null) {
      String area_attr = AreaFuc.getAreaNameByMap(buy.getArea_attr());
      buy.setArea_attr(area_attr);
    }
    return goUrl(AUDIT);
  }
コード例 #2
0
 /**
  * @author : 林俊钦
  * @date : Mar 19, 2012 11:30:01 AM @Method Description :审核团购列表
  */
 public String auditList() throws Exception {
   Map pageMap = new HashMap();
   pageMap = setGoodsMap(pageMap);
   pageMap.put("state_in", "0,2");
   // 团购地区过滤
   if ("0".equals(cfg_area_group) && this.session_cust_type.equals(Constants.ADMIN_TYPE)) {
     // 获取地区定位id
     String area_id = AreaFuc.getAreaidByIpaddr(getRequest());
     pageMap.put("area_attr", area_id);
   }
   // 根据页面提交的条件找出信息总数
   int count = this.goodsService.getCount(pageMap);
   // 分页插件
   pageMap = super.pageTool(count, pageMap);
   groupgoodsList = this.groupgoodsService.getList(pageMap);
   groupgoodsList = categoryFuc.replaceList(groupgoodsList, "");
   return goUrl(AUDITLIST);
 }
コード例 #3
0
ファイル: BuyAction.java プロジェクト: stranger2008/rbtb2b
 /**
  * @MethodDescribe 方法描述 根据条件找出审核列表页
  *
  * @author 创建人 林俊钦
  * @date 创建日期 Aug 1, 2011 1:26:06 PM
  */
 public String auditList() throws Exception {
   HttpServletRequest request = getRequest();
   request.setCharacterEncoding("UTF-8");
   // 页面搜索提交的参数
   Map pageMap = new HashMap();
   // 找出审核页面的状态
   pageMap.put("info_state_in", "0,2");
   // 获取搜索的标题
   if (this.title_s != null && !this.title_s.equals("")) {
     pageMap.put("title", this.title_s);
   }
   // 获取搜索的产品品牌
   if (this.brand_s != null && !this.brand_s.equals("")) {
     pageMap.put("brand", this.brand_s);
   }
   // 获取搜索的求购类型
   if (this.type_s != null && !this.type_s.equals("")) {
     pageMap.put("buy_type", this.type_s);
   }
   // 获取搜索的审核状态
   if (this.state_s != null && !this.state_s.equals("")) {
     pageMap.put("info_state", this.state_s);
   }
   if (this.info_state_s != null && !this.info_state_s.equals("")) {
     pageMap.put("info_state", this.info_state_s);
   }
   // 获取搜索的是否推荐
   if (this.is_recom_s != null && !this.is_recom_s.equals("")) {
     pageMap.put("is_recom", this.is_recom_s);
   }
   // 获取搜索的内容收费
   if (this.fare_start_s != null
       && !this.fare_start_s.equals("")
       && this.fare_last_s != null
       && !this.fare_last_s.equals("")) {
     pageMap.put("search_fare_start", this.fare_start_s);
     pageMap.put("search_fare_last", this.fare_last_s);
   }
   // 获取搜索的发布时间
   if (this.starttime_s != null && !this.starttime_s.equals("")) {
     pageMap.put("search_starttime", this.starttime_s);
   }
   if (this.endtime_s != null && !this.endtime_s.equals("")) {
     pageMap.put("search_endtime", endtime_s);
   }
   // 获取搜索的所属地区
   if (request.getParameter("area_attr_s") != null) {
     pageMap.put("area_attr", request.getParameter("area_attr_s"));
   }
   // 获取搜索的所属分类
   if (request.getParameter("cat_attr_s") != null) {
     pageMap.put("cat_attr", request.getParameter("cat_attr_s"));
   }
   // 根据页面提交的条件找出信息总数
   int count = this.buyService.getCount(pageMap);
   // 分页插件
   pageMap = super.pageTool(count, pageMap);
   getCommparalists();
   buyList = this.buyService.getList(pageMap);
   // 把数据库中的ID替换成名称
   buyList = CategoryFuc.replaceList(buyList, para_code);
   return goUrl(AUDITLIST);
 }
コード例 #4
0
ファイル: BuyAction.java プロジェクト: stranger2008/rbtb2b
  /**
   * 方法描述:根据搜索条件列出信息列表
   *
   * @return
   * @throws Exception
   */
  public String list() throws Exception {
    HttpServletRequest request = getRequest();
    request.setCharacterEncoding("UTF-8");
    // 页面搜索提交的参数
    Map pageMap = new HashMap();
    // 获取搜索的标题
    if (this.title_s != null && !this.title_s.equals("")) {
      pageMap.put("title", this.title_s);
    }
    // 获取搜索的产品品牌
    if (this.brand_s != null && !this.brand_s.equals("")) {
      pageMap.put("brand", this.brand_s);
    }
    // 获取搜索的求购类型
    if (this.type_s != null && !this.type_s.equals("")) {
      pageMap.put("buy_type", this.type_s);
    }
    // 获取搜索的审核状态
    if (this.state_s != null && !this.state_s.equals("")) {
      pageMap.put("info_state", this.state_s);
    }
    if (this.info_state_s != null && !this.info_state_s.equals("")) {
      pageMap.put("info_state", this.info_state_s);
    }
    // 获取搜索的是否推荐
    if (this.is_recom_s != null && !this.is_recom_s.equals("")) {
      pageMap.put("is_recom", this.is_recom_s);
    }
    // 获取搜索的所属地区
    if (request.getParameter("area_attr_s") != null) {
      String area_attr = request.getParameter("area_attr_s");
      pageMap.put("area_attr", area_attr);
    }
    // 获取搜索的所属分类
    if (request.getParameter("cat_attr_s") != null) {
      String cat_attr = request.getParameter("cat_attr_s");
      pageMap.put("cat_attr", cat_attr);
    }
    // 获取搜索的内容收费
    if (this.fare_start_s != null
        && !this.fare_start_s.equals("")
        && this.fare_last_s != null
        && !this.fare_last_s.equals("")) {
      pageMap.put("search_fare_start", this.fare_start_s);
      pageMap.put("search_fare_last", this.fare_last_s);
    }

    if (this.starttime_s != null && !this.starttime_s.equals("")) {
      pageMap.put("search_starttime", this.starttime_s);
    }

    if (this.endtime_s != null && !this.endtime_s.equals("")) {
      pageMap.put("search_endtime", this.endtime_s);
    }

    // 操作者为会员则默认加入搜索条件
    if (this.session_cust_type.equals(Constants.MEMBER_TYPE)) {
      pageMap.put("cust_id", this.session_cust_id);
    } else {
      // 判断今天新增供应
      if (today != null && !"".equals(today)) {
        pageMap.put("today", this.today);
      } else {
        pageMap.put("info_state_in", "1,3");
      }
    }
    getCommparalists();
    // 过滤地区
    pageMap = super.areafilter(pageMap);
    // 根据页面提交的条件找出信息总数
    int count = this.buyService.getCount(pageMap);
    // 分页插件
    pageMap = super.pageTool(count, pageMap);
    // 找出信息列表,放入list
    buyList = this.buyService.getList(pageMap);
    // 把数据库中的ID替换成名称
    buyList = CategoryFuc.replaceList(buyList, para_code);
    return goUrl(INDEXLIST);
  }