From f081c298cd93f7dce82c338a695ba0f52589c086 Mon Sep 17 00:00:00 2001 From: tangfutang Date: Wed, 5 Sep 2018 15:46:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=88=E5=90=8C=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=9F=A5=E8=AF=A2=E9=99=84=E4=BB=B6=E4=B8=80=E8=A7=88?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/Tenwa/Comm/Document/DocImageShow.jsp | 9 ++++++++- .../Tenwa/Comm/Document/LBDocumentListInfo.jsp | 16 +++++++++++----- .../contractInfoAllViewList.jsp | 2 +- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/WebContent/Tenwa/Comm/Document/DocImageShow.jsp b/WebContent/Tenwa/Comm/Document/DocImageShow.jsp index c1b0be42a..113a7f64c 100644 --- a/WebContent/Tenwa/Comm/Document/DocImageShow.jsp +++ b/WebContent/Tenwa/Comm/Document/DocImageShow.jsp @@ -21,6 +21,8 @@ border-bottom:1px solid #BCBCBC;} String flowunid=CurPage.getParameter("ObjectNo"); String sObjectType=CurPage.getParameter("FlowNo"); String type=CurPage.getParameter("type"); + String query = CurPage.getParameter("query");//用于区别是不是合同查询时查询附件 + if(type==null)type=""; @@ -34,9 +36,14 @@ border-bottom:1px solid #BCBCBC;} }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%' "+otherWhere+"and rela.objecttype='"+sObjectType+"' order by lib.doc_name,O.filename"; + sql+=" where O.content_type LIKE '%image%' "+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); diff --git a/WebContent/Tenwa/Comm/Document/LBDocumentListInfo.jsp b/WebContent/Tenwa/Comm/Document/LBDocumentListInfo.jsp index 587ee173a..9acc0b3de 100644 --- a/WebContent/Tenwa/Comm/Document/LBDocumentListInfo.jsp +++ b/WebContent/Tenwa/Comm/Document/LBDocumentListInfo.jsp @@ -16,6 +16,7 @@ String sObjectType=CurPage.getParameter("FlowNo"); String proj_id = CurPage.getParameter("proj_id"); String contract_id = CurPage.getParameter("contract_id"); + String query = CurPage.getParameter("query");//用于区别是不是合同查询时查询附件 String isProduct = "Y";//是否产品相关流程Y:是,N:否 if(proj_id==null||contract_id==null){ isProduct = "N"; @@ -24,15 +25,20 @@ if(type==null)type=""; String otherWhere=""; - + String sTempletNo = "LBDocumentList";//--模板号-- + //如果是从合同查询过来的,变更模板号和O.OBJECTTYPE查询条件 + if("query".equals(query)){ + sTempletNo="LBDocumentQueryList"; + otherWhere = " and O.OBJECTTYPE in ('BusinessApplyFlow','FundPaymentCarFlow','MortgageFileFlow') "; + } if(type==""){ BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid);//流程对象 - otherWhere=DocListInitAction.getFlowWhere(flow,"","O"); + otherWhere= otherWhere+DocListInitAction.getFlowWhere(flow,"","O"); //otherWhere=" and O.proj_id='"+proj_id+"' order by O.INPUTTIME DESC"; }else if("proj".equals(type)){ - otherWhere=" and O.proj_id='"+proj_id+"' order by O.INPUTTIME DESC"; + otherWhere= otherWhere+" and O.proj_id='"+proj_id+"' order by O.INPUTTIME DESC"; }else if("contract".equals(type)){ - otherWhere=" and (O.contract_id='"+contract_id+"' OR O.proj_id='"+proj_id+"') "; + otherWhere= otherWhere+" and (O.contract_id='"+contract_id+"' OR O.proj_id='"+proj_id+"') "; } @@ -42,7 +48,7 @@ String compClientID = request.getParameter("CompClientID"); - ASObjectModel doTemp = new ASObjectModel("LBDocumentList"); + ASObjectModel doTemp = new ASObjectModel(sTempletNo); doTemp.appendJboWhere(otherWhere); ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); diff --git a/WebContent/Tenwa/Lease/Flow/Contract/contractInfoAllView/contractInfoAllViewList.jsp b/WebContent/Tenwa/Lease/Flow/Contract/contractInfoAllView/contractInfoAllViewList.jsp index fa9e8d019..c37dbcc2b 100644 --- a/WebContent/Tenwa/Lease/Flow/Contract/contractInfoAllView/contractInfoAllViewList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Contract/contractInfoAllView/contractInfoAllViewList.jsp @@ -37,7 +37,7 @@ function viewAllFlowAttachment(){ alert("参数不能为空!"); return ; } - var sparm='proj_id='+proj_id+'&contract_id='+sPara+"&type=contract&IsHistory=true"; + var sparm='proj_id='+proj_id+'&contract_id='+sPara+"&type=contract&IsHistory=true&query=query"; AsControl.OpenTab(sUrl,sparm,{title:'流程附件信息'}); }