|
发表于 2021-1-6 12:09:56
|
显示全部楼层
本地测试后端服务中拼接的url,导出pdf没问题
- public static Table reportAttachmentImageUrl(){
- String ksql = "select fjtp.* from AP_FJTP fjtp";
- Table table = KSQL.select(ksql, null, "/appdemo/test/data", null);
- Iterator<Row> it = table.iterator();
- while (it.hasNext()){
- Row r = it.next();
- String v = r.getString("fAttachmentPicture");//取出图片字段
- if(!Utils.isEmptyString(v) && !v.equals("[]")){
- JSONArray json = JSONArray.parseArray(v);
- JSONObject jsonObject = json.getJSONObject(0);
- String docPath = jsonObject.getString("docPath");
- String fileID = jsonObject.getString("fileID");
- try {
- String urlPattern = "/repository/file/view/"+fileID+"/last/content";
- String url = addBsessionid(DocAdapter.queryNoPermissionHost(true, docPath, urlPattern, true)); //通过docPath和fileID获得图片的url
- r.setString("fAttachmentPicture", url); //将url存入table对象
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
- }
- return table;
- }
复制代码 |
|