现在的位置: 首页 > 综合 > 正文

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

2013年11月10日 ⁄ 综合 ⁄ 共 588字 ⁄ 字号 评论关闭

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

* @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();
}

抱歉!评论已关闭.