怎样下载easyui文档

2025-11-21 14:20:06

1、这里我直接给大家代码吧!jsp

 function kpdc1(){

             var rows = $("#xxx").datagrid('getRows');

             var datarows = JSON.stringify(rows);

            

             var url = 'url?datarows='+datarows

                window.location.href=url;

             

       }   

怎样下载easyui文档

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 {

    

怎样下载easyui文档

3、        YhcwProcessBgbxAndFpWebClient webClient = WebClient.getCW(YhcwProcessBgbxAndFpWebClient.class);

            List<CxInvoicerecordParam> cxInvoicerecordParams = Json2Bean.getListBean(webClient.getInvoicerecord(id),

                    CxInvoicerecordParam.class);

            TemplateWebClient templatewebClient = WebClient.get(TemplateWebClient.class);

      

怎样下载easyui文档

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);

   

怎样下载easyui文档

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());

怎样下载easyui文档

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢