/**
   * 读取泵站列表
   *
   * @return
   * @throws AjClientException
   */
  @SuppressWarnings("unchecked")
  public List getCode() throws AjClientException {
    Code code = new Code();
    List<Code> list = new ArrayList<Code>();
    List<Code> list1 = new ArrayList<Code>();
    try {
      list = this.findObjectByExample(DB_POOL_DRAIN, code);

      for (Iterator it = list.iterator(); it.hasNext(); ) {
        code = (Code) it.next();
        if (code.getPsName().equals("新肇嘉浜")) {
          list1.add(code);
        }
        if (code.getPsName().equals("M1泵站")) {
          list1.add(code);
        }
        if (code.getPsName().equals("鲁班(南)")) {
          list1.add(code);
        }
        if (code.getPsName().equals("新陆家浜")) {
          list1.add(code);
        }
        if (code.getPsName().equals("新文庙")) {
          list1.add(code);
        }
        if (code.getPsName().equals("南干线1#(南)")) {
          list1.add(code);
        }
        if (code.getPsName().equals("南干线3#(南)")) {
          list1.add(code);
        }
        if (code.getPsName().equals("南码头")) {
          list1.add(code);
        }
        if (code.getPsName().equals("蒲明")) {
          list1.add(code);
        }
        if (code.getPsName().equals("后滩")) {
          list1.add(code);
        }
        if (code.getPsName().equals("纳管泵站")) {
          list1.add(code);
        }
      }
    } catch (Exception e) {
      Global.getServerLog().error("读取泵站列表信息失败,错误原因:" + "[size]:" + list.size());
      throw new AjClientException(AJ_ERROR_CODE_SERVER_ISBUSY);
    }

    return list1;
  }
 /**
  * 读取流量列表
  *
  * @param pS_Id
  * @return
  * @throws AjClientException
  */
 @SuppressWarnings("unchecked")
 public List getFlow(Long pS_Id) throws AjClientException {
   List list = new ArrayList();
   Session session = getSession(DB_POOL_DRAIN);
   try {
     String hql = "FROM Bzsb b where b.id.psId = " + pS_Id;
     Query query1 = session.createQuery(hql);
     list = query1.list();
   } catch (Exception e) {
     Global.getServerLog().error("读取流量失败,错误原因:" + e.toString());
     throw new AjClientException(AJ_ERROR_CODE_SERVER_ISBUSY);
   }
   return list;
 }
  /**
   * 获得泵站名称list
   *
   * @return
   * @throws AjClientException
   */
  @SuppressWarnings("unchecked")
  public List getData() throws AjClientException {
    Code code = new Code();
    List list = new ArrayList();
    try {

      list = this.findObjectByExample(DB_POOL_DRAIN, code);
    } catch (Exception e) {

      Global.getServerLog().error("读取泵站名称失败,错误原因:" + e.toString());
      throw new AjClientException(AJ_ERROR_CODE_SERVER_ISBUSY);
    }
    return list;
  }
 /**
  * 读取某个泵站的水位信息(截流,防汛,开泵,停泵水位)
  *
  * @return
  * @throws AjClientException
  */
 @SuppressWarnings("unchecked")
 public Object getStage(Long id) throws AjClientException {
   List<PsLevel> list = new ArrayList<PsLevel>();
   try {
     Session session = getSession(DB_POOL_DRAIN);
     String hql = "FROM PsLevel p where p.id.psId = " + id + " and year = " + 2010L;
     Query query = session.createQuery(hql);
     list = query.list();
     session.close();
   } catch (Exception e) {
     Global.getServerLog().error("读取截流,防汛,开泵,停泵水位失败,错误原因:" + e.toString());
     throw new AjClientException(AJ_ERROR_CODE_SERVER_ISBUSY);
   }
   return list;
 }