@Log(title = "合同模板导出", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('business:archive:order:export')")
@PostMapping("/exportOnceTemplate")
public void exportOnceTemplate(HttpServletResponse response) throws Exception {
//        org.springframework.core.io.Resource resource = resourceLoader.getResource("classpath:importTemplate/OnceOrderExcelTemplate.xlsx");
//        File file = null;
//        try {
//            file = resource.getFile();
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//        ExcelWriter writer = cn.hutool.poi.excel.ExcelUtil.getBigWriter(file);
//        response.setContentType("application/vnd.ms-excel;charset=utf-8");
//        //test.xls是弹出下载对话框的文件名，不能为中文，中文请自行编码
//        response.setHeader("Content-Disposition", "attachment;filename=test.xlsx");
//        ServletOutputStream out = null;
//        try {
//            out = response.getOutputStream();
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//        writer.flush(out, true);
//        // 关闭writer，释放内存
//        writer.close();
//        //此处记得关闭输出Servlet流
//        IoUtil.close(out);
}


@Log(title = "合同模板导出", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('business:archive:order:export')")
@PostMapping("/exportLoopTemplate")
public void exportLoopTemplate(HttpServletResponse response) throws Exception {
//        org.springframework.core.io.Resource resource = resourceLoader.getResource("classpath:importTemplate/LoopOrderExcelTemplate.xlsx");
//        File file = null;
//        try {
//            file = resource.getFile();
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//        ExcelWriter writer = cn.hutool.poi.excel.ExcelUtil.getBigWriter(file);
//        response.setContentType("application/vnd.ms-excel;charset=utf-8");
//        //test.xls是弹出下载对话框的文件名，不能为中文，中文请自行编码
//        response.setHeader("Content-Disposition", "attachment;filename=test.xlsx");
//        ServletOutputStream out = null;
//        try {
//            out = response.getOutputStream();
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//        writer.flush(out, true);
//        // 关闭writer，释放内存
//        writer.close();
//        //此处记得关闭输出Servlet流
//        IoUtil.close(out);
}