合同制作流程结束更新contract_id

This commit is contained in:
tangfutang 2018-07-17 16:18:37 +08:00
parent 03d0f5c10f
commit 1e34c977f6
2 changed files with 86 additions and 1 deletions

View File

@ -58,9 +58,12 @@ public class BaseBussiness extends Bizlet {
return fromCondtion;
}
public Map<String,String>getDefaultTempToFormalToCondtion() throws Exception{
String flowname=(String)this.getAttribute("FlowName");
Map<String,String> toCondtion=new HashMap<String,String>();
toCondtion.put("PROJECT_ID",this.getAttribute("ProjectId").toString());
toCondtion.put("CONTRACT_ID",this.getAttribute("ContractId").toString());
if(!"ºÏÍ¬ÖÆ×÷Á÷³Ì".equals(flowname)){
toCondtion.put("CONTRACT_ID",this.getAttribute("ContractId").toString());
}
return toCondtion;
}

View File

@ -0,0 +1,82 @@
package com.tenwa.lease.flow.project.commbusiness;
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_FAMILY;
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 jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.baseBussion.BaseBussiness;
import com.tenwa.lease.flow.project.businessapply.CustomerCompare;
public class LBCustomerRelaTempToFormalBusinessContract extends BaseBussiness {
@Override
public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca);
Map<String,String>fromCondtion=new HashMap<String, String>();
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());
List<BizObject> unionList= DataOperatorUtil.getSetJBO(LB_UNION_LESSEE_TEMP.CLASS_NAME, fromCondtion, Sqlca);
List<BizObject> unitList=DataOperatorUtil.getSetJBO(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, fromCondtion, Sqlca);
Map<String,String>toCondtion=new HashMap<String, String>();
Map<String,String>other=new HashMap<String, String>();
CustomerCompare cc=new CustomerCompare();
for(BizObject union:unionList){
fromCondtion.clear();
fromCondtion.put("customerid", union.getAttribute("customer_id").getString());
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());
toCondtion.clear();
toCondtion.put("customerid", union.getAttribute("customer_id").getString());
DataOperatorUtil.copyJBOSet(CUSTOMER_PERSON_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_PERSON.CLASS_NAME, toCondtion, null, cc, Sqlca);
DataOperatorUtil.copyJBOSet(CUSTOMER_CERT_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_CERT.CLASS_NAME, toCondtion, null, cc, Sqlca);
DataOperatorUtil.copyJBOSet(CUSTOMER_ADDRESS_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS.CLASS_NAME, toCondtion, null, cc, Sqlca);
DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_FAMILY.CLASS_NAME, toCondtion, null, cc, Sqlca);
}
for(BizObject unit:unitList){
fromCondtion.clear();
fromCondtion.put("customerid",unit.getAttribute("ASSUROR").getString());
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());
toCondtion.clear();
toCondtion.put("customerid", unit.getAttribute("ASSUROR").getString());
DataOperatorUtil.copyJBOSet(CUSTOMER_PERSON_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_PERSON.CLASS_NAME, toCondtion, null, cc, Sqlca);
DataOperatorUtil.copyJBOSet(CUSTOMER_CERT_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_CERT.CLASS_NAME, toCondtion, null, cc, Sqlca);
DataOperatorUtil.copyJBOSet(CUSTOMER_ADDRESS_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS.CLASS_NAME, toCondtion, null, cc, Sqlca);
DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_FAMILY.CLASS_NAME, toCondtion, null, cc, Sqlca);
fromCondtion.clear();
fromCondtion.put("id",unit.getAttribute("id").toString());
toCondtion.clear();
toCondtion.put("PROJECT_ID",this.getAttribute("ProjectId").toString());
other.clear();
other.put("CONTRACT_ID",this.getAttribute("ContractId").toString());
DataOperatorUtil.copySingleJBO(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, fromCondtion, LB_GUARANTEE_UNIT.CLASS_NAME, toCondtion, other, Sqlca);
}
//将共同申请人从临时表导正式表
fromCondtion.clear();
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());
fromCondtion.put("Partner_", "Y");
toCondtion.clear();
toCondtion.put("PROJECT_ID",this.getAttribute("ProjectId").toString());
other.clear();
other.put("CONTRACT_ID",this.getAttribute("ContractId").toString());
DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY_TEMP.CLASS_NAME, fromCondtion, CUSTOMER_FAMILY.CLASS_NAME, toCondtion, other, cc, Sqlca);
String sMessage="true";
return sMessage;
}
}