|
本帖最后由 974092312 于 2019-8-29 16:14 编辑
http://docs.wex5.com/report-blobimage/按照该链接操作无法显示图片,请问是我写错了什么嘛?
public static Table print_ZSXX(String FID,String code){
String sql = "SELECT XMHR_ZSXXB.fID AS XMHR_ZSXXB,XMHR_ZSXXB.FYGXM AS fYGXM," +
"XMHR_ZSXXB.FZSBH AS fZSBH,XMHR_ZSXXB.FZSMC AS fZSMC, " +
"'{\"fZSMC\":\"'||FZSMC ||'\"}' as fCODE,'' as fURL " +
"FROM XMHR_ZSXXB XMHR_ZSXXB where XMHR_ZSXXB.fID='"+ FID +"'";
Table table = SQL.select(sql, null, "/baseCommon/data", null);
Iterator<Row> it = table.iterator();
while (it.hasNext()) {
Row r = it.next();
try {
String url = "/UI2/system/components/justep/blob/server/download.j"
+ "?process=/XM_HR/M_ZGZZGL/process/F_YGZZDJ/f_YGZZDJProcess" //流程名称
+ "&activity=mainActivity" //环节名称
+ "&action=blobDownloadAction" //调用的Action
+ "&blobDataModel=/XM_HR/M_ZGZZGL/data" //数据模块目录
+ "&blobConcept=XMHR_ZSXXB" //概念名
+ "&blobRelation=fEWMCODE" //关系名
+ "&blobConceptValue="
+ r.getValue("XMHR_ZSXXB") //行ID
+"&$query-version="
+ com.justep.system.util.CommonUtils.createGUID();
//可新建一字段来接收url
r.setString(5, addBsessionid(url)); //将url存入table对象
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return table;
}
protected static String addBsessionid(String url) {
String bessionid = ActionUtils.getRequestContext().getSessionContext().getSessionID();
if (url.contains("?")) {
return url + "&bsessionid=" + bessionid;
} else {
return url + "?bsessionid=" + bessionid;
}
}
|
|