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 b9d249b15..5723082a9 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerRelaProjToContractBusiness.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/LBCustomerRelaProjToContractBusiness.java @@ -8,6 +8,8 @@ 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_COMPANY; +import jbo.app.tenwa.customer.CUSTOMER_COMPANY_TEMP; import jbo.app.tenwa.customer.CUSTOMER_FAMILY; import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP; import jbo.app.tenwa.customer.CUSTOMER_PERSON; @@ -32,6 +34,7 @@ public class LBCustomerRelaProjToContractBusiness extends BaseBussiness { this.initBussinessParam(Sqlca); MapfromCondtion=new HashMap(); fromCondtion.put("PROJECT_ID",this.getAttribute("ProjectId").toString()); + String customerType = this.getAttribute("customertype").toString(); Map other=new HashMap(); other.put("flowunid",this.getAttribute("FlowUnid").toString()); @@ -43,7 +46,11 @@ public class LBCustomerRelaProjToContractBusiness extends BaseBussiness { for(BizObject union:unionList){ fromCondtion.clear(); fromCondtion.put("customerid", union.getAttribute("customer_id").getString()); - DataOperatorUtil.copyJBOSet(CUSTOMER_PERSON.CLASS_NAME, fromCondtion, CUSTOMER_PERSON_TEMP.CLASS_NAME, null, other, null, Sqlca); + if("01".equals(customerType)){ + DataOperatorUtil.copyJBOSet(CUSTOMER_COMPANY.CLASS_NAME, fromCondtion, CUSTOMER_COMPANY_TEMP.CLASS_NAME, null, other, null, Sqlca); + }else if ("03".equals(customerType)){ + 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_ADDRESS.CLASS_NAME, fromCondtion, CUSTOMER_ADDRESS_TEMP.CLASS_NAME, null, other, null, Sqlca); // DataOperatorUtil.copyJBOSet(CUSTOMER_FAMILY.CLASS_NAME, fromCondtion, CUSTOMER_FAMILY_TEMP.CLASS_NAME, null, other, null, Sqlca);