销售订单增加导出PI功能
This commit is contained in:
parent
294c4e5d6e
commit
0c40437c74
|
|
@ -486,16 +486,18 @@ public class SaleOrderServiceImpl implements SaleOrderService {
|
|||
SaleContractDO saleContract = BeanUtils.toBean(saleContractVO, SaleContractDO.class);
|
||||
List<SaleContractEntryDO> saleContractEntrys = BeanUtils.toBean(saleContractVO.getSaleContractEntrys(), SaleContractEntryDO.class);
|
||||
String htmlContent = generateHtmlContent(saleContract,saleContractEntrys);
|
||||
String fileName = StrUtil.format(pdfPath+"/销售合约_{}", saleOrder.getBillno());
|
||||
|
||||
String pdfPath2 = System.getProperty("user.dir") + "/pdffile";
|
||||
String fileName = StrUtil.format(pdfPath2+"/销售合约_{}", saleOrder.getBillno());
|
||||
String templatePath = fileName + ".html";
|
||||
|
||||
String pdfPath = fileName + ".pdf";
|
||||
FileUtil.writeString(htmlContent,templatePath, "UTF-8");
|
||||
log.info("已生成HTML文件111:"+System.getProperty("user.dir")+"/padfile");
|
||||
log.info("已生成HTML文件:"+templatePath);
|
||||
//请求wkapp
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("input_html_path",templatePath);
|
||||
String fileName2 = StrUtil.format(pdfPath+"/销售合约_{}", saleOrder.getBillno());
|
||||
String input_html_path = fileName2 + ".html";
|
||||
params.put("input_html_path",input_html_path);
|
||||
params.put("output_pdf_path",pdfPath);
|
||||
String result = HttpUtil.post(wkappUrl + "/exehtmltopdf", params, 5 * 60 * 1000);
|
||||
log.info("请求wkapp接口返回结果:"+result);
|
||||
|
|
|
|||
Loading…
Reference in New Issue