Commit b7857a10 authored by 18083's avatar 18083

核销自动匹配优化

parent 54c0ea1a
......@@ -105,7 +105,13 @@ end;
<bm:field name="error_message" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ERROR_MESSAGE" prompt="CSH_WRITE_OFF_INTERFACE.ERROR_MESSAGE"/>
<bm:field name="trx_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRX_NUMBER" prompt="事务编号"/>
<bm:field name="left_amount" expression="(select decode(cf_item,1,ca.due_amount - nvl(ca.received_amount,0)) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="unreceived_amount" expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="unreceived_amount" expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)" forInsert="false" forUpdate="false"/>-->
<bm:field name="unreceived_amount" expression="(select decode(cf_item, 9,
CON_OVERDUE_PENALTY_PKG.CALC_PENALTY_FOR_WRITE_OFF(p_cashflow_id=> cashflow_id,
p_calc_date=>decode(${@trx_transaction_type},'DEPOSIT',sysdate,to_date(${@transaction_date}, 'yyyy-mm-dd')),
p_user_id=>${/session/@user_id},
p_penalty_flag=>'Y'),
due_amount) -nvl(received_amount,0) from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="left_principal" expression="(select ca.principal - nvl(ca.received_principal,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="left_interest" expression="(select ca.interest - nvl(ca.received_interest,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="unreceived_penalty" expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.contract_id = t1.contract_id and ca.times = t1.write_off_times and cf_item = 9 and cf_status = 'RELEASE')" forInsert="false" forUpdate="false"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment