zoukankan      html  css  js  c++  java
  • 利息计算

    select * from account  where account_no ='940050781003322'; --2006-12-01   118641

    select * from account_regular where account_id =118641 ; --34

    select * from status ; select * from price_component where regular_id = 34  and status_id = 8 order by from_date desc ; select * from account_agreement where account_id = 118641; select * from agreement_feature where agreement_id = 18185446;

    select * from regular_feature where id =34;

    ===================================== select * from account_relation where parent_id = 5083416; select * from entry where account_id = 5083417 order by id desc;

    select * from account  where account_no ='940050781003322';

    select * from account_relation where parent_id = 118641; select * from account_balance, entry where account_balance.account_id  in (118641,1260316853,1260316860) and account_balance.balance_entry_id = entry.id;

    select * from entry where account_id = 118641 order by id desc; select * from entry where account_id = 118642 order by id desc; select * from entry where account_id = 1260316860 order by id desc;

    select * from account_agreement where account_id = 118641; select * from agreement_feature where agreement_id = 18185446;

    select * from account_status where account_id = 118641; select * from status where id = 8;

    ==============================================

    select count(*), agreement_feature.value  from account, account_agreement, agreement_feature  where account_type_code = 'LOAN_ACCOUNT' and  sub_type='LEND_ACCOUNT' and  last_int_date = to_date('2013-01-01') and close_date is null

    and account.id =  account_agreement.account_id and account_agreement.agreement_id = agreement_feature.agreement_id

    and agreement_feature.item_id = 31 --and agreement_feature.value = '还款方式=等本' group by agreement_feature.value; --44

    select * from account_agreement where account_id  = 118641;

    select * from agreement_feature where agreement_id = 18185446;

    select *  from account, account_agreement, agreement_feature  where account_type_code = 'LOAN_ACCOUNT' and  sub_type='LEND_ACCOUNT' and  last_int_date = to_date('2013-01-01') and close_date is null

    and account.id =  account_agreement.account_id and account_agreement.agreement_id = agreement_feature.agreement_id

    and agreement_feature.item_id = 31 and agreement_feature.value = '还款方式=等本';

    select * from account_product where account_id = 1205946;

    select * from p

    ==========================================================

    select * from account where account_no ='940369518000213';

    select * from account_relation where parent_id = 7313467; select * from account_balance, entry where account_balance.account_id  in (1260316559,1260316979,1260316983) and account_balance.balance_entry_id = entry.id;

    select * from entry where account_id = 7313467 order by id desc;

    select * from account where account_no ='940369524000237'; select * from account_relation where parent_id = 1332035; select * from account_balance, entry where account_balance.account_id  in (1260316561,1260316995,1260316997) and account_balance.balance_entry_id = entry.id; select * from entry where account_id = 1332035 order by id desc;

    select * from account where account_no ='940453345000323'; select * from account_relation where parent_id = 6774690; select * from account_balance, entry where account_balance.account_id  in (1260316563,1260316899,1260316901) and account_balance.balance_entry_id = entry.id; select * from entry where account_id = 6774690 order by id desc;

    select * from account where account_no ='940580041000375'; select * from account_relation where parent_id = 5083416; select * from account_balance, entry where account_balance.account_id  in (1260316565,1260317123,1260317125) and account_balance.balance_entry_id = entry.id; select * from entry where account_id = 5083416 order by id desc;

    ==========================================================

    提前 还款等额 select * from account where account_no = '940369518000213'; --9434492

    select * from account_relation where parent_id = 7313467;

    select * from entry where account_id = 1260316559; select * from entry where account_id = 1260316979;

    select * from entry where account_id = 1260316983 order by id asc;

    select * from entry where account_id = 7313468 order by id asc; --计息分录 select * from entry where account_id = 7313467 order by id asc; --贷款账户

    select *  from account_agreement where account_id = 7313467; select * from agreement_feature where agreement_id = 18234396; --协议

    select * from account_regular where account_id = 7313467; -- 合规 34

    select * from account_status where account_id = 7313467; select * from status where id = 8;

    select * from price_component where regular_id = 34 and status_id = 8 order by from_date desc;

    select * from price_component where agreement_id  =18234396; ==================================================== 不提前还款等本

    select * from account where account_no = '940004636001160'; --9434492

    select * from account_relation where parent_id = 9434492;

    select * from entry where account_id = 1260317225; select * from entry where account_id = 1260317223;

    select * from entry where account_id = 9434492 order by id desc;

    select * from account_agreement where account_id = 9434492; ---协议id select * from agreement_feature where agreement_id = 18132054;--协议内容

    select * from account_status where account_id = 9434492; select * from status where id = 8; select * from account_regular where account_id = 9434492 ;-- 获得合规id

    select * from price_component where regular_id = 45 and status_id =8 order by from_date desc;

    select * from price_component where agreement_id = 18132054;

    ===============================================

    等本提前还款 select * from account where account_no ='940453345000323'; ---6774690

    select * from entry where account_id = 6774690 order by id asc; --放款账户分录

    select * from account_relation where parent_id = 6774690 order by id desc;

    --计息账户6774691 select * from entry where account_id = 6774691 order by id asc; ---利息账户 select * from entry where account_id = 1260316899 order by id asc; --到期本金 select * from entry where account_id = 1260316901 order by id asc;

    select * from account_agreement where account_id =6774690;

    select * from agreement_feature where agreement_id = 18085096;

    select * from account_regular where account_id = 6774690; --34 select * from account_status where account_id = 6774690; --8 select * from price_component where regular_id = 34 and status_id = 8 order by from_date desc;

    select * from price_component where agreement_id = 18085096; =============================================================

    等本提前还款 select * from account where account_no ='940580041000375'; --5083416

    select * from account_relation where parent_id = 5083416 order by id asc; --贷款账户的子账户

    select * from entry where account_id = 5083417 order by id asc; select * from entry where account_id = 1260317125 order by id asc;

    select * from account_agreement where account_id = 5083416;

    select * from agreement_feature where agreement_id = 17885549; select * from entry where account_id = 5083416 order by id asc;

    select * from account_regular where account_id = 5083416; select * from account_status where account_id = 5083416; select * from price_component where regular_id = 33 and status_id = 8 order by from_date desc;

    select * from price_component where agreement_id = 17885549; ===================================================== 等额提前还款

    select * from account where account_no = '940369524000237'; ---1332035 select * from account_relation where parent_id =1332035  order by id asc; --计息账户 select * from entry where account_id = 1332036 order by id asc;

    select * from entry where account_id = 1260316995 order by id asc;

    select * from account_agreement where account_id = 1332035; select * from agreement_feature where agreement_id = 18033723;

    select * from account_regular where account_id = 1332035; select * from account_status where account_id = 1332035; select * from price_component where regular_id = 34 and status_id = 8 order by from_date desc;

    select * from price_component where agreement_id = 18033723 and status_id = 8 order by from_date desc; ================================================================== select * from account, account_agreement, agreement , agreement_feature where account_type_code ='LOAN_ACCOUNT' and sub_type ='LEND_ACCOUNT' and last_int_date = to_date('2013-02-01') and account.id = account_agreement.account_id and account_agreement.agreement_id = agreement.id  and agreement_feature.agreement_id = agreement.id and item_id = 31   and agreement_feature.value = '还款方式=等本'

    select * from account where account_no ='940695458000318'; select * from account_relation where parent_id = 10609195 order by id asc; select * from entry where account_id = 1260316895 order by id asc; select * from account_agreement where account_id = 10609195; select * from agreement_feature where agreement_id =18237509; select * from account_regular where account_id = 10609195; select * from price_component where regular_id = 45 and status_id = 8 order by from_date desc; select * from account_status where account_id = 10609195; select * from price_component where agreement_id = 18237509; select * from entry where account_id = 10609195 order by id asc;

    ========================================================================== 2月3号 结息等额 select * from account, account_agreement, agreement_feature where account_type_code ='LOAN_ACCOUNT' and sub_type='LEND_ACCOUNT' and last_int_date = to_date ('2013-02-03', 'YYYY-MM-DD') and account.id = account_agreement.account_id and account_agreement.agreement_id = agreement_feature.agreement_id and agreement_feature.item_id = 31 ;

    select * from  account where account_no ='940346179000221';

    select * from account_relation  where parent_id = 3728061 order by id asc; ---利息1260319024   本金 1260319028   计息账户 3728062

    select * from entry where account_id = 1260319024 order by id asc; --44291 select * from entry where account_id = 1260319028 order by id asc;--173408 select * from entry where account_id = 3728062 order by id asc; -- 44291225542

    select * from entry where account_id = 3728061 order by id asc; -- 8114423

    select * from  account_regular where account_id =3728061; --34 select * from account_status where account_id =  3728061; --8

    select * from account_agreement where account_id  = 3728061; select * from agreement_feature where agreement_id = 18283837 and item_id =35; --每期还款额 select * from agreement_feature where agreement_id = 18283837; select * from price_component where regular_id = 34 and status_id = 8 order by from_date desc;

    ======================================================= select * from  account where account_no ='940654531000370';

    select * from account_relation  where parent_id = 8142140 order by id asc; ---利息1260319162   本金 1260319164   计息账户 8142141

    select * from entry where account_id = 1260319162 order by id asc; -- 312527 利息 select * from entry where account_id = 1260319164 order by id asc;--137303 本金 select * from entry where account_id = 8142141 order by id asc; -- 312526858292 计息

    select * from entry where account_id = 8142140 order by id asc; -- 57256829 余额

    select * from  account_regular where account_id =8142140; --45 select * from account_status where account_id =  8142140; --8

    select * from account_agreement where account_id  = 8142140; select * from agreement_feature where agreement_id = 17886239 and item_id =35; --每期还款额 select * from agreement_feature where agreement_id = 17886239; select * from price_component where regular_id = 45 and status_id = 8 order by from_date desc; select * from price_component where agreement_id = 17886239;

    ================================= select * from  account where account_no ='940439587000200';

    select * from account_relation  where parent_id = 11717998 order by id asc; ---利息 1260319120   本金 1260319124   计息账户 11717999

    select * from entry where account_id = 1260319120 order by id asc; -- 196677 利息 select * from entry where account_id = 1260319124 order by id asc;--250000 本金 select * from entry where account_id = 11717999 order by id asc; -- 196677395833 计息

    select * from entry where account_id = 11717998 order by id asc; -- 50750000 余额

    select * from  account_regular where account_id =11717998; --34 select * from account_status where account_id =  11717998; --8

    select * from account_agreement where account_id  = 11717998; select * from agreement_feature where agreement_id = 18185105 and item_id =35; --每期还款额 select * from agreement_feature where agreement_id = 18185105; select * from price_component where regular_id = 34 and status_id = 8 order by from_date desc; select * from price_component where agreement_id = 18185105;

  • 相关阅读:
    signal(SIGCHLD, SIG_IGN)和signal(SIGPIPE, SIG_IGN);
    关于pthread_cond_wait使用while循环判断的理解
    linux的sleep()和usleep()的使用和区别
    C中结构体的存储分配
    扯扯python的多线程的同步锁 Lock RLock Semaphore Event Condition
    线程属性的初始化以及销毁
    Mysql数据库一个表字段中存了id,并以逗号分隔,id对应的详细信息在另一个表中
    sqlyog 注册码
    Oracle 12C卸载图文教程
    Oracle12c Release1安装图解(详解)
  • 原文地址:https://www.cnblogs.com/wuxi/p/2891836.html
Copyright © 2011-2022 走看看