|
@@ -2039,7 +2039,9 @@ public class ExcelTabController extends BladeController {
|
|
|
@ApiOperation(value = "下载pdf数据")
|
|
|
@ApiImplicitParam(name = "id", value = "fileId")
|
|
|
public void downBussPdf(String id,HttpServletResponse response) throws Exception {
|
|
|
-
|
|
|
+ if (id == null || id.trim().isEmpty()) {
|
|
|
+ throw new ServiceException("暂无PDF数据");
|
|
|
+ }
|
|
|
//获取节点下的所有表单,和附件,如果表单全是隐藏的,并且没有附件,则提示暂无数据
|
|
|
String sql = "select name,pdf_url,e_visa_pdf_url,node_pdf_url from u_information_query where id = " + id;
|
|
|
List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
|
|
@@ -2058,7 +2060,7 @@ public class ExcelTabController extends BladeController {
|
|
|
if (pdfUrl.isEmpty()) {
|
|
|
throw new ServiceException("暂无PDF数据");
|
|
|
}
|
|
|
- fileName = URLEncoder.encode(fileName, Charsets.UTF_8.name());
|
|
|
+// fileName = URLEncoder.encode(fileName, Charsets.UTF_8.name());
|
|
|
InputStream redio = CommonUtil.getOSSInputStream(pdfUrl);
|
|
|
byte[] buffer = IoUtil.readToByteArray(redio);
|
|
|
OutputStream toClient = new BufferedOutputStream(response.getOutputStream());
|