dt=sys.xao.td.FunDecode(cols,if1,var1,if2,var2,[else])
cols:-当前列值;可以为常量值;可以为多列,使用|或/隔开;可以为多列与常量混合连接

dt='Td4AllCode(code)'转换编码

eg. dt='Td4StaffName'

public class Td4StaffName extends TranseFieldDataAdapter {
private static List<Object> lstUser;

public String transe(Object userNo) {
return transe(userNo, null);
}

public String transe(Object userNo, Object obj) {
if (StringUtil.isEmpty(userNo)) {
return "";
}
init();
String str = userNo.toString();

for (Iterator iterator = lstUser.iterator(); iterator.hasNext();) {
MesStaff element = (MesStaff) iterator.next();
if (userNo.equals(element.getStaffNo())) {
return element.getUserName();
}
}
return userNo.toString() + "!";
}

private static void init() {
if (lstUser == null) {
IMesStaffMan man = ManFactory.getMan(IMesStaffMan.class);
MesStaff user = new MesStaff();
lstUser = man.search(user);
}
}
}