diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit_Car/LBGuaranteeUnitInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit_Car/LBGuaranteeUnitInfo.jsp index aa14d5375..b62a7c859 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit_Car/LBGuaranteeUnitInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit_Car/LBGuaranteeUnitInfo.jsp @@ -60,9 +60,11 @@ // s=s+"'"+GuaranteeTypes[i]+"'"+","; //} //s=s.substring(0, s.length()-1); + String ProjectId= CurPage.getParameter("ProjectId"); String sTempletNo = "LBGuaranteeUnitInfoTemp_Car";//--模板号-- ASObjectModel doTemp = new ASObjectModel(sTempletNo); doTemp.setDefaultValue("ASSUROR", customerid); + doTemp.setDefaultValue("PROJECT_ID", ProjectId); doTemp.setDefaultValue("DATA_STATE", "common");//标记该数据是共同申请人 doTemp.setHtmlEvent("CERTID","onChange","changeCertid"); //doTemp.setHtmlEvent("DRIVERLICENSE","onchange","checkDriver"); diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit_Car/LBGuaranteeUnitList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit_Car/LBGuaranteeUnitList.jsp index 81ffaa8f5..099d5bc2c 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit_Car/LBGuaranteeUnitList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit_Car/LBGuaranteeUnitList.jsp @@ -31,6 +31,7 @@ <%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List02;Describe=定义变量,获取参数;]~*/%> <% String sFlowUnid = CurPage.getParameter("FlowUnid");//流程编号 + String sProjectId = CurPage.getParameter("ProjectId"); if(sFlowUnid == null)sFlowUnid = ""; String sTempletNo = CurPage.getParameter("TempletNo");//模板号 if(sTempletNo == null) sTempletNo = "LBGuaranteeUnitListTemp_Car"; @@ -100,7 +101,7 @@ if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory. function newRecord(){ var sUrl = "/Tenwa/Lease/Flow/Comm/LBGuaranteeUnit_Car/LBGuaranteeUnitInfo.jsp"; - var sparam = 'FlowUnid='+'<%=sFlowUnid%>'+"&ListTempletNo="+"<%=sTempletNo%>&TaskNo=<%=taskno%>";//流程编号 + var sparam = 'FlowUnid='+'<%=sFlowUnid%>'+'&ProjectId='+'<%=sProjectId%>'+"&ListTempletNo="+"<%=sTempletNo%>&TaskNo=<%=taskno%>";//流程编号 AsControl.OpenView(sUrl,sparam,"_self",""); } diff --git a/src_tenwa/com/tenwa/action/channelportal/businesshanding/contractaward/ContractAward.java b/src_tenwa/com/tenwa/action/channelportal/businesshanding/contractaward/ContractAward.java index 2fd3b0b56..626f4d454 100644 --- a/src_tenwa/com/tenwa/action/channelportal/businesshanding/contractaward/ContractAward.java +++ b/src_tenwa/com/tenwa/action/channelportal/businesshanding/contractaward/ContractAward.java @@ -9,7 +9,7 @@ import jbo.app.tenwa.calc.LC_PROJ_CONDITION; import jbo.app.tenwa.doc.LB_DOCATTRIBUTE; import jbo.app.tenwa.doc.LB_DOCLIBRARY; import jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST; -import jbo.com.tenwa.lease.comm.BUSINESS_STATUS; +import jbo.com.tenwa.lease.carbrand.BUSINESS_STATUS; import jbo.com.tenwa.lease.comm.LB_CONTRACT_STATUS; import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO; import jbo.sys.CHANNEL_SUBMIT_APPLICATIONS; diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerRelaProjToContractBusiness.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerRelaProjToContractBusiness.java index d145f2ba6..aef64504c 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerRelaProjToContractBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerRelaProjToContractBusiness.java @@ -13,6 +13,7 @@ import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP; import jbo.app.tenwa.customer.CUSTOMER_PERSON; import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP; import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT; +import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP; import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE; import com.amarsoft.are.jbo.BizObject; @@ -46,13 +47,15 @@ public class LBCustomerRelaProjToContractBusiness extends BaseBussiness { } for(BizObject unit:unitList){ fromCondtion.clear(); - if(!("guarantee".equals(unit.getAttribute("DATA_STATE").toString()))){ - fromCondtion.put("customerid", unit.getAttribute("ASSUROR").getString()); - DataOperatorUtil.copyJBOSet(CUSTOMER_PERSON.CLASS_NAME, fromCondtion, CUSTOMER_PERSON_TEMP.CLASS_NAME, null, other, null, Sqlca); - DataOperatorUtil.copyJBOSet(CUSTOMER_CERT.CLASS_NAME, fromCondtion, CUSTOMER_CERT_TEMP.CLASS_NAME, null, other, null, Sqlca); - DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY.CLASS_NAME, fromCondtion, CUSTOMER_FAMILY_TEMP.CLASS_NAME, null, other, null, Sqlca); - DataOperatorUtil.copyJBOSet(CUSTOMER_ADDRESS.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS_TEMP.CLASS_NAME, null, other, null, Sqlca); - } + fromCondtion.put("id", unit.getAttribute("id").getString()); + DataOperatorUtil.copySingleJBO(LB_GUARANTEE_UNIT.CLASS_NAME, fromCondtion, LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, null, other, Sqlca); + + fromCondtion.clear(); + fromCondtion.put("customerid", unit.getAttribute("ASSUROR").getString()); + DataOperatorUtil.copyJBOSet(CUSTOMER_PERSON.CLASS_NAME, fromCondtion, CUSTOMER_PERSON_TEMP.CLASS_NAME, null, other, null, Sqlca); + DataOperatorUtil.copyJBOSet(CUSTOMER_CERT.CLASS_NAME, fromCondtion, CUSTOMER_CERT_TEMP.CLASS_NAME, null, other, null, Sqlca); + DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY.CLASS_NAME, fromCondtion, CUSTOMER_FAMILY_TEMP.CLASS_NAME, null, other, null, Sqlca); + DataOperatorUtil.copyJBOSet(CUSTOMER_ADDRESS.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS_TEMP.CLASS_NAME, null, other, null, Sqlca); } String sMessage="true"; diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerRelaTempToFormalBusiness.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerRelaTempToFormalBusiness.java index 5415463ee..cac6f73d0 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerRelaTempToFormalBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerRelaTempToFormalBusiness.java @@ -48,6 +48,10 @@ public class LBCustomerRelaTempToFormalBusiness extends BaseBussiness { DataOperatorUtil.copyJBOSet(CUSTOMER_ADDRESS_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS.CLASS_NAME, toCondtion, null, cc, Sqlca); } for(BizObject unit:unitList){ + fromCondtion.clear(); + fromCondtion.put("id",unit.getAttribute("id").toString()); + DataOperatorUtil.copySingleJBO(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, fromCondtion, LB_GUARANTEE_UNIT.CLASS_NAME, null, null, Sqlca); + fromCondtion.clear(); fromCondtion.put("customerid",unit.getAttribute("ASSUROR").getString()); fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString()); diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBGuaranteeUnitTempToFormalBusiness.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBGuaranteeUnitTempToFormalBusiness.java index 4ea76af7a..165d7a35f 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBGuaranteeUnitTempToFormalBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBGuaranteeUnitTempToFormalBusiness.java @@ -4,6 +4,10 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import jbo.app.tenwa.customer.CUSTOMER_ADDRESS; +import jbo.app.tenwa.customer.CUSTOMER_ADDRESS_TEMP; +import jbo.app.tenwa.customer.CUSTOMER_CERT; +import jbo.app.tenwa.customer.CUSTOMER_CERT_TEMP; import jbo.app.tenwa.customer.CUSTOMER_PERSON; import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP; import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT; @@ -36,6 +40,7 @@ public class LBGuaranteeUnitTempToFormalBusiness extends BaseBussiness { Map fromCondtion = new HashMap(); Map otherProperty = new HashMap(); BizObjectManager lgut = JBOFactory.getBizObjectManager(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME,Sqlca); + //担保人从临时表导正式表 List lguts = lgut.createQuery("select * from O left join jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP cpt " + "on O.ASSUROR=cpt.CUSTOMERID where O.flowunid=:flowUnid and O.DATA_STATE='guarantee'") .setParameter("flowUnid", flowunid).getResultList(false); @@ -51,6 +56,24 @@ public class LBGuaranteeUnitTempToFormalBusiness extends BaseBussiness { fromCondtion.put("CUSTOMERID",lgu.getAttribute("ASSUROR").toString()); DataOperatorUtil.copySingleJBO(CUSTOMER_PERSON_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_PERSON.CLASS_NAME, null, null, Sqlca); } + //共同申请人从 + List lgutc = lgut.createQuery("select * from O where O.flowunid=:flowUnid and O.DATA_STATE='guarantee'") + .setParameter("flowUnid", flowunid).getResultList(false); + for (BizObject lgu:lguts) { + if(fromCondtion.size()>0){ + fromCondtion.clear(); + } + fromCondtion.put("id",lgu.getAttribute("id").toString()); + DataOperatorUtil.copySingleJBO(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, fromCondtion, LB_GUARANTEE_UNIT.CLASS_NAME, null, null, Sqlca); + if(fromCondtion.size()>0){ + fromCondtion.clear(); + } + fromCondtion.put("CUSTOMERID",lgu.getAttribute("ASSUROR").toString()); + fromCondtion.put("flowunid",flowunid); + DataOperatorUtil.copySingleJBO(CUSTOMER_PERSON_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_PERSON.CLASS_NAME, null, null, Sqlca); + DataOperatorUtil.copySingleJBO(CUSTOMER_CERT_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_CERT.CLASS_NAME, null, null, Sqlca); + DataOperatorUtil.copySingleJBO(CUSTOMER_ADDRESS_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS.CLASS_NAME, null, null, Sqlca); + } String sMessage="true"; return sMessage; }