Ejemplo n.º 1
0
 /**
  * 通过终端信息得到终端所在地的地理属性名称
  *
  * @param Terminfo terminfo
  * @return String
  */
 public Places getLocation(Terminfo terminfo) {
   try {
     Integer placeId = terminfo.getPlaces().getPlacesId();
     Places place = terminfoDefineService.findByPlaceId(placeId);
     LocationTypes location = gltmsumDefineService.findLocaitonByPlace(place);
     place.setLocationTypes(location);
     return place;
   } catch (Exception ex) {
     return null;
   }
 }
Ejemplo n.º 2
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;
  }