Exemple #1
0
  /**
   * 获取查询岗位数据集合
   *
   * @param form
   * @param pageSize
   * @param startRow
   * @return
   */
  public int getTotalByOther(WbasePostForm form) {

    StringBuffer query = new StringBuffer();
    // 根据岗位编号
    query.append("from WbasePost o where 1=1 \n");
    if (form.getPostNo().trim().length() > 0) {
      query.append(" and o.postNo like '%" + form.getPostNo().trim() + "%' \n");
    }
    // 根据岗位名称
    if (form.getPostName().trim().length() > 0) {
      query.append(" and o.postName like '%" + form.getPostName().trim() + "%' \n");
    }

    int total = super.getRowsByHQL("select count(*) " + query.toString());

    return total;
  }
Exemple #2
0
  /**
   * 获取查询岗位数据集合
   *
   * @param form
   * @param pageSize
   * @param startRow
   * @return
   */
  public List getPostListByOther(WbasePostForm form, int pageSize, int startRow) {

    StringBuffer query = new StringBuffer();
    // 根据岗位编号
    query.append("from WbasePost o where 1=1 \n");
    if (form.getPostNo().trim().length() > 0) {
      query.append(" and o.postNo like '%" + form.getPostNo().trim() + "%' \n");
    }
    // 根据岗位名称
    if (form.getPostName().trim().length() > 0) {
      query.append(" and o.postName like '%" + form.getPostName().trim() + "%' \n");
    }

    query.append(" order by o.postLevel ASC ");
    List datas = super.doFind(query.toString(), pageSize, startRow);

    return datas;
  }