修改网约车模板带值

This commit is contained in:
tangfutang 2018-10-23 14:43:15 +08:00
parent a4c5ecbc8a
commit a9b71485c3
2 changed files with 32 additions and 5 deletions

View File

@ -2,6 +2,7 @@
<%@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="com.amarsoft.app.check.CheckFLowPhaseNo"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
@ -20,6 +21,8 @@
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;
}
@ -34,27 +37,46 @@
String sTempletNo = "BaseFileTemplateSelect";//--模板号--
//获取对应的承租信息
String certid=null;
String mobile=null;
String address=null;
String certid="";
String mobile="";
String address="";
//网约车挂靠方信息
String NetMortgagor = "";
String NetCertid = "";
String NetMobile = "";
/* 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 FROM o where o.customerid =:customerid";
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);
String sSql = "select o.certid,o.mobile,o.nativeplace FROM o where o.customerid =:customerid and o.flowunid=:flowunid";
String sSql = "select o.certid,o.mobile,o.nativeplace,o.fullname FROM o where o.customerid =:customerid and o.flowunid=:flowunid";
BizObject cpt = cptm.createQuery(sSql).setParameter("customerid", customerid).setParameter("flowunid", flowunid).getSingleResult(false);
certid=cpt.getAttribute("certid").getString();
mobile=cpt.getAttribute("mobile").getString();
address=cpt.getAttribute("nativeplace").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 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();
}else{
NetCertid = certid;
NetMobile = mobile;
}
}
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
@ -264,6 +286,9 @@
tempParam["certid"]="<%=certid%>";
tempParam["mobile"]="<%=mobile%>";
tempParam["address"]="<%=address%>";
tempParam["NETMORTGAGOR"]="<%=NetMortgagor%>";
tempParam["NETCERTID"]="<%=NetCertid%>";
tempParam["NETMOBILE"]="<%=NetMobile%>";
tempParam["fileSavePath"]="<%=CurConfig.getConfigure("FileSavePath")%>";

View File

@ -754,6 +754,7 @@
setItemRequired(0,"TRANSPORTDATE",true);
setItemRequired(0,"NETCERTID",true);
setItemRequired(0,"LEGALPERSONID",true);
document.getElementById("NETCERTNAME").value = '营业执照';
}else{
$("#A_Group_0040").attr("style","display:none;");
setItemRequired(0,"IS_OPERATION",false);
@ -771,6 +772,7 @@
setItemRequired(0,"TRANSPORTDATE",false);
setItemRequired(0,"NETCERTID",false);
setItemRequired(0,"LEGALPERSONID",false);
document.getElementById("NETCERTNAME").value = '';
}
}
</script>