<%@ page contentType="text/html; charset=GBK"%> <%@ include file="/IncludeBegin.jsp"%> <%@ page import="com.tenwa.doc.action.DocListInitAction" %> <%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %> <%@ page import="java.util.List" %> <% String flowunid=CurPage.getParameter("ObjectNo"); String sObjectType=CurPage.getParameter("FlowNo"); String type=CurPage.getParameter("type"); String query = CurPage.getParameter("query");//用于区别是不是合同查询时查询附件 if(type==null)type=""; String otherWhere=""; if(type==""){ BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid);//流程对象 otherWhere=DocListInitAction.getFlowWhere(flow,"","rela"); }else if("proj".equals(type)){ otherWhere=" and rela.proj_id='"+CurPage.getParameter("proj_id")+"'"; }else if("contract".equals(type)){ otherWhere=" and (rela.contract_id='"+CurPage.getParameter("contract_id")+"' OR rela.proj_id='"+CurPage.getParameter("proj_id")+"')"; } if("query".equals(query)){ otherWhere = otherWhere+" and rela.objecttype in ('BusinessApplyFlow','FundPaymentCarFlow','MortgageFileFlow') "; }else{ otherWhere = otherWhere+" and rela.objecttype='"+sObjectType+"' "; } String compClientID = request.getParameter("CompClientID"); String sql="select O.id,lib.doc_name,filename from O left join jbo.app.tenwa.doc.LB_DOCLIBRARY lib on o.library_id=lib.id left join jbo.app.tenwa.doc.LB_DOCRELATIVE rela on lib.relative_id=rela.id"; sql+=" where O.content_type LIKE '%image%' and O.DELETEED<>'Y' or O.DELETEED is null"+otherWhere+" order by lib.doc_name,O.filename"; System.out.println(sql); List list=JBOFactory.createBizObjectQuery("jbo.app.tenwa.doc.LB_DOCATTRIBUTE", sql).getResultList(false); %>
<% String beforeClass=""; for(int i=0;i <%=list.get(i).getAttribute("doc_name").getString() %>
    <%}else{ if(!beforeClass.equals(list.get(i).getAttribute("doc_name").getString())){ beforeClass=list.get(i).getAttribute("doc_name").getString(); %>
<%=list.get(i).getAttribute("doc_name").getString() %>
    <% }} %>
  • ','<%=list.get(i).getAttribute("doc_name").getString()+"-->"+list.get(i).getAttribute("filename").getString()%>')" title="<%=list.get(i).getAttribute("doc_name").getString()+"-->"+list.get(i).getAttribute("filename").getString() %>" data-original="<%=sWebRootPath%>/servlet/view/image?CompClientID=<%=compClientID%>&attrid=<%=list.get(i).getAttribute("id").getString() %>" src="<%=sWebRootPath%>/servlet/view/image?CompClientID=<%=compClientID%>&attrid=<%=list.get(i).getAttribute("id").getString() %>" />
  • <%if(i==list.size()-1){%>
<%} %> <%}%>
<%@ include file="/IncludeEnd.jsp"%>