<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="com.yc.service.build.top.BuildTopIfc"%> <%@page import="org.springframework.web.context.WebApplicationContext"%> <%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%> <% StringBuilder printLink = new StringBuilder();//打印下来按钮 StringBuilder printButton = new StringBuilder();//打印button按钮 StringBuilder funcLink = new StringBuilder();//链接下拉按钮 StringBuilder funcLinkButton = new StringBuilder();//链接button按钮 String _1 = "1".intern(); //标识1 boolean printHasExpression = [?printHasExpression];//是否有表达式 //boolean linkHasExpression = [?linkHasExpression];//是否有表达式 if(printHasExpression){//有表达式拼装sql String reportSql = "[?getReportSQL]"; reportSql = com.yc.utils.RequestParameterUtils.replaceRequestExpression(reportSql,request,session); List> reportInfo =null; try{ com.yc.multiData.SpObserver.setDBtoInstance("_"+session.getAttribute(SessionKey.DATA_BASE_ID)); reportInfo=sqlQueryIfc.queryForList(reportSql,null);//打印链接信息 com.yc.service.build.top.PrintLinkSpellUtils.spellPrintLink(reportInfo,formId,formType,printLink,printButton); }catch(Exception e){ throw new Exception(e.getMessage().replace("'","\\'")+"-打印设置表达式有错误!"); //out.println(""); //return; }finally{ com.yc.multiData.SpObserver.setDBtoInstance(); } } String notExpressionFuncLink="[?notExpressionFuncLink]"; String notExpressionFuncLinkButton="[?notExpressionFuncLinkButton]"; WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(getServletContext()); BuildTopIfc buildTopIfc = (BuildTopIfc)wac.getBean("BuildTopImpl"); Map map =null; try{ com.yc.multiData.SpObserver.setDBtoInstance("_"+session.getAttribute(SessionKey.DATA_BASE_ID)); map=buildTopIfc.buildFuncLinkExpression(formId,formType,doccode,request,session,notExpressionFuncLink,notExpressionFuncLinkButton); }catch(Exception e){ throw new Exception(e.getMessage().replace("'","\\'")+"-功能链接设置表达式有错误!"); // out.println(""); // return; }finally{ com.yc.multiData.SpObserver.setDBtoInstance(); } %>
<%if(map.size()>0){ %> <%=map.get("funcLink").toString() %> <%} %>
<%if(printHasExpression){ %> <%=printLink %> <%}else{ %> [?printLink] <%}if(_1==isSuperUser){%>
其他格式
<%} %>
<%if((profile&FormOpUtil.openQuery)>0){%> 执行 <%}%> 选择 更多 帮助 <% ////打印链接 if((profile&FormOpUtil.printButton)>0){ if(printHasExpression){ %> <%=printButton %> <%}else{ %> [?printButton] <%} } ////////功能链接 %> <%if(map.get("funcLinkButton").toString().length()>0){ %> <%=map.get("funcLinkButton") %> <%} %>
<%if(map.get("funcLink").toString().length()>0){ %> <%} %> <% if(((profile&FormOpUtil.printButton)>0&&[?printLinkLength]>0)||printLink.length()>0||_1==isSuperUser){%> <%} com.yc.service.commons.GfieldIfc gfieldIfc = (com.yc.service.commons.GfieldIfc)com.yc.factory.FactoryBean.getBean("GfieldImpl"); List> exportList =null; StringBuilder sb1 = new StringBuilder(); try{ com.yc.multiData.SpObserver.setDBtoInstance("_"+session.getAttribute(SessionKey.DATA_BASE_ID)); exportList=gfieldIfc.getExportInfo(formId); com.yc.service.build.top.ExportSpellUtils.spellLink(exportList, sb1,profile); }catch(Exception e){ throw e; //out.println(""); }finally{ com.yc.multiData.SpObserver.setDBtoInstance(); } if(sb1.length()>0){ %> <%} %>
功能链接: <%=map.get("funcLink") %>
打印格式: <%if(printHasExpression){ %> <%=printLink %> <%}else{ %> [?printLink] <%}if(_1==isSuperUser){%>
其他格式
<%} %>
导入导出: <%out.print(sb1.toString());%>
<%_1 = null; printLink=null; printButton=null; funcLink=null; funcLinkButton=null; %>