declare v_template_id varchar2(500) := 'DM_COUNT_PROJ_LQDT' ; v_batch_id varchar2(500) := 'COMMON-10010101-20240331-1-1' ; v_report_manager_id varchar2(500) := '60' ; v_tpl tusp_fa_stat_tpl%rowtype := p_tusp_fa_stat_tpl_item_cfg.getTemplate('DM_COUNT_PROJ_LQDT'); v_blank varchar2(4000) ; v_execution_node varchar2(500) ; v_message varchar2(500) ; v_fund_code varchar2(500) ; v_proj_code varchar2(500) ; v_count_proj_code varchar2(500) ; v_item_is_count boolean := false ; v_item_is_break boolean := false ; v_parent_is_count boolean := false ; v_amount_type varchar2(100) ; type t_tpl_id_array is table of number(1) index by tusp_fa_stat_tpl.c_template_id%type; type t_item_id_array is table of number(1) index by tusp_fa_stat_tpl_item.c_item_id%type; /***初始化循环变量***/ /***本次循环中【例外区域】的模板统计情况 key为tplValue value为是否已经统计***/ v_cycle_count_info_tpl_lw t_tpl_id_array; /***本次循环中【例外区域】的指标统计情况 key为itemValue value为是否已经统计***/ v_cycle_count_info_lw t_item_id_array; /***本次循环中【标准区域】的指标统计情况 key为itemValue value为是否已经统计***/ v_cycle_count_info_bz t_item_id_array; v_rbmcda_list p_tusp_fa_stat_tpl_item_cfg.t_rbmcda_list; v_item_vale_list p_tusp_fa_stat_tpl_item_cfg.t_item_vale_list; v_row tusp_fa_stat_subject_batch%rowtype; v_row_blank tusp_fa_stat_subject_batch%rowtype; v_tpl_item_cfg_id varchar2(4000); /***临时匿名函数***start****/ function getAmount(v_amount_type varchar2,info tusp_fa_stat_subject_batch%rowtype) return number is begin if 1=2 then return null; elsif v_amount_type = '2' then return + ( (nvl(info.END_ACCO_DEBIT_BALANCE,0) - nvl(info.END_ACCO_CREDIT_BALANCE,0)) * nvl(info.BAL_DIR,1)); elsif v_amount_type = 'C' then return + nvl(info.END_ACCO_CREDIT_BALANCE,0) ; elsif v_amount_type = 'D' then return + nvl(info.END_ACCO_DEBIT_BALANCE,0) ; elsif v_amount_type = 'CM' then return + nvl(info.PD_ACCO_CREDIT_OCCUR_BALANCE,0) ; elsif v_amount_type = '2-2Y' then return + ( (nvl(info.END_ACCO_DEBIT_BALANCE,0) - nvl(info.END_ACCO_CREDIT_BALANCE,0)) * nvl(info.BAL_DIR,1)) - ( (nvl(info.CY_ACCO_DEBIT_OCCUR_BALANCE,0) - nvl(info.CY_ACCO_CREDIT_OCCUR_BALANCE,0)) * nvl(info.BAL_DIR,1)); elsif v_amount_type = '-2' then return - ( (nvl(info.END_ACCO_DEBIT_BALANCE,0) - nvl(info.END_ACCO_CREDIT_BALANCE,0)) * nvl(info.BAL_DIR,1)); elsif v_amount_type = 'CY' then return + nvl(info.CY_ACCO_CREDIT_OCCUR_BALANCE,0) ; elsif v_amount_type = 'DY' then return + nvl(info.CY_ACCO_DEBIT_OCCUR_BALANCE,0) ; elsif v_amount_type = 'DM' then return + nvl(info.PD_ACCO_DEBIT_OCCUR_BALANCE,0) ; elsif v_amount_type = '-DY' then return - nvl(info.CY_ACCO_DEBIT_OCCUR_BALANCE,0) ; elsif v_amount_type = '2Y' then return + ( (nvl(info.CY_ACCO_DEBIT_OCCUR_BALANCE,0) - nvl(info.CY_ACCO_CREDIT_OCCUR_BALANCE,0)) * nvl(info.BAL_DIR,1)); elsif v_amount_type = 'C-D' then return + nvl(info.END_ACCO_CREDIT_BALANCE,0) - nvl(info.END_ACCO_DEBIT_BALANCE,0) ; elsif v_amount_type = '-D' then return - nvl(info.END_ACCO_DEBIT_BALANCE,0) ; elsif v_amount_type = '-C' then return - nvl(info.END_ACCO_CREDIT_BALANCE,0) ; elsif v_amount_type = '3' then return + ( case when nvl(info.BAL_DIR,1) = 1 then nvl(info.END_ACCO_DEBIT_BALANCE,0) else nvl(info.END_ACCO_CREDIT_BALANCE,0) end ); else RAISE_APPLICATION_ERROR(-20000, '无法解析金额计算公式:'||v_amount_type); end if; return null; end; /***临时匿名函数***end****/ v_WTDKSFSYDKZC varchar2(3):= nvl(FN_DM_GET_URP_PARAM_VALUE('TUSP_WTDKSFSYDKZC'),'0'); v_JRJGJYDSDK varchar2(3):= nvl(FN_DM_GET_URP_PARAM_VALUE('TUSP_JRJGJYDSDK'),'1'); v_QSZJWLTJKJ varchar2(3):= nvl(FN_DM_GET_URP_PARAM_VALUE('TUSP_QSZJWLTJKJ'),'1'); v_SSXTYESFTJDJZFE varchar2(3):= nvl(FN_DM_GET_URP_PARAM_VALUE('TUSP_SSXTYESFTJDJZFE'),'0'); v_MGSZSFAZQTJ varchar2(3):= nvl(FN_DM_GET_URP_PARAM_VALUE('DW_MGSZSFAZQTJ'),'0'); v_ZCDHGHCJSFBHLX varchar2(3):= nvl(FN_DM_GET_URP_PARAM_VALUE('DW_ZCDHGHCJSFBHLX'),'0'); v_FZDHGHCJSFBHLX varchar2(3):= nvl(FN_DM_GET_URP_PARAM_VALUE('DW_FZDHGHCJSFBHLX'),'0'); v_QYZQAQZFLSFPCZXQYSMZ varchar2(3):= nvl(FN_DM_GET_URP_PARAM_VALUE('DW_QYZQAQZFLSFPCZXQYSMZ'),'0'); CURSOR c_CURSOR IS select * from (select v_WTDKSFSYDKZC, v_JRJGJYDSDK, v_QSZJWLTJKJ, v_SSXTYESFTJDJZFE, v_MGSZSFAZQTJ, v_ZCDHGHCJSFBHLX, v_FZDHGHCJSFBHLX, v_QYZQAQZFLSFPCZXQYSMZ, te.* from (select rownum rown , tf.* from (select /*+ index(t,IND_TUSP_FA_STAT_SUBJECT_BAT_2) */ t.*,t.rowid rid from tusp_fa_stat_subject_batch t where t.C_BATCH_ID = 'COMMON-10010101-20240331-1-1' order by t.fund_code ) tf ) te where te.rown > to_number('0') and te.rown <= to_number('1') ) tt; type t_tusp_fa_stat_subject_batch is table of c_CURSOR%rowtype; v_tusp_fa_stat_subject_batch t_tusp_fa_stat_subject_batch; v_exists_lw boolean; v_amount_type_num NUMBER; begin open c_CURSOR; loop FETCH c_CURSOR BULK COLLECT INTO v_tusp_fa_stat_subject_batch LIMIT 1000; EXIT WHEN v_tusp_fa_stat_subject_batch.COUNT = 0; -- 无数据时退出循环 begin FOR i IN 1..v_tusp_fa_stat_subject_batch.COUNT loop v_row := v_row_blank; v_row.l_rownumber := v_tusp_fa_stat_subject_batch(i).l_rownumber; v_row.sub_code := v_tusp_fa_stat_subject_batch(i).sub_code; v_row.sub_prop := v_tusp_fa_stat_subject_batch(i).sub_prop; v_row.account_balance := v_tusp_fa_stat_subject_batch(i).ACCOUNT_BALANCE; v_row.cy_acco_debit_occur_balance := v_tusp_fa_stat_subject_batch(i).cy_acco_debit_occur_balance; v_row.cy_acco_credit_occur_balance := v_tusp_fa_stat_subject_batch(i).cy_acco_credit_occur_balance; v_row.pd_acco_debit_occur_balance := v_tusp_fa_stat_subject_batch(i).pd_acco_debit_occur_balance; v_row.pd_acco_credit_occur_balance := v_tusp_fa_stat_subject_batch(i).pd_acco_credit_occur_balance; v_row.end_acco_debit_balance := v_tusp_fa_stat_subject_batch(i).end_acco_debit_balance; v_row.end_acco_credit_balance := v_tusp_fa_stat_subject_batch(i).end_acco_credit_balance; v_row.bal_dir := v_tusp_fa_stat_subject_batch(i).bal_dir; v_execution_node := '插入统计项明细数据-start'; /***初始化循环变量***/ v_cycle_count_info_tpl_lw.delete; v_cycle_count_info_lw.delete; v_cycle_count_info_bz.delete; if v_fund_code is null then v_fund_code := v_tusp_fa_stat_subject_batch(i).fund_code; v_proj_code := v_tusp_fa_stat_subject_batch(i).proj_code; v_count_proj_code := v_tusp_fa_stat_subject_batch(i).count_proj_code; elsif v_fund_code <> v_tusp_fa_stat_subject_batch(i).fund_code then p_tusp_fa_stat_tpl_item_cfg.insertSubjectDtlDataRelated(v_batch_id,v_report_manager_id,v_tpl.c_template_id,/*v_rbmcda.c_rbmcda_id,v_rbmcda.c_rbmcda_type,*/v_proj_code,v_count_proj_code,v_fund_code,'admin',v_rbmcda_list,v_item_vale_list); v_rbmcda_list.delete; v_item_vale_list.delete; v_fund_code := v_tusp_fa_stat_subject_batch(i).fund_code; v_proj_code := v_tusp_fa_stat_subject_batch(i).proj_code; v_count_proj_code := v_tusp_fa_stat_subject_batch(i).count_proj_code; end if; v_execution_node := '插入统计项明细数据-end'; /***指标取数开始开始开始***/ v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT->实际收益'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT_CNVR_RMB->实际收益折合人民币'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT_CNVR_RMB'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-AGGR_PAYB_BEFC_PROFIT_1104->信托收益赔累计赔付额'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-AGGR_PAYB_BEFC_PROFIT_1104'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-CY_PRIN_AGGR_AMOUNT->本年累计已清算交付'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-CY_PRIN_AGGR_AMOUNT'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-END_PERF->期末业绩'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-END_PERF'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-FINL_AGGR_BASE_REMU->累计财务顾问基本报酬'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-FINL_AGGR_BASE_REMU'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-FINL_AGGR_REWA->累计财务顾问业绩报酬'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-FINL_AGGR_REWA'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-INA_AGGR_BASE_REMU->累计投资顾问基本报酬'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-INA_AGGR_BASE_REMU'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-INA_AGGR_REWA->累计投资顾问业绩报酬'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-INA_AGGR_REWA'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME->发行机构实现收入'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME_RMB->发行机构实现收入折人民币'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME_RMB'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-PD_PRIN_AGGR_AMOUNT->本月累计已清算交付'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-PD_PRIN_AGGR_AMOUNT'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-PRIN_AGGR_AMOUNT->信托本金累计给付额'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-PRIN_AGGR_AMOUNT'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-PROFIT_AGGR_AMOUNT->信托收益累计分配额'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-PROFIT_AGGR_AMOUNT'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_BASE_REMU->受托人累计基本报酬'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_BASE_REMU'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_REWA->受托人累计业绩报酬'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_REWA'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-TRUST_DEBIT_BALANCE->实收信托累计借方发生额'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-TRUST_DEBIT_BALANCE'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-TRUST_FEE->信托费用'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-TRUST_FEE'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-TRUST_TOTAL_FEE_1104->信托总费用'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-TRUST_TOTAL_FEE_1104'):= 0; v_execution_node := '例外区域->DM_COUNT_PROJ_LQDT-TRUST_TOTAL_INCM_1104->信托总收入'; v_cycle_count_info_lw('DM_COUNT_PROJ_LQDT-TRUST_TOTAL_INCM_1104'):= 0; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT->实际收益'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->883895a4d0d9453fa36b94cf07ae96d7-->DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT-->实际收益-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '2205%' or v_tusp_fa_stat_subject_batch(i).SUB_PROP like '2203%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[883895a4d0d9453fa36b94cf07ae96d7]' ; end if; v_execution_node := '翻译配置结束-->883895a4d0d9453fa36b94cf07ae96d7-->DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT-->实际收益-->2-->1'; v_execution_node := '翻译配置开始-->bd2fc9919fe84ca58fd58718c19c7429-->DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT-->实际收益-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).END_DEBIT_2203_BAL_FLAG = '1' ) and ( v_tusp_fa_stat_subject_batch(i).IS_BENEFIT_TRANS = '0' ) and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '4001%' ) and ( ( v_tusp_fa_stat_subject_batch(i).SUB_PROP is null or v_tusp_fa_stat_subject_batch(i).SUB_PROP not like '400100%' ) ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := '-C'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[bd2fc9919fe84ca58fd58718c19c7429]' ; end if; v_execution_node := '翻译配置结束-->bd2fc9919fe84ca58fd58718c19c7429-->DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT-->实际收益-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT','ACTUAL_PROFIT','实际收益','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT_CNVR_RMB->实际收益折合人民币'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->69f7812359bc471489141c25987220da-->DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT_CNVR_RMB-->实际收益折合人民币-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).END_DEBIT_2203_BAL_FLAG = '1' ) and ( v_tusp_fa_stat_subject_batch(i).IS_BENEFIT_TRANS = '0' ) and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '4001%' ) and ( ( v_tusp_fa_stat_subject_batch(i).SUB_PROP is null or v_tusp_fa_stat_subject_batch(i).SUB_PROP not like '400100%' ) ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := '-C'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[69f7812359bc471489141c25987220da]' ; end if; v_execution_node := '翻译配置结束-->69f7812359bc471489141c25987220da-->DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT_CNVR_RMB-->实际收益折合人民币-->2-->1'; v_execution_node := '翻译配置开始-->752cb772075a4508aa674305dd7239cb-->DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT_CNVR_RMB-->实际收益折合人民币-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '2205%' or v_tusp_fa_stat_subject_batch(i).SUB_PROP like '2203%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[752cb772075a4508aa674305dd7239cb]' ; end if; v_execution_node := '翻译配置结束-->752cb772075a4508aa674305dd7239cb-->DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT_CNVR_RMB-->实际收益折合人民币-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT_CNVR_RMB','ACTUAL_PROFIT_CNVR_RMB','实际收益折合人民币','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT_CNVR_RMB'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT_CNVR_RMB'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-ACTUAL_PROFIT_CNVR_RMB'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-AGGR_PAYB_BEFC_PROFIT_1104->信托收益赔累计赔付额'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->4ee41d27c343452b9a98c400c9beb01f-->DM_COUNT_PROJ_LQDT-AGGR_PAYB_BEFC_PROFIT_1104-->信托收益赔累计赔付额-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '410403%' or v_tusp_fa_stat_subject_batch(i).SUB_PROP like '4011__02%' ) and ( ( v_tusp_fa_stat_subject_batch(i).SUB_PROP is null or v_tusp_fa_stat_subject_batch(i).SUB_PROP not like '4011__01%' ) ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[4ee41d27c343452b9a98c400c9beb01f]' ; end if; v_execution_node := '翻译配置结束-->4ee41d27c343452b9a98c400c9beb01f-->DM_COUNT_PROJ_LQDT-AGGR_PAYB_BEFC_PROFIT_1104-->信托收益赔累计赔付额-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-AGGR_PAYB_BEFC_PROFIT_1104','AGGR_PAYB_BEFC_PROFIT_1104','信托收益赔累计赔付额','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-AGGR_PAYB_BEFC_PROFIT_1104'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-AGGR_PAYB_BEFC_PROFIT_1104'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-AGGR_PAYB_BEFC_PROFIT_1104'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-CY_PRIN_AGGR_AMOUNT->本年累计已清算交付'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->e14583d2eed742dd85ed339022595f82-->DM_COUNT_PROJ_LQDT-CY_PRIN_AGGR_AMOUNT-->本年累计已清算交付-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).IS_BENEFIT_TRANS = '0' ) and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '4001%' ) and ( ( v_tusp_fa_stat_subject_batch(i).SUB_PROP is null or v_tusp_fa_stat_subject_batch(i).SUB_PROP not like '400100%' ) ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'DY'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[e14583d2eed742dd85ed339022595f82]' ; end if; v_execution_node := '翻译配置结束-->e14583d2eed742dd85ed339022595f82-->DM_COUNT_PROJ_LQDT-CY_PRIN_AGGR_AMOUNT-->本年累计已清算交付-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-CY_PRIN_AGGR_AMOUNT','CY_PRIN_AGGR_AMOUNT','本年累计已清算交付','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-CY_PRIN_AGGR_AMOUNT'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-CY_PRIN_AGGR_AMOUNT'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-CY_PRIN_AGGR_AMOUNT'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-END_PERF->期末业绩'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->2ce20b8d66294d9f8f040ab2e93158a0-->DM_COUNT_PROJ_LQDT-END_PERF-->期末业绩-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '2205%' or v_tusp_fa_stat_subject_batch(i).SUB_PROP like '2203%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[2ce20b8d66294d9f8f040ab2e93158a0]' ; end if; v_execution_node := '翻译配置结束-->2ce20b8d66294d9f8f040ab2e93158a0-->DM_COUNT_PROJ_LQDT-END_PERF-->期末业绩-->2-->1'; v_execution_node := '翻译配置开始-->44dd7fb3b79642ebb4a05449f61b5c50-->DM_COUNT_PROJ_LQDT-END_PERF-->期末业绩-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).END_DEBIT_2203_BAL_FLAG = '1' ) and ( v_tusp_fa_stat_subject_batch(i).IS_BENEFIT_TRANS = '0' ) and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '4001%' ) and ( ( v_tusp_fa_stat_subject_batch(i).SUB_PROP is null or v_tusp_fa_stat_subject_batch(i).SUB_PROP not like '400100%' ) ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := '-C'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[44dd7fb3b79642ebb4a05449f61b5c50]' ; end if; v_execution_node := '翻译配置结束-->44dd7fb3b79642ebb4a05449f61b5c50-->DM_COUNT_PROJ_LQDT-END_PERF-->期末业绩-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-END_PERF','END_PERF','期末业绩','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-END_PERF'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-END_PERF'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-END_PERF'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-FINL_AGGR_BASE_REMU->累计财务顾问基本报酬'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->0c42a64b8ab84560b04cd32d7050fe78-->DM_COUNT_PROJ_LQDT-FINL_AGGR_BASE_REMU-->累计财务顾问基本报酬-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '221201%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'C'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[0c42a64b8ab84560b04cd32d7050fe78]' ; end if; v_execution_node := '翻译配置结束-->0c42a64b8ab84560b04cd32d7050fe78-->DM_COUNT_PROJ_LQDT-FINL_AGGR_BASE_REMU-->累计财务顾问基本报酬-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-FINL_AGGR_BASE_REMU','FINL_AGGR_BASE_REMU','累计财务顾问基本报酬','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-FINL_AGGR_BASE_REMU'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-FINL_AGGR_BASE_REMU'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-FINL_AGGR_BASE_REMU'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-FINL_AGGR_REWA->累计财务顾问业绩报酬'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->0f0aef51ac6c4e1791bc0db19be9f0e1-->DM_COUNT_PROJ_LQDT-FINL_AGGR_REWA-->累计财务顾问业绩报酬-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '221202%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'C'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[0f0aef51ac6c4e1791bc0db19be9f0e1]' ; end if; v_execution_node := '翻译配置结束-->0f0aef51ac6c4e1791bc0db19be9f0e1-->DM_COUNT_PROJ_LQDT-FINL_AGGR_REWA-->累计财务顾问业绩报酬-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-FINL_AGGR_REWA','FINL_AGGR_REWA','累计财务顾问业绩报酬','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-FINL_AGGR_REWA'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-FINL_AGGR_REWA'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-FINL_AGGR_REWA'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-INA_AGGR_BASE_REMU->累计投资顾问基本报酬'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->8fca585dd0d44a30aa7667e278983fdb-->DM_COUNT_PROJ_LQDT-INA_AGGR_BASE_REMU-->累计投资顾问基本报酬-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '221001%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[8fca585dd0d44a30aa7667e278983fdb]' ; end if; v_execution_node := '翻译配置结束-->8fca585dd0d44a30aa7667e278983fdb-->DM_COUNT_PROJ_LQDT-INA_AGGR_BASE_REMU-->累计投资顾问基本报酬-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-INA_AGGR_BASE_REMU','INA_AGGR_BASE_REMU','累计投资顾问基本报酬','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-INA_AGGR_BASE_REMU'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-INA_AGGR_BASE_REMU'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-INA_AGGR_BASE_REMU'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-INA_AGGR_REWA->累计投资顾问业绩报酬'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->a88434ccc3644374889056c7d6dba259-->DM_COUNT_PROJ_LQDT-INA_AGGR_REWA-->累计投资顾问业绩报酬-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '221002%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[a88434ccc3644374889056c7d6dba259]' ; end if; v_execution_node := '翻译配置结束-->a88434ccc3644374889056c7d6dba259-->DM_COUNT_PROJ_LQDT-INA_AGGR_REWA-->累计投资顾问业绩报酬-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-INA_AGGR_REWA','INA_AGGR_REWA','累计投资顾问业绩报酬','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-INA_AGGR_REWA'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-INA_AGGR_REWA'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-INA_AGGR_REWA'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME->发行机构实现收入'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->8ec3ae55bd804fde89451f59cbe666a7-->DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME-->发行机构实现收入-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '2206%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[8ec3ae55bd804fde89451f59cbe666a7]' ; end if; v_execution_node := '翻译配置结束-->8ec3ae55bd804fde89451f59cbe666a7-->DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME-->发行机构实现收入-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME','ISS_ORG_IMPL_INCOME','发行机构实现收入','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME_RMB->发行机构实现收入折人民币'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->10183952a8144a85bf8fa5cdfbb02f11-->DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME_RMB-->发行机构实现收入折人民币-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '2206%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[10183952a8144a85bf8fa5cdfbb02f11]' ; end if; v_execution_node := '翻译配置结束-->10183952a8144a85bf8fa5cdfbb02f11-->DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME_RMB-->发行机构实现收入折人民币-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME_RMB','ISS_ORG_IMPL_INCOME_RMB','发行机构实现收入折人民币','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME_RMB'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME_RMB'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-ISS_ORG_IMPL_INCOME_RMB'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-PD_PRIN_AGGR_AMOUNT->本月累计已清算交付'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->p14583d2eed742dd85ed338022595f82-->DM_COUNT_PROJ_LQDT-PD_PRIN_AGGR_AMOUNT-->本月累计已清算交付-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).IS_BENEFIT_TRANS = '0' ) and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '4001%' ) and ( ( v_tusp_fa_stat_subject_batch(i).SUB_PROP is null or v_tusp_fa_stat_subject_batch(i).SUB_PROP not like '400100%' ) ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'DM'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[p14583d2eed742dd85ed338022595f82]' ; end if; v_execution_node := '翻译配置结束-->p14583d2eed742dd85ed338022595f82-->DM_COUNT_PROJ_LQDT-PD_PRIN_AGGR_AMOUNT-->本月累计已清算交付-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-PD_PRIN_AGGR_AMOUNT','PD_PRIN_AGGR_AMOUNT','本月累计已清算交付','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-PD_PRIN_AGGR_AMOUNT'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-PD_PRIN_AGGR_AMOUNT'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-PD_PRIN_AGGR_AMOUNT'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-PRIN_AGGR_AMOUNT->信托本金累计给付额'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->7dc9ddb0fcab4c8b847c41578bf4fc46-->DM_COUNT_PROJ_LQDT-PRIN_AGGR_AMOUNT-->信托本金累计给付额-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).IS_BENEFIT_TRANS = '0' ) and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '4001%' ) and ( ( v_tusp_fa_stat_subject_batch(i).SUB_PROP is null or v_tusp_fa_stat_subject_batch(i).SUB_PROP not like '400100%' ) ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[7dc9ddb0fcab4c8b847c41578bf4fc46]' ; end if; v_execution_node := '翻译配置结束-->7dc9ddb0fcab4c8b847c41578bf4fc46-->DM_COUNT_PROJ_LQDT-PRIN_AGGR_AMOUNT-->信托本金累计给付额-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-PRIN_AGGR_AMOUNT','PRIN_AGGR_AMOUNT','信托本金累计给付额','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-PRIN_AGGR_AMOUNT'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-PRIN_AGGR_AMOUNT'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-PRIN_AGGR_AMOUNT'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-PROFIT_AGGR_AMOUNT->信托收益累计分配额'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->3941075f83d14f84b61934a7eb679a31-->DM_COUNT_PROJ_LQDT-PROFIT_AGGR_AMOUNT-->信托收益累计分配额-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).END_DEBIT_2203_BAL_FLAG = '1' ) and ( v_tusp_fa_stat_subject_batch(i).IS_BENEFIT_TRANS = '0' ) and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '4001%' ) and ( ( v_tusp_fa_stat_subject_batch(i).SUB_PROP is null or v_tusp_fa_stat_subject_batch(i).SUB_PROP not like '400100%' ) ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := '-C'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[3941075f83d14f84b61934a7eb679a31]' ; end if; v_execution_node := '翻译配置结束-->3941075f83d14f84b61934a7eb679a31-->DM_COUNT_PROJ_LQDT-PROFIT_AGGR_AMOUNT-->信托收益累计分配额-->2-->1'; v_execution_node := '翻译配置开始-->7c53768dcb1446269ec04fac130894e3-->DM_COUNT_PROJ_LQDT-PROFIT_AGGR_AMOUNT-->信托收益累计分配额-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '2205%' or v_tusp_fa_stat_subject_batch(i).SUB_PROP like '2203%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[7c53768dcb1446269ec04fac130894e3]' ; end if; v_execution_node := '翻译配置结束-->7c53768dcb1446269ec04fac130894e3-->DM_COUNT_PROJ_LQDT-PROFIT_AGGR_AMOUNT-->信托收益累计分配额-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-PROFIT_AGGR_AMOUNT','PROFIT_AGGR_AMOUNT','信托收益累计分配额','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-PROFIT_AGGR_AMOUNT'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-PROFIT_AGGR_AMOUNT'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-PROFIT_AGGR_AMOUNT'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_BASE_REMU->受托人累计基本报酬'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->382b8abb52934f89892b6de27fbd4d34-->DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_BASE_REMU-->受托人累计基本报酬-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '220601%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[382b8abb52934f89892b6de27fbd4d34]' ; end if; v_execution_node := '翻译配置结束-->382b8abb52934f89892b6de27fbd4d34-->DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_BASE_REMU-->受托人累计基本报酬-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_BASE_REMU','TRUSTEE_AGGR_BASE_REMU','受托人累计基本报酬','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_BASE_REMU'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_BASE_REMU'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_BASE_REMU'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_REWA->受托人累计业绩报酬'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->86812ff1fa784681a054a261d5c77b84-->DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_REWA-->受托人累计业绩报酬-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '220602%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[86812ff1fa784681a054a261d5c77b84]' ; end if; v_execution_node := '翻译配置结束-->86812ff1fa784681a054a261d5c77b84-->DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_REWA-->受托人累计业绩报酬-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_REWA','TRUSTEE_AGGR_REWA','受托人累计业绩报酬','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_REWA'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_REWA'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUSTEE_AGGR_REWA'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-TRUST_DEBIT_BALANCE->实收信托累计借方发生额'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->60ef67aaad264e4c8e43d063780ec71c-->DM_COUNT_PROJ_LQDT-TRUST_DEBIT_BALANCE-->实收信托累计借方发生额-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '4001%' ) and ( ( v_tusp_fa_stat_subject_batch(i).SUB_PROP is null or v_tusp_fa_stat_subject_batch(i).SUB_PROP not like '400100%' ) ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[60ef67aaad264e4c8e43d063780ec71c]' ; end if; v_execution_node := '翻译配置结束-->60ef67aaad264e4c8e43d063780ec71c-->DM_COUNT_PROJ_LQDT-TRUST_DEBIT_BALANCE-->实收信托累计借方发生额-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-TRUST_DEBIT_BALANCE','TRUST_DEBIT_BALANCE','实收信托累计借方发生额','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUST_DEBIT_BALANCE'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUST_DEBIT_BALANCE'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUST_DEBIT_BALANCE'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-TRUST_FEE->信托费用'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->1b8cdbcc2df34b5fb0f72a8f948ba19a-->DM_COUNT_PROJ_LQDT-TRUST_FEE-->信托费用-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '6111G0%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := '3'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[1b8cdbcc2df34b5fb0f72a8f948ba19a]' ; end if; v_execution_node := '翻译配置结束-->1b8cdbcc2df34b5fb0f72a8f948ba19a-->DM_COUNT_PROJ_LQDT-TRUST_FEE-->信托费用-->2-->1'; v_execution_node := '翻译配置开始-->6844562cf1854e06b62eebe5d84be29b-->DM_COUNT_PROJ_LQDT-TRUST_FEE-->信托费用-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).BAL_DIR_TYPE = '1' ) and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '6%' ) and ( ( v_tusp_fa_stat_subject_batch(i).SUB_PROP is null or v_tusp_fa_stat_subject_batch(i).SUB_PROP not like '6701%' ) and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP is null or v_tusp_fa_stat_subject_batch(i).SUB_PROP not like '6702%' ) and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP is null or v_tusp_fa_stat_subject_batch(i).SUB_PROP not like '6111G0%' ) ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[6844562cf1854e06b62eebe5d84be29b]' ; end if; v_execution_node := '翻译配置结束-->6844562cf1854e06b62eebe5d84be29b-->DM_COUNT_PROJ_LQDT-TRUST_FEE-->信托费用-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-TRUST_FEE','TRUST_FEE','信托费用','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUST_FEE'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUST_FEE'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUST_FEE'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-TRUST_TOTAL_FEE_1104->信托总费用'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->7a62c63d7f344e38b9f80f100234764e-->DM_COUNT_PROJ_LQDT-TRUST_TOTAL_FEE_1104-->信托总费用-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).BAL_DIR_TYPE = '1' ) and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '6%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'D'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[7a62c63d7f344e38b9f80f100234764e]' ; end if; v_execution_node := '翻译配置结束-->7a62c63d7f344e38b9f80f100234764e-->DM_COUNT_PROJ_LQDT-TRUST_TOTAL_FEE_1104-->信托总费用-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-TRUST_TOTAL_FEE_1104','TRUST_TOTAL_FEE_1104','信托总费用','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUST_TOTAL_FEE_1104'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUST_TOTAL_FEE_1104'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUST_TOTAL_FEE_1104'):= 0; end if; v_execution_node := '通用区域->DM_COUNT_PROJ_LQDT-TRUST_TOTAL_INCM_1104->信托总收入'; if not v_cycle_count_info_tpl_lw.exists('DM_COUNT_PROJ_LQDT') or v_cycle_count_info_tpl_lw('DM_COUNT_PROJ_LQDT') = '0' then v_item_is_break := false; v_item_is_count := false; v_amount_type := null ; v_tpl_item_cfg_id := null ; v_execution_node := '翻译配置开始-->a77faafac51e438d83cef5f90e6b43f6-->DM_COUNT_PROJ_LQDT-TRUST_TOTAL_INCM_1104-->信托总收入-->2-->1'; if not v_item_is_break and ( v_tusp_fa_stat_subject_batch(i).BAL_DIR_TYPE = '2' ) and ( v_tusp_fa_stat_subject_batch(i).SUB_PROP like '6%' ) then v_item_is_count := true; v_item_is_break := true; v_amount_type := 'C'; v_tpl_item_cfg_id := case when v_tpl_item_cfg_id is not null then v_tpl_item_cfg_id || '+' end || '[a77faafac51e438d83cef5f90e6b43f6]' ; end if; v_execution_node := '翻译配置结束-->a77faafac51e438d83cef5f90e6b43f6-->DM_COUNT_PROJ_LQDT-TRUST_TOTAL_INCM_1104-->信托总收入-->2-->1'; if v_item_is_count then p_tusp_fa_stat_tpl_item_cfg.saveData(v_tusp_fa_stat_subject_batch(i).rid,v_tusp_fa_stat_subject_batch(i).l_rownumber,v_tpl_item_cfg_id,'DM_COUNT_PROJ_LQDT-TRUST_TOTAL_INCM_1104','TRUST_TOTAL_INCM_1104','信托总收入','#',coalesce(v_amount_type,'C','0'),getAmount(coalesce(v_amount_type,'C','0'),v_row),v_rbmcda_list,v_item_vale_list); v_blank := v_blank; end if; /***结束本指标统计时,设置循环变量***/ if v_item_is_count then v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUST_TOTAL_INCM_1104'):= 1; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUST_TOTAL_INCM_1104'):= 0; end if; else v_cycle_count_info_bz('DM_COUNT_PROJ_LQDT-TRUST_TOTAL_INCM_1104'):= 0; end if; /***指标取数结束结束结束***/ end loop; commit; end; end loop; close c_CURSOR; v_execution_node := '最后的血缘关系-start'; if v_item_vale_list.count > 0 then p_tusp_fa_stat_tpl_item_cfg.insertSubjectDtlDataRelated(v_batch_id,v_report_manager_id,v_tpl.c_template_id,/*v_rbmcda.c_rbmcda_id,v_rbmcda.c_rbmcda_type,*/v_proj_code,v_count_proj_code,v_fund_code,'admin',v_rbmcda_list,v_item_vale_list); v_rbmcda_list.delete; v_item_vale_list.delete; end if; v_execution_node := '最后的血缘关系-end'; exception when others then raise_application_error(-20000, v_execution_node||'-->'||sqlerrm); end;