|
@@ -168,6 +168,24 @@ public class TInvoiceBookingworkticketController extends BaseController
|
|
|
return toAjax(tInvoiceBookingworkticketService.deleteTInvoiceBookingworkticketByIds(ids));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 生成word
|
|
|
+ */
|
|
|
+ public String createBookingworkticketWord(TInvoiceBookingworkticket invoiceBookingworkticket) throws IOException {
|
|
|
+ //生成word
|
|
|
+ //渲染文本
|
|
|
+ Map<String, Object> params = getWordData(invoiceBookingworkticket);
|
|
|
+ // 模板路径
|
|
|
+ String templatePath = "static/word/invice/book.docx";
|
|
|
+ // 生成word的路径
|
|
|
+ String fileDir = RuoYiConfig.getProfile() + "/"+ "ticketWord";
|
|
|
+ // 生成word的文件
|
|
|
+ String fileName = "A" + invoiceBookingworkticket.getContact() + ".docx";
|
|
|
+ String wordPath = this.createWord(templatePath, fileDir, fileName, params);
|
|
|
+
|
|
|
+ return wordPath;
|
|
|
+ };
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 获取word数据
|
|
@@ -181,7 +199,6 @@ public class TInvoiceBookingworkticketController extends BaseController
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
- * @author lsc
|
|
|
* @param templatePath word模板文件路径
|
|
|
* @param fileDir 生成的文件存放地址
|
|
|
* @param fileName 生成的文件名
|