List<TSType> dataList = TSTypegroup.allTypes
.get(name.toLowerCase());
if (dataList == null) {
dataList = new ArrayList<TSType>();
}
env.setGlobalVariable(var, new SimpleCollection(dataList));
} else {
// table表查询
StringBuilder sql = new StringBuilder("");
sql.append("select distinct ").append(name)
.append(" as typecode, ");
if (text == null || text.trim().length() <= 0) {
sql.append(name).append(" as typename ");
} else {
sql.append(text).append(" as typename ");
}
sql.append(" from ").append(tablename);
sql.append(" order by ").append(name);
List<Map<String, Object>> dataList = systemService.findForJdbc(sql
.toString());
env.setGlobalVariable(var, new SimpleCollection(dataList));
}
body.render(env.getOut());
}