%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_simplelist.jspf"%>
<%@ page import="com.amarsoft.app.lc.workflow.action.GetFlowAction" %>
<%@ page import="com.tenwa.doc.action.DocListInitAction" %>
<%@page import="com.amarsoft.are.jbo.BizObject"%>
<%@page import="com.amarsoft.are.jbo.JBOException"%>
<%@page import="com.amarsoft.are.jbo.JBOFactory"%>
<%@page import="jbo.sys.FLOW_OBJECT"%>
<%
/*
Author: undefined 2016-09-01
Content:
History Log:
*/
String flowunid=CurPage.getParameter("ObjectNo");
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";
}
String type=CurPage.getParameter("type");
//获取当前操作节点的开始时间
String taskNo = CurPage.getParameter("TaskNo");
String beginTime = Sqlca.getString("SELECT begintime FROM flow_task WHERE serialno='"+taskNo+"'");
if(type==null)type="";
if("MortgageFileMailFlow".equals(sObjectType)){
type = "MortgageFileMailFlow";
}
String otherWhere="";
String sTempletNo = "LBDocumentList";//--模板号--
//如果是从合同查询过来的,变更模板号和O.OBJECTTYPE查询条件
if("query".equals(query)){
sTempletNo="LBDocumentQueryList";
otherWhere = " and O.OBJECTTYPE in ('BusinessApplyFlow','FundPaymentCarFlow','MortgageFileFlow') ";
}
if(type==""){
if("BusinessChangeFlow".equals(sObjectType)){
sTempletNo="ChangeFlowLBDocumentList";
String ProjectId = Sqlca.getString("SELECT proj_id FROM flow_bussiness_object WHERE flow_unid='"+flowunid+"'");
otherWhere = " and O.proj_id='"+ProjectId+"' and (O.objecttype='"+sObjectType+"' or O.objecttype='BusinessApplyFlow')";
}else if("BContractApproveFlow".equals(sObjectType)){
sTempletNo="ChangeFlowLBDocumentList";
String ProjectId = Sqlca.getString("SELECT proj_id FROM flow_bussiness_object WHERE flow_unid='"+flowunid+"'");
otherWhere = " and O.proj_id='"+ProjectId+"' and (O.objecttype='"+sObjectType+"' or O.objecttype='BusinessApplyFlow' or O.objecttype='BusinessChangeFlow')";
}else if("BContractChangeFlow".equals(sObjectType)){
sTempletNo="ChangeFlowLBDocumentList";
String ProjectId = Sqlca.getString("SELECT proj_id FROM flow_bussiness_object WHERE flow_unid='"+flowunid+"'");
otherWhere = " and O.proj_id='"+ProjectId+"' and (O.objecttype='"+sObjectType+"' or O.objecttype='BusinessApplyFlow' or O.objecttype='BusinessChangeFlow' or O.objecttype='BContractApproveFlow' )";
}else{
BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid);//流程对象
otherWhere= otherWhere+DocListInitAction.getFlowWhere(flow,"","O");
}
//otherWhere=" and O.proj_id='"+proj_id+"' order by O.INPUTTIME DESC";
}else if("proj".equals(type)){
otherWhere= otherWhere+" and O.proj_id='"+proj_id+"' order by O.INPUTTIME DESC";
}else if("contract".equals(type)){
otherWhere= otherWhere+" and (O.contract_id='"+contract_id+"' OR O.proj_id='"+proj_id+"') ";
}else if("MortgageFileMailFlow".equals(type)){
otherWhere = "AND v.EXISTS (select 1 from jbo.app.tenwa.doc.LB_FILE_MAILARCHIVING_INFO_TEMP lfmit where lfmit.contract_id = O.CONTRACT_ID and lfmit.flowunid = '"+flowunid+"' ) ";
}
String isHistory=CurPage.getParameter("IsHistory");
String RightType=CurPage.getParameter("RightType");
String userName=CurUser.getUserName();
String compClientID = request.getParameter("CompClientID");
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.appendJboWhere(otherWhere);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1";
dwTemp.MultiSelect=true;//多选
dwTemp.setPageSize(50);
dwTemp.genHTMLObjectWindow(sObjectType);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
String sButtons[][] =null;
if(!"BusinessApplyFlow".equals(sObjectType) && !"BusinessChangeFlow".equals(sObjectType) && !"BContractApproveFlow".equals(sObjectType)&& !"BContractChangeFlow".equals(sObjectType) && ((RightType!=null&&RightType.equals("ReadOnly"))||(null!=isHistory&&isHistory.equals("true")))){
RightType="ReadOnly";
sButtons=new String[][]{
};
}else{
sButtons=new String[][]{
{"true","All","Button","上传","上传","upload()","","","","btn_icon_up"},
{"true","","Button","批量下载","批量下载","downloadZipFile()","","","","btn_icon_down"},
};
}
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>