客户历史信息贷款余额改为本金余额

This commit is contained in:
zzk 2023-09-20 09:16:06 +08:00
parent 2834907249
commit 405f5faadc

View File

@ -122,14 +122,14 @@ public class InsertCustomerHistoryInfo {
carwjqnumber = "0";
}
//获取客户为主承租剩余租金,逾期租金
String money_num = "select format(sum(nvl(rent_over,0)),2) as rent_over from customer_person cp left join lb_union_lessee lul on lul.CUSTOMER_ID = cp.CUSTOMERID left join vi_rent_plan_sum vrps on lul.contract_id = vrps.contract_id where cp.CERTID = '"+certid+"' and lul.IS_MAIN = 'Y' group by cp.CERTID";
String money_num = "select format(sum(nvl(corpus_over,0)),2) as corpus_over from customer_person cp left join lb_union_lessee lul on lul.CUSTOMER_ID = cp.CUSTOMERID left join vi_rent_plan vrps on lul.contract_id = vrps.contract_id where cp.CERTID = '"+certid+"' and lul.IS_MAIN = 'Y' group by cp.CERTID";
List<Map<String, String>> money_number = conn.executeQuery(money_num);
String yqmoney_num = "select format(sum(nvl(rent_over, 0)), 2) as yqrent_over from customer_person cp left join lb_union_lessee lul on lul.CUSTOMER_ID = cp.CUSTOMERID left join vi_rent_plan vrp on lul.contract_id = vrp.contract_id where cp.CERTID = '"+certid+"' and lul.IS_MAIN = 'Y' and STR_TO_DATE(vrp.plan_date,'%Y/%m/%d') < now() group by cp.CERTID";
List<Map<String, String>> yqmoney_number = conn.executeQuery(yqmoney_num);
String czr_rent_over = "";
String czr_yqrent_over = "";
if(money_number.size()>0){
czr_rent_over = money_number.get(0).get("rent_over");
czr_rent_over = money_number.get(0).get("corpus_over");
}else {
czr_rent_over = "0";
}
@ -202,14 +202,14 @@ public class InsertCustomerHistoryInfo {
gtcarwjqnumber = "0";
}
//获取客户为共同承租人剩余租金,罚息
String gt_money_num = "select format(sum(nvl(rent_over,0)),2) as rent_over from customer_family cf left join lb_union_lessee lul on cf.PROJECT_ID = cf.PROJECT_ID left join vi_rent_plan_sum vrps on lul.contract_id = vrps.contract_id where cf.certid = '"+certid+"' and cf.Partner_ = 'Y' group by cf.certid";
String gt_money_num = "select format(sum(nvl(corpus_over,0)),2) as corpus_over from customer_family cf left join lb_union_lessee lul on cf.PROJECT_ID = cf.PROJECT_ID left join vi_rent_plan vrps on lul.contract_id = vrps.contract_id where cf.certid = '"+certid+"' and cf.Partner_ = 'Y' group by cf.certid";
List<Map<String, String>> gt_money_number = conn.executeQuery(gt_money_num);
String gt_yqmoney_num = "select format(sum(nvl(rent_over, 0)), 2) as yqrent_over from customer_family cf left join lb_union_lessee lul on cf.PROJECT_ID = lul.PROJECT_ID left join vi_rent_plan vrp on lul.contract_id = vrp.contract_id where cf.certid = '"+certid+"' and cf.Partner_ = 'Y' and STR_TO_DATE(vrp.plan_date,'%Y/%m/%d') < now() group by cf.certid";
List<Map<String, String>> gt_yqmoney_number = conn.executeQuery(gt_yqmoney_num);
String gt_rent_over = "";
String gt_yqrent_over = "";
if(gt_money_number.size()>0){
gt_rent_over = gt_money_number.get(0).get("rent_over");
gt_rent_over = gt_money_number.get(0).get("corpus_over");
}else {
gt_rent_over = "0";
}
@ -282,14 +282,14 @@ public class InsertCustomerHistoryInfo {
dbcarwjqnumber = "0";
}
//获取客户为担保人剩余租金,罚息
String db_money_num = "select format(sum(nvl(rent_over,0)),2) as rent_over,format(sum(nvl(penalty_over,0)),2) as penalty_over from lb_guarantee_unit lgu left join vi_rent_plan_sum vrps on lgu.contract_id = vrps.contract_id where lgu.certid = '"+certid+"' group by lgu.certid";
String db_money_num = "select format(sum(nvl(corpus_over, 0)), 2) as corpus_over from lb_guarantee_unit lgu left join vi_rent_plan vrp on lgu.contract_id = vrp.contract_id where lgu.certid = '"+certid+"' group by lgu.certid";
List<Map<String, String>> db_money_number = conn.executeQuery(db_money_num);
String db_yqmoney_num = "select format(sum(nvl(rent_over, 0)), 2) as yqrent_over from lb_guarantee_unit lgu left join vi_rent_plan vrp on lgu.contract_id = vrp.contract_id where lgu.certid = '220121197205076448' and STR_TO_DATE(vrp.plan_date,'%Y/%m/%d') < now() group by lgu.certid";
String db_yqmoney_num = "select format(sum(nvl(rent_over, 0)), 2) as yqrent_over from lb_guarantee_unit lgu left join vi_rent_plan vrp on lgu.contract_id = vrp.contract_id where lgu.certid = '"+certid+"' and STR_TO_DATE(vrp.plan_date,'%Y/%m/%d') < now() group by lgu.certid";
List<Map<String, String>> db_yqmoney_number = conn.executeQuery(db_yqmoney_num);
String db_rent_over = "";
String db_yqrent_over = "";
if(db_money_number.size()>0){
db_rent_over = db_money_number.get(0).get("rent_over");
db_rent_over = db_money_number.get(0).get("corpus_over");
}else {
db_rent_over = "0";
}