예제 #1
0
 /** 得到与当前组相关的所有终端号 */
 public void GetAllTermno() {
   this.termnoList = new ArrayList<String>();
   // 关联组
   Organization org = (Organization) request.getSession().getAttribute("currentOrganization");
   // 获得该组拥有的终端
   List<Terminfo> terminfoSet = orgTermService.collectOrgTerms(org);
   Iterator<Terminfo> it = terminfoSet.iterator();
   while (it.hasNext()) {
     Terminfo term = it.next();
     if (term != null) {
       this.termnoList.add(term.getTermno());
     }
   }
 }
예제 #2
0
  /**
   * 条件查询
   *
   * @return String
   */
  public String gltmsumSelect() throws Exception {
    // 拼接查询条件
    String sql = "";
    this.terminfoList = new ArrayList<Terminfo>();
    // 关联组
    Organization org = (Organization) request.getSession().getAttribute("currentOrganization");
    String innerCode = (String) orgDAO.getOrgInnerInfo(org)[0];
    // 获得该组拥有的终端
    terminfoList = orgTermService.collectOrgTerms(org);

    // 需要先取得pageBean实例
    pageBean = (PageBean) request.getSession().getAttribute("pageBean");
    if (pageBean == null) {
      pageBean = new PageBean();
      request.getSession().setAttribute("pageBean", pageBean);
    }
    if (dateMin != null && (!dateMin.equals(""))) {
      dateMin = dateMin.substring(0, 4) + dateMin.substring(5, 7);
      if (dateMax != null && (!dateMax.equals(""))) {
        dateMax = dateMax.substring(0, 4) + dateMax.substring(5, 7);
        sql += " and v.date between '" + dateMin + "' and '" + dateMax + "'";
      } else {
        sql += " and v.date > '" + dateMin + "'";
      }
    } else {
      if (dateMax != null && (!dateMax.equals(""))) {
        dateMax = dateMax.substring(0, 4) + dateMax.substring(5, 7);
        sql += " and v.date<'" + dateMax + "'";
      }
    }

    if (terminfoId != null && (!terminfoId.equals(""))) {
      sql += " and v.terminfo.terminfoId=" + terminfoId;
    }

    sql += " and otv.id.orgInnerCode like '" + innerCode + "%'";

    this.pageNo = 1;
    this.request.getSession().setAttribute("sql", sql);
    return SUCCESS;
  }
예제 #3
0
  /**
   * 显示查询日均交易量主页面
   *
   * @return String
   */
  public String show() throws Exception {
    String sql = "";
    this.terminfoList = new ArrayList<Terminfo>();
    // 关联组
    Organization org = (Organization) request.getSession().getAttribute("currentOrganization");
    // 获得该组拥有的终端
    terminfoList = orgTermService.collectOrgTerms(org);

    this.terminfoList.add(0, new Terminfo());

    // 得到分页Bean

    pageBean = (PageBean) request.getSession().getAttribute("pageBean");
    if (pageBean == null) {
      message = "";
      pageBean = new PageBean();
      request.getSession().setAttribute("pageBean", pageBean);
      request.getSession().removeAttribute("sql");
    }
    pageBean.setCurrentPage(pageNo);
    // 翻页显示
    if (pageNo > 0 && request.getSession().getAttribute("sql") != null) {
      sql = request.getSession().getAttribute("sql").toString();
      it = gltmsumDefineService.findByCondition(sql, pageBean);
    }
    // 改变格式

    if (it != null && it.hasNext()) {
      this.changeFormat();
      message = this.getText("il8n.sysParam.optSuccess");
    } else {
      pageBean = new PageBean();
      request.getSession().setAttribute("pageBean", pageBean);
      request.getSession().removeAttribute("sql");
      message = this.getText("il8n.app.notFound");
    }

    return SUCCESS;
  }