|
@@ -130,7 +130,7 @@ public class BusJcbFdfxjyqController extends BaseController {
|
|
|
|
|
|
|
|
@ApiOperation(value = "导出")
|
|
@ApiOperation(value = "导出")
|
|
|
@GetMapping("/export")
|
|
@GetMapping("/export")
|
|
|
- public AjaxResult export(@RequestParam String id) {
|
|
|
|
|
|
|
+ public AjaxResult export(@RequestParam String id) throws InterruptedException {
|
|
|
//获取基础数据
|
|
//获取基础数据
|
|
|
BusJcbFdfxjyq info = busJcbFdfxjyqService.getInfo(id);
|
|
BusJcbFdfxjyq info = busJcbFdfxjyqService.getInfo(id);
|
|
|
WordUtils wordUtil=new WordUtils();
|
|
WordUtils wordUtil=new WordUtils();
|
|
@@ -166,6 +166,8 @@ public class BusJcbFdfxjyqController extends BaseController {
|
|
|
header.put("height", 110);
|
|
header.put("height", 110);
|
|
|
header.put("type", "jpg");
|
|
header.put("type", "jpg");
|
|
|
InputStream inputStream = HttpUtils.sendGetStream(info.getPicUrl(), "");
|
|
InputStream inputStream = HttpUtils.sendGetStream(info.getPicUrl(), "");
|
|
|
|
|
+ //解决网络传输造成流读取不全问题
|
|
|
|
|
+ Thread.sleep(200);
|
|
|
header.put("content", WordUtils.inputStream2ByteArray(inputStream, true));
|
|
header.put("content", WordUtils.inputStream2ByteArray(inputStream, true));
|
|
|
params.put("${header}",header);
|
|
params.put("${header}",header);
|
|
|
|
|
|