客户历史信息逾期租金修改,详情由合同信息改为业务信息

This commit is contained in:
zzk 2023-09-14 17:26:14 +08:00
parent e2db818a33
commit 010908cfd5
5 changed files with 49 additions and 20 deletions

View File

@ -14,7 +14,7 @@
String orgname = Sqlca.getString("select orgname from org_info oi where orgid = '"+orgid+"'");
//判断修改人是否为提交人
String comm = "select case when phaseno = '"+phaseNo+"' and inputuser = '"+userid+"' then 'false' else 'true' end as comm from communication where id = '"+id+"'";
String comm = Sqlca.getString("select case when phaseno = '"+phaseNo+"' and inputuser = '"+userid+"' then 'false' else 'true' end as comm from communication where id = '"+id+"'");
String sPrevUrl = CurPage.getParameter("PrevUrl");
if(sPrevUrl == null) sPrevUrl = "/Tenwa/Customer/Lessee/Comm/Communication/Communication_list.jsp";

View File

@ -203,6 +203,17 @@
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
$(function(){
//拒单理由 复审意见为拒绝和返回经销商时拒单理由显示
var vo = getItemValue(0,0,"secondchoice");
if(vo=="0010"||vo=="0040"){
showItem(0,"VETO");
setItemRequired(0,"VETO",true);
}else {
hideItem(0,"VETO");
setItemRequired(0,"VETO",false);
}
$(".info_td_left").css("width","150px");
$(".info_mid_line").css("width","50%");
var selectOpinion = '';
@ -685,7 +696,7 @@
$('#SECONDOPINION').append(sReturn);
}
});
//拒单理由
//拒单理由 复审意见为拒绝和返回经销商时拒单理由显示
var vo = getItemValue(0,0,"secondchoice");
if(vo=="0010"||vo=="0040"){
showItem(0,"VETO");

View File

@ -996,6 +996,8 @@
<attribute name="LEASE_TERM" label="合同期次" type="STRING" length="32"/>
<attribute name="STATUS_NAME" label="合同状态名称" type="STRING" length="32"/>
<attribute name="CONTRACT_STATUS" label="合同状态" type="STRING" length="32"/>
<attribute name="PROJECT_ID" label="项目ID" type="STRING" length="32"/>
<attribute name="PROJ_NAME" label="项目名称" type="STRING" length="200"/>
</attributes>
<manager>
<managerProperties>

View File

@ -118,20 +118,22 @@ public class InsertCustomerHistoryInfo {
}else {
carwjqnumber = "0";
}
//获取客户为主承租剩余租金,罚息
String 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_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 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";
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 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";
List<Map<String, String>> yqmoney_number = conn.executeQuery(yqmoney_num);
String czr_rent_over = "";
String czr_penalty_over = "";
String czr_yqrent_over = "";
if(money_number.size()>0){
czr_rent_over = money_number.get(0).get("rent_over");
}else {
czr_rent_over = "0";
}
if(money_number.size()>0){
czr_penalty_over = money_number.get(0).get("rent_over");
if(yqmoney_number.size()>0){
czr_yqrent_over = yqmoney_number.get(0).get("yqrent_over");
}else {
czr_penalty_over = "0";
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";
@ -197,19 +199,21 @@ public class InsertCustomerHistoryInfo {
gtcarwjqnumber = "0";
}
//获取客户为共同承租人剩余租金,罚息
String gt_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_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 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";
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 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";
List<Map<String, String>> gt_yqmoney_number = conn.executeQuery(gt_yqmoney_num);
String gt_rent_over = "";
String gt_penalty_over = "";
String gt_yqrent_over = "";
if(gt_money_number.size()>0){
gt_rent_over = gt_money_number.get(0).get("rent_over");
}else {
gt_rent_over = "0";
}
if(gt_money_number.size()>0){
gt_penalty_over = gt_money_number.get(0).get("penalty_over");
if(gt_yqmoney_number.size()>0){
gt_yqrent_over = gt_yqmoney_number.get(0).get("yqrent_over");
}else {
gt_penalty_over = "0";
gt_yqrent_over = "0";
}
//获取客户为担保人订单总数
String db_gm_nu = "select count(lgu.id) as num from lb_guarantee_unit lgu where lgu.certid = '"+certid+"' group by lgu.certid";
@ -277,26 +281,28 @@ public class InsertCustomerHistoryInfo {
//获取客户为担保人剩余租金,罚息
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";
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";
List<Map<String, String>> db_yqmoney_number = conn.executeQuery(db_yqmoney_num);
String db_rent_over = "";
String db_penalty_over = "";
String db_yqrent_over = "";
if(db_money_number.size()>0){
db_rent_over = db_money_number.get(0).get("rent_over");
}else {
db_rent_over = "0";
}
if(db_money_number.size()>0){
db_penalty_over = db_money_number.get(0).get("penalty_over");
if(db_yqmoney_number.size()>0){
db_yqrent_over = db_yqmoney_number.get(0).get("yqrent_over");
}else {
db_penalty_over = "0";
db_yqrent_over = "0";
}
//客户敞口计算
Transaction sqlca = Transaction.createTransaction(tx);
BigDecimal exposureMoney = LBBusinessPrimary.obtainExposureMoney(sqlca,flowunid);
//录入客户历史信息表
String ssql = "insert into customer_history_info_temp(id,customerid,customername,certtype,certid,customertype,customer_num,flowunid,project_id,clientbuynumber,clientfinancingamount,clientclosedaccount,clientunsettled,clientvehiclepopulation,clientclosedvehicle,clientoutstandingvehicle,clientloanbalance,clientoverdueamount,jointlybuynumber,jointlyfinancingamount,jointlyclosedaccount,jointlyunsettled,jointlyveh,jointlyclosedvehicle,jointlyout,jointlyloanbalance,jointlyoverdueamount,guaranteebuynumber,guaranteefin,guaranteeclosedaccount,guaranteeunsettled,guaranteeveh,guaranteeclosedvehicle,guaranteeout,guaranteeloanbalance,guaranteeoverdueamount,exposure)"+
"VALUES(replace(uuid(),'-',''),'"+customerinfo.get(i).get("customerid")+"','"+customerinfo.get(i).get("customername")+"','"+customerinfo.get(i).get("certtype")+"','"+customerinfo.get(i).get("certid")+"','"+customerinfo.get(i).get("customertype")+"','"+customerinfo.get(i).get("customer_num")+"','"+flowunid+"','"+customerinfo.get(i).get("project_id")+"','"+gmnum+"','"+CLEAN_LEASE_MONEY+"','"+jq_number+"','"+wjq_number+"','"+carnumber+"','"+carjqnumber+"','"+carwjqnumber+"','"+czr_rent_over+"','"+czr_penalty_over+"',"+
"'"+gtgmnumber+"','"+GT_CLEAN_LEASE_MONEY+"','"+gt_jq_number+"','"+gt_wjq_number+"','"+gtcarnumber+"','"+gtcarjqnumber+"','"+gtcarwjqnumber+"','"+gt_rent_over+"','"+gt_penalty_over+"',"+
"'"+dbgmnumber+"','"+DB_CLEAN_LEASE_MONEY+"','"+db_jq_number+"','"+db_wjq_number+"','"+dbcarnumber+"','"+dbcarjqnumber+"','"+dbcarwjqnumber+"','"+db_rent_over+"','"+db_penalty_over+"','"+exposureMoney+"')";
"VALUES(replace(uuid(),'-',''),'"+customerinfo.get(i).get("customerid")+"','"+customerinfo.get(i).get("customername")+"','"+customerinfo.get(i).get("certtype")+"','"+customerinfo.get(i).get("certid")+"','"+customerinfo.get(i).get("customertype")+"','"+customerinfo.get(i).get("customer_num")+"','"+flowunid+"','"+customerinfo.get(i).get("project_id")+"','"+gmnum+"','"+CLEAN_LEASE_MONEY+"','"+jq_number+"','"+wjq_number+"','"+carnumber+"','"+carjqnumber+"','"+carwjqnumber+"','"+czr_rent_over+"','"+czr_yqrent_over+"',"+
"'"+gtgmnumber+"','"+GT_CLEAN_LEASE_MONEY+"','"+gt_jq_number+"','"+gt_wjq_number+"','"+gtcarnumber+"','"+gtcarjqnumber+"','"+gtcarwjqnumber+"','"+gt_rent_over+"','"+gt_yqrent_over+"',"+
"'"+dbgmnumber+"','"+DB_CLEAN_LEASE_MONEY+"','"+db_jq_number+"','"+db_wjq_number+"','"+dbcarnumber+"','"+dbcarjqnumber+"','"+dbcarwjqnumber+"','"+db_rent_over+"','"+db_yqrent_over+"','"+exposureMoney+"')";
SqlObject sqlObject = new SqlObject(ssql);
sqlca.executeSQL(sqlObject);

View File

@ -72,4 +72,14 @@ public interface VI_CUSTOMERHISTORY {
*/
public static final String CONTRACT_STATUS = "CONTRACT_STATUS";
/**
* ÏîÄ¿ID STRING(32)<br>
*/
public static final String PROJECT_ID = "PROJECT_ID";
/**
* ÏîÄ¿Ãû³Æ STRING(200)<br>
*/
public static final String PROJ_NAME = "PROJ_NAME";
}