湖南方盛制药 文件名从接口中获取
This commit is contained in:
parent
d1723942ed
commit
2f002266e4
|
|
@ -49,7 +49,7 @@ public class EleEctronVoucherServiceImpl extends Service implements EleEctronVou
|
||||||
Map<String, Object> fileMap = new HashMap<>(2);
|
Map<String, Object> fileMap = new HashMap<>(2);
|
||||||
String apiUrl = host + "/uapws/rest/gl/voucherout/voucheroutpdf";
|
String apiUrl = host + "/uapws/rest/gl/voucherout/voucheroutpdf";
|
||||||
|
|
||||||
String fileName = "凭证" + billId + ".pdf";
|
|
||||||
|
|
||||||
// 1. 发送 POST 请求,获取 InputStream
|
// 1. 发送 POST 请求,获取 InputStream
|
||||||
try (HttpResponse response = HttpRequest.post(apiUrl)
|
try (HttpResponse response = HttpRequest.post(apiUrl)
|
||||||
|
|
@ -78,6 +78,7 @@ public class EleEctronVoucherServiceImpl extends Service implements EleEctronVou
|
||||||
|
|
||||||
//InputStream inputStream = response.bodyStream();
|
//InputStream inputStream = response.bodyStream();
|
||||||
//附件生成
|
//附件生成
|
||||||
|
String fileName = json.getStr("voucherName") + ".pdf";
|
||||||
int imageFileid = generateImageFileid(inputStream, fileName);
|
int imageFileid = generateImageFileid(inputStream, fileName);
|
||||||
GenerateDocParams generateDocParams = GenerateDocParams.builder()
|
GenerateDocParams generateDocParams = GenerateDocParams.builder()
|
||||||
.imageFileid(imageFileid)
|
.imageFileid(imageFileid)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue