diff --git a/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistoryInformation.jsp b/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistoryInformation.jsp index 50d0e6b21..ccf0ad04e 100644 --- a/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistoryInformation.jsp +++ b/WebContent/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistoryInformation.jsp @@ -10,7 +10,7 @@ String productId=CurPage.getParameter("ProductId"); String projectId=CurPage.getParameter("ProjectId"); String khcertid = Sqlca.getString("select ci.certid from lb_union_lessee_temp lul left join customer_info ci on ci.customerid = lul.CUSTOMER_ID where lul.IS_MAIN = 'Y' and lul.flowunid='"+flowunid+"'"); - String gtcertid = Sqlca.getString("select ci.certid from lb_union_lessee_temp lul left join customer_info ci on ci.customerid = lul.CUSTOMER_ID where lul.IS_MAIN = 'N' and lul.flowunid='"+flowunid+"'"); + String gtcertid = Sqlca.getString("select cf.certid from customer_family_temp cf where cf.flowunid='"+flowunid+"'"); String dbcertid = Sqlca.getString("select CERTID from lb_guarantee_unit_temp where flowunid='"+flowunid+"' order by CERTID asc limit 1"); String dbcertid2 = Sqlca.getString("select CERTID from lb_guarantee_unit_temp where flowunid='"+flowunid+"' order by CERTID desc limit 1"); //客户传参 @@ -21,14 +21,27 @@ String params3="flowunid="+flowunid+"&plannumber="+plannumber+"&planCName="+planCName+"&calType="+calType+"&IsHistory="+IsHistory+"&RightType="+RightType+"&ProductId="+productId+"&projectId="+projectId+"&certId="+dbcertid+"&type=guarantee"; //担保人2参数 String params4="flowunid="+flowunid+"&plannumber="+plannumber+"&planCName="+planCName+"&calType="+calType+"&IsHistory="+IsHistory+"&RightType="+RightType+"&ProductId="+productId+"&projectId="+projectId+"&certId="+dbcertid2+"&type=guarantee"; + + //判断是否有共同承租人和担保人 + String custnum1 = Sqlca.getString("select count(cf.id) as num from customer_family_temp cf where cf.flowunid='"+flowunid+"'"); + String custnum2 = Sqlca.getString("select count(lul.ID) as num from lb_guarantee_unit_temp lul where lul.flowunid='"+flowunid+"'"); + Integer a = Integer.valueOf(custnum2); + String show1 = "false"; + String show2 = "false"; + String show3 = "false"; + + if (custnum1 != null||custnum1 != "null"){show1 = "true";} + if (a >= 1){show2 = "true";} + if (a > 1){show3 = "true";} + //参数:0.是否显示, 1.标题,2.URL,3,参数串, 4. Strip高度(默认600px),5. 是否有关闭按钮(默认无) 6. 是否缓存(默认是) // String userid = CurUser.getUserID(); String orgid = CurUser.getOrgID(); String sTabStrip[][] = { {"true", "客户", "/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistory_Info_temp.jsp",params, "", "", "false"}, - {"true", "共同承租人", "/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistory_Info_temp.jsp",params2, "", "", "false"}, - {"true", "担保人", "/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistory_Info_temp.jsp",params3, "", "", "false"}, - {"true", "担保人2", "/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistory_Info_temp.jsp",params4, "", "", "false"}, + {show1, "共同承租人", "/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistory_Info_temp.jsp",params2, "", "", "false"}, + {show2, "担保人", "/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistory_Info_temp.jsp",params3, "", "", "false"}, + {show3, "担保人2", "/Tenwa/Customer/Lessee/Comm/CustomerHistory/CustomerHistory_Info_temp.jsp",params4, "", "", "false"}, }; %> <%@ include file="/Resources/CodeParts/Tab01.jsp"%> diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertCustomerHistoryInfo.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertCustomerHistoryInfo.java index 6cd31398a..4c15d0a36 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertCustomerHistoryInfo.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/InsertCustomerHistoryInfo.java @@ -34,9 +34,11 @@ public class InsertCustomerHistoryInfo { Conn conn = new Conn(tx); String flowunid = this.flowunid; //获取客户基本信息 - String sql = "select ci.customerid,ci.customername,ci.certtype,ci.certid,(case when lul.IS_MAIN = 'Y' then '主承租人' else '共同承租人' end) as customertype,ci.customer_num,lul.FLOWUNID,lul.project_id from customer_info ci left join lb_union_lessee_temp lul on lul.customer_id = ci.customerid where lul.FLOWUNID = '" + flowunid + "' \n" + + String sql = "select ci.customerid,ci.customername,ci.certtype,ci.certid,'主承租人' as customertype,ci.customer_num,lul.FLOWUNID,lul.project_id from customer_info ci left join lb_union_lessee_temp lul on lul.customer_id = ci.customerid where lul.IS_MAIN = 'Y' and lul.FLOWUNID = '" + flowunid + "' \n" + "union \n" + - "select lgu.ASSUROR as customerid,lgu.FULLNAME as customername,lgu.CERTTYPE,lgu.certid,'担保人' as customertype,'' as customer_num,lgu.FLOWUNID,lgu.project_id from lb_guarantee_unit_temp lgu where lgu.FLOWUNID = '" + flowunid + "'"; + "select lgu.ASSUROR as customerid,lgu.FULLNAME as customername,lgu.CERTTYPE,lgu.certid,'担保人' as customertype,'' as customer_num,lgu.FLOWUNID,lgu.project_id from lb_guarantee_unit_temp lgu where lgu.FLOWUNID = '" + flowunid + "'\n" + + "union \n" + + "select '' as customerid,cf.name as customername,cf.CERTTYPE,cf.certid,'共同承租人' as customertype,'' as customer_num,cf.FLOWUNID,cf.PROJECT_ID from customer_family_temp cf where cf.FLOWUNID = '" + flowunid + "'\n"; List> customerinfo = conn.executeQuery(sql); String customerid = ""; String certid = ""; @@ -56,7 +58,7 @@ public class InsertCustomerHistoryInfo { certid = customerinfo.get(i).get("certid"); //获取客户为主承租人订单总数 - String gm_nu = "select count(lul.id) as num from lb_union_lessee lul where lul.CUSTOMER_ID = '"+customerid+"' and lul.IS_MAIN = 'Y' group by lul.CUSTOMER_ID"; + String gm_nu = "select count(lul.id) as num from customer_person cp left join lb_union_lessee lul on lul.CUSTOMER_ID = cp.CUSTOMERID where cp.CERTID = '"+certid+"' and lul.IS_MAIN = 'Y' group by cp.CERTID"; List> gm_number = conn.executeQuery(gm_nu); String gmnum = ""; if(gm_number.size()>0){ @@ -65,7 +67,7 @@ public class InsertCustomerHistoryInfo { gmnum = "0"; } ///获取客户为主承租融资金额和 - String sum_rz = "select format(sum(nvl(CLEAN_LEASE_MONEY,0)),2) as CLEAN_LEASE_MONEY from lb_union_lessee lul left join lb_contract_info lci on lci.id = lul.CONTRACT_ID left join lc_calc_condition lcc on lcc.CONTRACT_ID = lul.CONTRACT_ID where lul.customer_id = '"+customerid+"' and lul.IS_MAIN = 'Y' and lci.CONTRACT_STATUS >=31 and lci.CONTRACT_STATUS <> '104' group by lul.customer_id"; + String sum_rz = "select format(sum(nvl(CLEAN_LEASE_MONEY,0)),2) as CLEAN_LEASE_MONEY from customer_person cp left join lb_union_lessee lul on lul.CUSTOMER_ID = cp.CUSTOMERID left join lb_contract_info lci on lci.id = lul.CONTRACT_ID left join lc_calc_condition lcc on lcc.CONTRACT_ID = lul.CONTRACT_ID where cp.CERTID = '"+certid+"' and lul.IS_MAIN = 'Y' and lci.CONTRACT_STATUS >=31 and lci.CONTRACT_STATUS <> '104' group by cp.CERTID"; List> rz = conn.executeQuery(sum_rz); String CLEAN_LEASE_MONEY = ""; if(rz.size()>0){ @@ -74,7 +76,7 @@ public class InsertCustomerHistoryInfo { CLEAN_LEASE_MONEY = "0"; } //获取客户为主承租已结清合同数 - String jq_contract_num = "select count(lci.ID) as num from lb_union_lessee lul left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where lul.customer_id = '"+customerid+"' and lul.IS_MAIN = 'Y' and lci.CONTRACT_STATUS in ('100','105') group by lul.customer_id"; + String jq_contract_num = "select count(lci.ID) as num from customer_person cp left join lb_union_lessee lul on lul.CUSTOMER_ID = cp.CUSTOMERID left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where cp.CERTID = '"+certid+"' and lul.IS_MAIN = 'Y' and lci.CONTRACT_STATUS in ('100','105') group by cp.CERTID"; List> jq_num = conn.executeQuery(jq_contract_num); String jq_number = ""; if(jq_num.size()>0){ @@ -83,7 +85,7 @@ public class InsertCustomerHistoryInfo { jq_number = "0"; } //获取客户为主承租未结清合同数 - String wjq_contract_num = "select count(lci.ID) as num from lb_union_lessee lul left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where lul.customer_id = '"+customerid+"' and lul.IS_MAIN = 'Y' and lci.CONTRACT_STATUS >=31 and lci.CONTRACT_STATUS <= 100 group by lul.customer_id"; + String wjq_contract_num = "select count(lci.ID) as num from customer_person cp left join lb_union_lessee lul on lul.CUSTOMER_ID = cp.CUSTOMERID left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where cp.CERTID = '"+certid+"' and lul.IS_MAIN = 'Y' and lci.CONTRACT_STATUS >=31 and lci.CONTRACT_STATUS <= 100 group by cp.CERTID"; List> wjq_num = conn.executeQuery(wjq_contract_num); String wjq_number = ""; if(wjq_num.size()>0){ @@ -92,7 +94,7 @@ public class InsertCustomerHistoryInfo { wjq_number = "0"; } //获取客户为主承租车辆总和 - String car_num = "select count(lec.ID) as num from lb_union_lessee lul left join lb_equipment_car lec on lec.CONTRACT_ID = lul.CONTRACT_ID where lul.customer_id = '"+customerid+"' and lul.IS_MAIN = 'Y' and lec.car_attribute = 'head' group by lul.customer_id"; + String car_num = "select count(lec.ID) as num from customer_person cp left join lb_union_lessee lul on lul.CUSTOMER_ID = cp.CUSTOMERID left join lb_equipment_car lec on lec.CONTRACT_ID = lul.CONTRACT_ID where cp.CERTID = '"+certid+"' and lul.IS_MAIN = 'Y' and lec.car_attribute = 'head' group by cp.CERTID"; List> car_number = conn.executeQuery(car_num); String carnumber = ""; if(car_number.size()>0){ @@ -101,7 +103,7 @@ public class InsertCustomerHistoryInfo { carnumber = "0"; } //获取客户为主承租结清车辆总和 - String car_jq_num = "select count(lec.ID) as num from lb_union_lessee lul left join lb_equipment_car lec on lec.CONTRACT_ID = lul.CONTRACT_ID left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where lul.customer_id = '"+customerid+"' and lul.IS_MAIN = 'Y' and lci.CONTRACT_STATUS in ('100','105') and lec.car_attribute = 'head' group by lul.customer_id"; + String car_jq_num = "select count(lec.ID) as num from customer_person cp left join lb_union_lessee lul on lul.CUSTOMER_ID = cp.CUSTOMERID left join lb_equipment_car lec on lec.CONTRACT_ID = lul.CONTRACT_ID left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where cp.CERTID = '"+certid+"' and lul.IS_MAIN = 'Y' and lci.CONTRACT_STATUS in ('100','105') and lec.car_attribute = 'head' group by cp.CERTID"; List> car_jq_number = conn.executeQuery(car_jq_num); String carjqnumber = ""; if(car_jq_number.size()>0){ @@ -110,7 +112,7 @@ public class InsertCustomerHistoryInfo { carjqnumber = "0"; } //获取客户为主承租未结清车辆总和 - String car_wjq_num = "select count(lec.ID) as num from lb_union_lessee lul left join lb_equipment_car lec on lec.CONTRACT_ID = lul.CONTRACT_ID left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where lul.customer_id = '"+customerid+"' and lul.IS_MAIN = 'Y' and lci.CONTRACT_STATUS >='31' and lci.CONTRACT_STATUS <= '100' and lec.car_attribute = 'head' group by lul.customer_id"; + String car_wjq_num = "select count(lec.ID) as num from customer_person cp left join lb_union_lessee lul on lul.CUSTOMER_ID = cp.CUSTOMERID left join lb_equipment_car lec on lec.CONTRACT_ID = lul.CONTRACT_ID left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where cp.CERTID = '"+certid+"' and lul.IS_MAIN = 'Y' and lci.CONTRACT_STATUS >='31' and lci.CONTRACT_STATUS <= '100' and lec.car_attribute = 'head' group by cp.CERTID"; List> car_wjq_number = conn.executeQuery(car_wjq_num); String carwjqnumber = ""; if(car_wjq_number.size()>0){ @@ -119,9 +121,9 @@ public class InsertCustomerHistoryInfo { carwjqnumber = "0"; } //获取客户为主承租剩余租金,逾期租金 - String money_num = "select format(sum(nvl(rent_over,0)),2) as rent_over from lb_union_lessee lul left join vi_rent_plan_sum vrps on lul.contract_id = vrps.contract_id where lul.CUSTOMER_ID = '"+customerid+"' and lul.IS_MAIN = 'Y' group by lul.CUSTOMER_ID"; + 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"; List> money_number = conn.executeQuery(money_num); - String yqmoney_num = "select format(sum(nvl(rent_over, 0)), 2) as yqrent_over from lb_union_lessee lul left join vi_rent_plan vrp on lul.contract_id = vrp.contract_id where lul.CUSTOMER_ID = '"+customerid+"' and lul.IS_MAIN = 'Y' and STR_TO_DATE(vrp.plan_date,'%Y/%m/%d') < now() group by lul.CUSTOMER_ID"; + 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> yqmoney_number = conn.executeQuery(yqmoney_num); String czr_rent_over = ""; String czr_yqrent_over = ""; @@ -136,7 +138,7 @@ public class InsertCustomerHistoryInfo { czr_yqrent_over = "0"; } //获取客户为共同承租人订单总数 - String gt_gm_nu = "select count(lul.id) as num from lb_union_lessee lul where lul.CUSTOMER_ID = '"+customerid+"' and lul.IS_MAIN = 'N' group by lul.CUSTOMER_ID"; + String gt_gm_nu = "select count(cf.id) as num from customer_family cf where cf.Partner_ = 'Y' and cf.certid = '"+certid+"' group by certid"; List> gt_gm_number = conn.executeQuery(gt_gm_nu); String gtgmnumber = ""; if(gt_gm_number.size()>0){ @@ -145,7 +147,7 @@ public class InsertCustomerHistoryInfo { gtgmnumber = "0"; } //获取客户为共同承租人融资额和 - String gt_sum_rz = "select format(sum(nvl(CLEAN_LEASE_MONEY,0)),2) as CLEAN_LEASE_MONEY from lb_union_lessee lul left join lb_contract_info lci on lci.id = lul.CONTRACT_ID left join lc_calc_condition lcc on lcc.CONTRACT_ID = lul.CONTRACT_ID where lul.customer_id = '"+customerid+"' and lul.IS_MAIN = 'N' and lci.CONTRACT_STATUS >=31 and lci.CONTRACT_STATUS <> '104' group by lul.customer_id"; + String gt_sum_rz = "select format(sum(nvl(CLEAN_LEASE_MONEY,0)),2) as CLEAN_LEASE_MONEY from customer_family cf left join lb_union_lessee lul on cf.PROJECT_ID = lul.PROJECT_ID left join lb_contract_info lci on lci.id = lul.CONTRACT_ID left join lc_calc_condition lcc on lcc.CONTRACT_ID = lul.CONTRACT_ID where cf.certid = '"+certid+"' and cf.Partner_ = 'Y' and lci.CONTRACT_STATUS >=31 and lci.CONTRACT_STATUS <> '104' group by cf.certid"; List> gt_rz = conn.executeQuery(gt_sum_rz); String GT_CLEAN_LEASE_MONEY = ""; if(gt_rz.size()>0){ @@ -154,7 +156,7 @@ public class InsertCustomerHistoryInfo { GT_CLEAN_LEASE_MONEY = "0"; } //获取客户为共同承租人已结清单数 - String gt_jq_contract_num = "select count(lci.ID) as num from lb_union_lessee lul left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where lul.customer_id = '"+customerid+"' and lul.IS_MAIN = 'N' and lci.CONTRACT_STATUS in ('100','105') group by lul.customer_id"; + String gt_jq_contract_num = "select count(lci.ID) as num from customer_family cf left join lb_union_lessee lul on lul.PROJECT_ID = cf.PROJECT_ID left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where cf.certid = '"+certid+"' and cf.Partner_ = 'Y' and lci.CONTRACT_STATUS in ('100','105') group by cf.certid"; List> gt_jq_num = conn.executeQuery(gt_jq_contract_num); String gt_jq_number = ""; if(gt_jq_num.size()>0){ @@ -163,7 +165,7 @@ public class InsertCustomerHistoryInfo { gt_jq_number = "0"; } //获取客户为共同承租人未结清单数 - String gt_wjq_contract_num = "select count(lci.ID) as num from lb_union_lessee lul left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where lul.customer_id = '"+customerid+"' and lul.IS_MAIN = 'N' and lci.CONTRACT_STATUS >=31 and lci.CONTRACT_STATUS <= 100 group by lul.customer_id"; + String gt_wjq_contract_num = "select count(lci.ID) as num from customer_family cf left join lb_union_lessee lul on lul.PROJECT_ID = cf.PROJECT_ID left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where cf.certid = '"+certid+"' and cf.Partner_ = 'Y' and lci.CONTRACT_STATUS >=31 and lci.CONTRACT_STATUS <= 100 group by cf.certid"; List> gt_wjq_num = conn.executeQuery(gt_wjq_contract_num); String gt_wjq_number = ""; if(gt_wjq_num.size()>0){ @@ -172,7 +174,7 @@ public class InsertCustomerHistoryInfo { gt_wjq_number = "0"; } //获取客户为共同承租人车辆总和 - String gt_car_num = "select count(lec.ID) as num from lb_union_lessee lul left join lb_equipment_car lec on lec.CONTRACT_ID = lul.CONTRACT_ID where lul.customer_id = '"+customerid+"' and lul.IS_MAIN = 'N' and lec.car_attribute = 'head' group by lul.customer_id"; + String gt_car_num = "select count(lec.ID) as num from customer_family cf left join lb_union_lessee lul on cf.PROJECT_ID = cf.PROJECT_ID left join lb_equipment_car lec on lec.CONTRACT_ID = lul.CONTRACT_ID where cf.certid = '"+certid+"' and cf.Partner_ = 'Y' and lec.car_attribute = 'head' group by cf.certid"; List> gt_car_number = conn.executeQuery(gt_car_num); String gtcarnumber = ""; if(gt_car_number.size()>0){ @@ -181,7 +183,7 @@ public class InsertCustomerHistoryInfo { gtcarnumber = "0"; } //获取客户为共同承租人结清车辆总和 - String gt_car_jq_num = "select count(lec.ID) as num from lb_union_lessee lul left join lb_equipment_car lec on lec.CONTRACT_ID = lul.CONTRACT_ID left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where lul.customer_id = '"+customerid+"' and lul.IS_MAIN = 'N' and lci.CONTRACT_STATUS in ('100','105') and lec.car_attribute = 'head' group by lul.customer_id"; + String gt_car_jq_num = "select count(lec.ID) as num from customer_family cf left join lb_union_lessee lul on cf.PROJECT_ID = cf.PROJECT_ID left join lb_equipment_car lec on lec.CONTRACT_ID = lul.CONTRACT_ID left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where cf.certid = '"+certid+"' and cf.Partner_ = 'Y' and lci.CONTRACT_STATUS in ('100','105') and lec.car_attribute = 'head' group by cf.certid"; List> gt_car_jq_number = conn.executeQuery(gt_car_jq_num); String gtcarjqnumber = ""; if(gt_car_jq_number.size()>0){ @@ -190,7 +192,7 @@ public class InsertCustomerHistoryInfo { gtcarjqnumber = "0"; } //获取客户为共同承租人未结清车辆总和 - String gt_car_wjq_num = "select count(lec.ID) as num from lb_union_lessee lul left join lb_equipment_car lec on lec.CONTRACT_ID = lul.CONTRACT_ID left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where lul.customer_id = '"+customerid+"' and lul.IS_MAIN = 'N' and lci.CONTRACT_STATUS >='31' and lci.CONTRACT_STATUS <= '100' and lec.car_attribute = 'head' group by lul.customer_id"; + String gt_car_wjq_num = "select count(lec.ID) as num from customer_family cf left join lb_union_lessee lul on cf.PROJECT_ID = cf.PROJECT_ID left join lb_equipment_car lec on lec.CONTRACT_ID = lul.CONTRACT_ID left join lb_contract_info lci on lci.id = lul.CONTRACT_ID where cf.certid = '"+certid+"' and cf.Partner_ = 'Y' and lci.CONTRACT_STATUS >='31' and lci.CONTRACT_STATUS <= '100' and lec.car_attribute = 'head' group by cf.certid"; List> gt_car_wjq_number = conn.executeQuery(gt_car_wjq_num); String gtcarwjqnumber = ""; if(gt_car_wjq_number.size()>0){ @@ -199,9 +201,9 @@ public class InsertCustomerHistoryInfo { gtcarwjqnumber = "0"; } //获取客户为共同承租人剩余租金,罚息 - String gt_money_num = "select format(sum(nvl(rent_over,0)),2) as rent_over from lb_union_lessee lul left join vi_rent_plan_sum vrps on lul.contract_id = vrps.contract_id where lul.CUSTOMER_ID = '"+customerid+"' and lul.IS_MAIN = 'N' group by lul.CUSTOMER_ID"; + 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"; List> gt_money_number = conn.executeQuery(gt_money_num); - String gt_yqmoney_num = "select format(sum(nvl(rent_over, 0)), 2) as yqrent_over from lb_union_lessee lul left join vi_rent_plan vrp on lul.contract_id = vrp.contract_id where lul.CUSTOMER_ID = '"+customerid+"' and lul.IS_MAIN = 'N' and STR_TO_DATE(vrp.plan_date,'%Y/%m/%d') < now() group by lul.CUSTOMER_ID"; + 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> gt_yqmoney_number = conn.executeQuery(gt_yqmoney_num); String gt_rent_over = ""; String gt_yqrent_over = "";