String deptName = null;
try {
OrgParter userParter = OrgParter.getDefaultEmployee();
OrgAccountability acctblt = userParter.getDeptAccntblt();
OrgParter deptParter = acctblt.getLinkParter();
DOBO userBO = userParter.getDoBO();
DOBO deptBO = deptParter.getDoBO();
deptName = null;
String performer = this.getPerformer();
if (performer != null) {
BOInstance bi = userBO.getInstance(performer);
if (bi != null) {
String deptUid = "";
if (acctblt.isNeedOtherTable()) {
List list = acctblt.getAccessLinkParter().invokeSelect(
performer);
if (list != null && list.size() > 0) {
BOInstance aInstance = (BOInstance) list.get(0);
deptUid = aInstance.getValue(acctblt
.getLinkParterCol());
}
}
deptUid = bi.getValue(acctblt.getLinkParterCol());
deptName = deptBO.getInstance(deptUid).getName();
}
}
} catch (RuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();