用户工号转换成姓名加工号

/**
* 用户工号转换成姓名加工号 <功能详细描述>

* @param usersName
* @return [参数说明]

* @return String [返回类型说明]
* @exception throws
*                [违例类型] [违例说明]
* @see [类、类#方法、类#成员]
*/
private String getEmployeUserName(String usersName) {
StringBuffer buf = new StringBuffer("");


if (usersName != null && !"".equals(usersName)) {
String[] employees = usersName.split(",");
for (int i = 0; i < employees.length; i++) {
List list = userDAO.findByEmployeeId(employees[i]);
if (list.size() > 0) {
User user = (User) list.get(0);
if (user != null) {
buf.append(user.getFullname()).append("/").append(
user.getEmployeeId());
if (i < employees.length - 1) {
buf.append(";");
}
}
}
}
}
return buf.toString();
}
posted @ 2012-02-15 17:39  Java EE  阅读(404)  评论(0编辑  收藏  举报