Пример #1
0
 /**
  * @Title: queryDictionary @Description: 数据库字典
  *
  * @param @return 参数
  * @return String 返回类型
  * @throws
  * @author taozhaoping 26078
  * @author mail [email protected]
  * @throws ParameterException
  */
 public String queryDictionary() throws ProjectException {
   LOGGER.debug("queryDictionary()");
   String formId = dictionaryModel.getFormId();
   if (null == formId || "".equals(formId)) {
     throw new ProjectException("字典key不允许为null!");
   }
   Dictionary dictionary = new Dictionary();
   dictionary.setBasiTypeID(Integer.valueOf(formId));
   List<Dictionary> list = dictionaryService.queryList(dictionary);
   this.dictionaryModel.setDictionaryList(list);
   return "dictionaryjson";
 }
Пример #2
0
  /**
   * @Title: queryDictionary @Description: 查询数据库字典
   *
   * @param @param id
   * @param @return 参数
   * @return String 返回类型
   * @throws
   * @author taozhaoping 26078
   * @author mail [email protected]
   */
  public static String queryDictionary(String id) {
    if (null == id || "null".equals(id)) {
      return "";
    }

    Dictionary dictionary = new Dictionary();
    dictionary.setKey(Integer.valueOf(id));
    Dictionary reult = dictionaryService.query(dictionary);
    if (reult == null) {
      return "";
    } else {
      return reult.getDescr();
    }
  }