<%@ page contentType="text/html; charset=GBK"%> <%@page import="jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT"%> <%@page import="jbo.app.tenwa.customer.CUSTOMER_COMPANY_TEMP"%> <%@page import="jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP"%> <%@page import="jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO_TEMP"%> <%@page import="jbo.app.tenwa.customer.CUSTOMER_ADDRESS_TEMP"%> <%@page import="com.amarsoft.app.check.CheckFLowPhaseNo"%> <%@ include file="/Frame/resources/include/include_begin_info.jspf"%><% /* Author: undefined 2016-05-27 Content: 示例详情页面 History Log: */ String sPrevUrl = CurPage.getParameter("PrevUrl"); String customertype = CurPage.getParameter("customertype");//获取客户类型,用于判断生成合同的方法 String flowunid=CurPage.getParameter("FlowUnid"); String ishistory=CurPage.getParameter("IsHistory"); String proj_id=CurPage.getParameter("proj_id"); String projectId=CurPage.getParameter("ProjectId");//获取项目projectID String taskno=CurPage.getParameter("TaskNo"); String nodeNo=CurPage.getParameter("NodeNo"); String contractNo=CurPage.getParameter("ContractNo"); String FlowKey=CurPage.getParameter("FlowKey");//获取合同编号 String flowName=CurPage.getParameter("FlowName");//获取合同名称 String contractid=CurPage.getParameter("ContractId");//获取合同id String isnetcar=CurPage.getParameter("isNetCar");//获取是否是网约车 if(null==contractNo ||"null".equals(contractNo) ){ contractNo=FlowKey; } String RightType= CurPage.getParameter("RightType"); String phaseno = CheckFLowPhaseNo.run(flowunid, taskno); String sFileSaveMode = CurConfig.getConfigure("FileSaveMode"); String sFileSavePath = CurConfig.getConfigure("FileSavePath"); String sFileNameType = CurConfig.getConfigure("FileNameType"); //获取租赁方式,用于判断生成的合同类型 String leasform = CurPage.getParameter("leasform"); if(sPrevUrl == null) sPrevUrl = ""; String sTempletNo = "BaseFileTemplateSelect";//--模板号-- String product_id = Sqlca.getString("select PRODUCT_ID from lb_project_info where id='"+projectId+"'"); //获取盖章模式 String sealType = Sqlca.getString("select sealType from PRD_SPECIFIC_LIBRARY where productid='"+product_id+"'"); //获取签约模式 String signType = Sqlca.getString("select signType from PRD_SPECIFIC_LIBRARY where productid='"+product_id+"'"); //获取对应的承租信息 String certid=""; String mobile=""; String address=""; //网约车挂靠方信息 String NetMortgagor = ""; String NetCertid = ""; String NetMobile = ""; String Netaddress=""; /* BizObjectManager lultm = JBOFactory.getBizObjectManager(LB_UNION_LESSEE_temp.CLASS_NAME); String sSql = "select o.CUSTOMER_ID FROM o where o.flowunid =:flowunid"; BizObject lult = lultm.createQuery(sSql).setParameter("flowunid", flowunid).getSingleResult(false); */ String customerid = Sqlca.getString("select customer_id from lb_union_lessee_temp where flowunid='"+flowunid+"'"); if("01".equals(customertype)){ BizObjectManager cctm = JBOFactory.getBizObjectManager(CUSTOMER_COMPANY_TEMP.CLASS_NAME); String sSql = "select o.certid,o.tel,o.reg_address,o.company_name FROM o where o.customerid =:customerid"; BizObject cct = cctm.createQuery(sSql).setParameter("customerid", customerid).getSingleResult(false); certid=cct.getAttribute("certid").getString(); mobile=cct.getAttribute("tel").getString(); address=cct.getAttribute("reg_address").getString(); NetMortgagor=cct.getAttribute("company_name").getString(); }else{ BizObjectManager cptm = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME); BizObjectManager catm = JBOFactory.getBizObjectManager(CUSTOMER_ADDRESS_TEMP.CLASS_NAME); String sSql = "select o.certid,o.mobile,o.nativeplace,o.MAILING_ADDRESS,o.fullname,o.WORKADD FROM o where o.customerid =:customerid and o.flowunid=:flowunid"; String catSql = "select o.FULLADDRESS FROM o where o.customerid =:customerid and o.flowunid=:flowunid"; BizObject cpt = cptm.createQuery(sSql).setParameter("customerid", customerid).setParameter("flowunid", flowunid).getSingleResult(false); BizObject cat = catm.createQuery(catSql).setParameter("customerid", customerid).setParameter("flowunid", flowunid).getSingleResult(false); certid=cpt.getAttribute("certid").getString(); mobile=cpt.getAttribute("mobile").getString(); if("居住地址".equals(cpt.getAttribute("MAILING_ADDRESS").getString())){ address=cat.getAttribute("FULLADDRESS").getString(); }else if("户籍地址".equals(cpt.getAttribute("MAILING_ADDRESS").getString())){ address=cpt.getAttribute("nativeplace").getString(); }else if("单位地址".equals(cpt.getAttribute("MAILING_ADDRESS").getString())){ address=cpt.getAttribute("WORKADD").getString(); } NetMortgagor=cpt.getAttribute("fullname").getString(); } //给网约车模板 if("1".equals(isnetcar)){ BizObjectManager cctm = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO_TEMP.CLASS_NAME); String sSql = "select o.IS_AFFILIATED,o.NETCERTID,o.AFFILIATEDNAME,o.AFFILIATEDACTUALADDRESS FROM o where o.flowunid =:flowunid"; BizObject cct = cctm.createQuery(sSql).setParameter("flowunid", flowunid).getSingleResult(false); if("1".equals(cct.getAttribute("IS_AFFILIATED").getString())){ NetMortgagor = cct.getAttribute("AFFILIATEDNAME").getString(); NetCertid = cct.getAttribute("NETCERTID").getString(); Netaddress = cct.getAttribute("AFFILIATEDACTUALADDRESS").getString(); }else{ NetCertid = certid; NetMobile = mobile; Netaddress = address; } } ASObjectModel doTemp = new ASObjectModel(sTempletNo); String a="false";//融资租赁 String b="false";//保理 String c="false";//直租 String d="false";//回租 //查询contract_id String sContractId = "";//合同表的主键 String sProjId="";//项目表主键 String sProductId=""; String LeaseType=""; BizObjectManager bomcl = JBOFactory.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME); String sSql = "select o.proj_id,o.contract_id,o.productId FROM o where o.flow_unid =:flow_unid"; BizObject bocl = bomcl.createQuery(sSql).setParameter("flow_unid", flowunid).getSingleResult(false); if (bocl != null) { sContractId= bocl.getAttribute("contract_id").getString(); sProjId=bocl.getAttribute("proj_id").getString(); sProductId=bocl.getAttribute("productId").getString(); } /* if (sProductId.equals("0005")){ LeaseType="DoubleLease"; }else if(sProductId.equals("0001")){ LeaseType="NormalLease"; }else if(sProductId.equals("004")){ LeaseType="CarBusiness"; }else{ LeaseType="NoBusiness"; } */ doTemp.setHtmlEvent("ONECLASSIFY","onchange","initTwoClass"); doTemp.setHtmlEvent("TWOCLASSIFY","onchange","initThreeClass"); doTemp.setHtmlEvent("THREECLASSIFY","onchange","initFourClass"); doTemp.setHtmlEvent("FOURCLASSIFY","onchange","loadFileTemplateClasses"); CurPage.getCurComp().setAttribute("RightType", null); //doTemp.setColTips("", "测试"); ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); dwTemp.Style = "2";//freeform //dwTemp.ReadOnly = "-2";//只读模式 dwTemp.genHTMLObjectWindow(CurPage.getParameter("id")); CurPage.getCurComp().setAttribute("RightType", RightType); //isShowButton=false; String compClientID = request.getParameter("CompClientID"); String sparm=""; dwTemp.replaceColumn("LBContractTemplateList", "", CurPage.getObjectWindowOutput()); String sButtons[][] = null; if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){ dwTemp.ReadOnly = "-2"; sButtons=new String[][]{ {phaseno.equals("0010")&&(!RightType.equals("ReadOnly"))?"true":"false","","Button","生成合同","生成合同","createContractByTemplate()","","","","btn_icon_up",""} }; }else{ sButtons=new String[][] { {phaseno.equals("0010")&&(!RightType.equals("ReadOnly"))?"true":"false","","Button","生成合同","生成合同","createContractByTemplate()","","","","btn_icon_up",""} }; } dwTemp.replaceColumn("contracttemplate", "
请稍等。。。。。。
", CurPage.getObjectWindowOutput()); %><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> <%@ include file="/Frame/resources/include/include_end.jspf"%>