StringBuffer sb = new StringBuffer();
sb.append(TagConstant.SCRIPT_START);
Dto dto = new BaseDto();
String[] arrayFields = fields.split(",");
TemplateEngine engine = TemplateEngineFactory.getTemplateEngine(TemplateType.VELOCITY);
DefaultTemplate template = new FileTemplate();
template.setTemplateResource(TagHelper.getTemplatePath(getClass().getName()));
for (int i = 0; i < arrayFields.length; i++) {
List codeList = WebUtils.getCodeListByField(arrayFields[i], request);
dto.put("codeList", codeList);
dto.put("field", arrayFields[i]);
StringWriter writer = engine.mergeTemplate(template, dto);