更新担保人和共同申请人

This commit is contained in:
tangfutang 2018-06-24 18:04:21 +08:00
parent 4c17d7b554
commit b04c804b23
6 changed files with 42 additions and 9 deletions

View File

@ -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");

View File

@ -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","");
}

View File

@ -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;

View File

@ -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";

View File

@ -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());

View File

@ -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<String,String> fromCondtion = new HashMap<String,String>();
Map<String,String> otherProperty = new HashMap<String,String>();
BizObjectManager lgut = JBOFactory.getBizObjectManager(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME,Sqlca);
//担保人从临时表导正式表
List<BizObject> 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<BizObject> 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;
}