<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-4-11 上午09:46:28  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
            	begin
            		hls_bp_master_pkg.ins_hls_bp_master(
            				  p_bp_id                  =>${@bp_id},
                              p_bp_code                =>${@bp_code},
                              p_bp_name                =>${@bp_name},
                              p_extra_nam              =>${@extra_nam},
                              p_bp_class               =>${@bp_class},
                              p_bp_category            =>${@bp_category},
                              p_bp_type                =>${@bp_type},
                              p_bp_title               =>${@bp_title},
                              p_search_term_1          =>${@search_term_1},
                              p_search_term_2          =>${@search_term_2},
                              p_external_bp_code       =>${@external_bp_code},
                              p_address_id             =>${@address_id},
                              p_enabled_flag           =>${@enabled_flag},
                              p_first_name             =>${@first_name},
                              p_middle_name            =>${@middle_name},
                              p_last_name              =>${@last_name},
                              p_gender                 =>${@gender},
                              p_nationality            =>${@nationality},
                              p_date_of_birth          =>to_date(${@date_of_birth},'yyyy-mm-dd hh24:mi:ss'),
                              p_place_of_birth         =>${@place_of_birth},
                              p_name_at_birth          =>${@name_at_birth},
                              p_marital_status         =>${@marital_status},
                              p_number_of_children     =>${@number_of_children},
                              p_academic_background    =>${@academic_background},
                              p_age                    =>${@age},
                              p_id_type                =>${@id_type},
                              p_id_card_no             =>${@id_card_no},
                              p_annual_income          =>${@annual_income},
                              p_currency               =>${@currency},
                              p_capital_of_family      =>${@capital_of_family},
                              p_liability_of_family    =>${@liability_of_family},
                              p_legal_form             =>${@legal_form},
                              p_industry               =>${@industry},
                              p_business_license_num   =>${@business_license_num},
                              p_corporate_code         =>${@corporate_code},
                              p_organization_code      =>${@organization_code},
                              p_tax_registry_num       =>${@tax_registry_num},
                              p_registered_place       =>${@registered_place},
                              p_founded_date           =>to_date(${@founded_date},'yyyy-mm-dd hh24:mi:ss'),
                              p_registered_capital     =>${@registered_capital},
                              p_balance_sheet_currency =>${@balance_sheet_currency},
                              p_user_id                =>${/session/@user_id},
                              p_company_id             =>${/session/@company_id},
                              p_invoice_title                => ${@invoice_title},
                              p_primary_business             => ${@primary_business},
                              p_paid_up_capital              => ${@paid_up_capital},
                              p_main_products                => ${@main_products},
                              p_taxpayer_type                => ${@taxpayer_type},
                              p_invoice_bp_address_phone_num => ${@invoice_bp_address_phone_num}, 
                              p_invoice_bp_bank_account      => ${@invoice_bp_bank_account},
                              p_loan_card_num                => ${@loan_card_num},
                              p_company_nature               => ${@company_nature},
                              p_bp_name_sp                   => ${@bp_name_sp},
                              p_gender_sp                    => ${@gender_sp},
                              p_date_of_birth_sp             => to_date(${@date_of_birth_sp},'yyyy-mm-dd hh24:mi:ss'),
                              p_academic_background_sp       => ${@academic_background_sp},
                              p_id_type_sp                   => ${@id_type_sp},
                              p_id_card_no_sp                => ${@id_card_no_sp},
                              p_country_sp                   => ${@country_sp},
                              p_province_sp                  => ${@province_sp},
                              p_city_sp                      => ${@city_sp},
                              p_district_sp                  => ${@district_sp},
                              p_address_sp                   => ${@address_sp}
            		);
            	end;
            ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
            	begin
            		hls_bp_master_pkg.upd_hls_bp_master(
            				  p_bp_id                  =>${@bp_id},
                              p_bp_code                =>${@bp_code},
                              p_bp_name                =>${@bp_name},
                              p_extra_nam              =>${@extra_nam},
                              p_bp_class               =>${@bp_class},
                              p_bp_category            =>${@bp_category},
                              p_bp_type                =>${@bp_type},
                              p_bp_title               =>${@bp_title},
                              p_search_term_1          =>${@search_term_1},
                              p_search_term_2          =>${@search_term_2},
                              p_external_bp_code       =>${@external_bp_code},
                              p_address_id             =>${@address_id},
                              p_enabled_flag           =>${@enabled_flag},
                              p_first_name             =>${@first_name},
                              p_middle_name            =>${@middle_name},
                              p_last_name              =>${@last_name},
                              p_gender                 =>${@gender},
                              p_nationality            =>${@nationality},
                              p_date_of_birth          =>to_date(${@date_of_birth},'yyyy-mm-dd hh24:mi:ss'),
                              p_place_of_birth         =>${@place_of_birth},
                              p_name_at_birth          =>${@name_at_birth},
                              p_marital_status         =>${@marital_status},
                              p_number_of_children     =>${@number_of_children},
                              p_academic_background    =>${@academic_background},
                              p_age                    =>${@age},
                              p_id_type                =>${@id_type},
                              p_id_card_no             =>${@id_card_no},
                              p_annual_income          =>${@annual_income},
                              p_currency               =>${@currency},
                              p_capital_of_family      =>${@capital_of_family},
                              p_liability_of_family    =>${@liability_of_family},
                              p_legal_form             =>${@legal_form},
                              p_industry               =>${@industry},
                              p_business_license_num   =>${@business_license_num},
                              p_corporate_code         =>${@corporate_code},
                              p_organization_code      =>${@organization_code},
                              p_tax_registry_num       =>${@tax_registry_num},
                              p_registered_place       =>${@registered_place},
                              p_founded_date           =>to_date(${@founded_date},'yyyy-mm-dd hh24:mi:ss'),
                              p_registered_capital     =>${@registered_capital},
                              p_balance_sheet_currency =>${@balance_sheet_currency},
                              p_user_id                =>${/session/@user_id},
                              p_company_id             =>${/session/@company_id},
                              p_invoice_title                => ${@invoice_title},
                              p_primary_business             => ${@primary_business},
                              p_paid_up_capital              => ${@paid_up_capital},
                              p_main_products                => ${@main_products},
                              p_taxpayer_type                => ${@taxpayer_type},
                              p_invoice_bp_address_phone_num => ${@invoice_bp_address_phone_num}, 
                              p_invoice_bp_bank_account      => ${@invoice_bp_bank_account},
                              p_loan_card_num                => ${@loan_card_num},
                              p_company_nature               => ${@company_nature},
                              p_bp_name_sp                   => ${@bp_name_sp},
                              p_gender_sp                    => ${@gender_sp},
                              p_date_of_birth_sp             => to_date(${@date_of_birth_sp},'yyyy-mm-dd hh24:mi:ss'),
                              p_academic_background_sp       => ${@academic_background_sp},
                              p_id_type_sp                   => ${@id_type_sp},
                              p_id_card_no_sp                => ${@id_card_no_sp},
                              p_country_sp                   => ${@country_sp},
                              p_province_sp                  => ${@province_sp},
                              p_city_sp                      => ${@city_sp},
                              p_district_sp                  => ${@district_sp},
                              p_address_sp                   => ${@address_sp}
            		);
            	end;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
