Beispiel #1
0
 /**
  * Copyright (C), 2000-2006, Kingstar Co., Ltd.<br>
  * File name: .java<br>
  * Description: GetDictionary取得一级单位列表<br>
  * Return: List<br>
  * Modify History: <br>
  * 操作类型 操作人 操作时间 操作内容<br>
  * ======================================<br>
  * 创建 韩纪伟 2006-4-4 <br>
  *
  * @author 韩纪伟
  * @version
  * @since 1.0
  */
 public static List getDeptList() {
   DictionaryDAO dao = DictionaryDAO.getInstance();
   List custList = null;
   List deptList = new ArrayList();
   try {
     custList = dao.getDeptList();
     int custsize = custList.size();
     for (int i = 0; i < custsize; i++) {
       Object[] objects = (Object[]) custList.get(i);
       HashMap confMap = new HashMap();
       confMap.put("deptCode", new Integer(convent(objects[0])));
       confMap.put("deptName", convent(objects[1]));
       // confMap.put("pym",GetCh2Spell.getBeginCharacter(convent(objects[1])));
       confMap.put("pym", new GetCh2Spell().String2Alpha(convent(objects[1])));
       deptList.add(confMap);
     }
   } catch (HibernateException he) {
     he.printStackTrace();
   } finally {
     closeSession();
   }
   Collections.sort(deptList, new SortListColl());
   // Arrays.sort(deptList);
   // System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++"+deptList);
   return deptList;
 }