修复 文件导出
This commit is contained in:
parent
bd2c1ccd6b
commit
4f061b363d
|
|
@ -1241,20 +1241,17 @@ public class SaleOrderServiceImpl implements SaleOrderService {
|
|||
+"-"+IdUtil.simpleUUID().substring(0, 4);
|
||||
String ouput = StrUtil.format(targetPath + "/{}_{}.pdf",(s+"_"+orderQty),name);
|
||||
String templatePath2 = StrUtil.format(targetPath + "/{}_{}.html",(s+"_"+orderQty),name);
|
||||
File file2 = new File(templatePath2);
|
||||
if(!file2.exists()){
|
||||
try {
|
||||
FileUtil.touch(templatePath2);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
FileUtil.touch(templatePath2);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.out.println("templatePath2"+templatePath2);
|
||||
String htmlText = HttpUtil.get(sourceFile);
|
||||
System.out.println("htmlText:"+htmlText);
|
||||
FileUtil.writeString(htmlText, templatePath2, "UTF-8");
|
||||
//请求wkapp
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("input_html_path", "file://" + templatePath2);
|
||||
params.put("input_html_path", templatePath2);
|
||||
params.put("output_pdf_path", ouput);
|
||||
System.out.println("params"+params);
|
||||
log.info("稿件导出 请求wkapp接口url:" + wkappUrl + "/exehtmltopdf");
|
||||
|
|
|
|||
Loading…
Reference in New Issue