怎样下载easyui文档
1、这里我直接给大家代码吧!jsp
function kpdc1(){
var rows = $("#xxx").datagrid('getRows');
var datarows = JSON.stringify(rows);
var url = 'url?datarows='+datarows
window.location.href=url;
}

2、controller
@RequestMapping(value="xxx", produces = "text/html;charset=UTF-8")
@ResponseBody
public ModelAndView xxx(Integer id)
throws DocumentException, IOException {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateString = formatter.format(new Date());
try {

3、 YhcwProcessBgbxAndFpWebClient webClient = WebClient.getCW(YhcwProcessBgbxAndFpWebClient.class);
List<CxInvoicerecordParam> cxInvoicerecordParams = Json2Bean.getListBean(webClient.getInvoicerecord(id),
CxInvoicerecordParam.class);
TemplateWebClient templatewebClient = WebClient.get(TemplateWebClient.class);

4、 Map<String, String> map = new HashMap<>();
map.put("sysCompanyId", getCurrentUser().getSysCompany().getId().toString());
map.put("templatetype", "3");
List<Template> templates = Json2Bean.getListBean(
templatewebClient.getMorePropertyEqual(BeanJson.bean2json(map), "id", true), Template.class);

5、 String xml = templates.get(0).getContent();
System.out.println(xml.toString());
xml = xml.replace("count", cxInvoicerecordParams.size() + "");
String fpString = xml.substring(xml.indexOf("<Fp>"), xml.lastIndexOf("</Fp>"));
xml = xml.replace("bianma", "DJZ" + dateString + "-" + id.toString());
System.out.println(fpString.toString());
