%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%>
<%@ page import="com.amarsoft.dict.als.manage.NameManager" %>
<%
String docClassItemno=CurPage.getAttribute("DOCNO");//承租人基本资料
String mainType=CurPage.getAttribute("mainType");//类型
String compClientID = request.getParameter("CompClientID");
String sObjectType = CurPage.getParameter("ObjectType"); //对象类型
String sObjectNo = CurPage.getParameter("ObjectNo"); //对象编号
String sRightType=CurPage.getParameter("RightType");
String sTempletNo=CurPage.getParameter("TempletNo");
List fbo=null;
fbo=JBOFactory.getBizObjectManager("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT").createQuery("select O.PRODUCTID from O where O.flow_unid=:flowunid").setParameter("flowunid", sObjectNo).getResultList(false);
String productid=fbo.get(0).getAttribute("PRODUCTID").getString();
String sParam= "ObjectType="+sObjectType+"&ObjectNo="+sObjectNo+"&RightType="+sRightType+"&TempletNo="+sTempletNo+"&mainType="+mainType;
List cust=null;
if("Customer".equals(mainType)&&!productid.equals("004")){
cust=JBOFactory.getBizObjectManager("jbo.app.tenwa.customer.CUSTOMER_INFO").createQuery("select O.customerid,O.customername from O left join jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP les on O.customerid=les.customer_id where les.flowunid=:flowunid").setParameter("flowunid", sObjectNo).getResultList(false);
}else if("Customer".equals(mainType)&&productid.equals("004")){
cust=JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP").createQuery("select cpt.customerid,cpt.fullname from O left join jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP cpt on cpt.customerid=O.customer_id and O.flowunid=cpt.flowunid where O.flowunid=:flowunid").setParameter("flowunid", sObjectNo).getResultList(false);
}else if("Guarantee".equals(mainType)){
cust=JBOFactory.getBizObjectManager("jbo.app.tenwa.customer.CUSTOMER_INFO").createQuery("select O.customerid,O.customername from O left join jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP unit on O.customerid=unit.assuror where unit.flowunid=:flowunid").setParameter("flowunid", sObjectNo).getResultList(false);
}else if("Guarantees".equals(mainType)){
cust=JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP").createQuery("select cpt.customerid,cpt.fullname from O left join jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP cpt on cpt.customerid=O.assuror and O.flowunid=cpt.flowunid where O.flowunid=:flowunid").setParameter("flowunid", sObjectNo).getResultList(false);
}else if("Payfiles".equals(mainType)){
cust=JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP").createQuery("select cpt.customerid,cpt.fullname from O left join jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP cpt on cpt.customerid=O.customer_id and O.flowunid=cpt.flowunid where O.flowunid=:flowunid").setParameter("flowunid", sObjectNo).getResultList(false);
}else if("Customer_Fact".equals(mainType)){
cust=JBOFactory.getBizObjectManager("jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR_TEMP").createQuery("select O.d_id,O.d_name from O where O.flowunid=:flowunid").setParameter("flowunid", sObjectNo).getResultList(false);
}
//List cust=JBOFactory.getBizObjectManager("jbo.app.tenwa.customer.CUSTOMER_INFO").createQuery("customerid in ('2017042100000006','2017042100000008')").getResultList(false);
for(int i=0;i
<%--