修改测算的默认还款日,调息方式,租金推算方式,贴息默认值

This commit is contained in:
zhulianghua 2018-07-24 11:11:41 +08:00
parent 3436cc54bd
commit 1bb93ff386
2 changed files with 38 additions and 18 deletions

View File

@ -25,8 +25,6 @@
String nodeNo=CurPage.getParameter("NodeNo");
String RightType= CurPage.getParameter("RightType");
String calType = CurPage.getParameter("calType");
String FlowNo = CurPage.getParameter("FlowNo");
String PhaseNo = CurPage.getParameter("PhaseNo");
//判断是否为汽车业务
boolean isCarProduct = "004".equals(productId) ? false : true;
/*获取参数*/
@ -131,9 +129,6 @@
/*设置页面属性*/
CurPage.getCurComp().setAttribute("RightType", null);
if(FlowNo.equals("BusinessApplyFlow")&&(PhaseNo.equals("0010")||PhaseNo.equals("0020"))){
doTemp.setVisible("RENT_RATIO",false);
}
Parameter p=new Parameter("plannumber",plannumber);
Vector<Parameter> v=CurPage.parameterList;
v.add(p);
@ -188,7 +183,6 @@ $(function(){
incomeNumberYear=$("#INCOME_NUMBER_YEAR").children();
adjustType=$("#ADJUST_TYPE").children();
var fundRules=calcRules["fund"];
console.log(fundRules);
for(var key in fundRules){
$("#"+key).bind("change",function(){
getRatioByMoney(this);
@ -300,6 +294,16 @@ CalcControl.InitStartDate=function(){
var periodType=getItemValue(0,getRow(),"PERIOD_TYPE");//期初期末
var incomenumberyear=Number(getItemValue(0,getRow(),"INCOME_NUMBER_YEAR").split("_")[1]);//还款间隔
var rentDay=getItemValue(0,getRow(0),"DEFAULTDUEDAY");//还款日
var method = calcRules["method"];
var methodName = "";
for(var i in method) {
methodName = i;
break;
}
//是按起租日计算的情况,直接读取当前日期
if(calcRules["method"][methodName]["DefaultDueDay"] != "02") {
rentDay = calcRules["method"][methodName]["ActualDay"];
}
//默认起租日为投放日
if("period_type_1" == periodType){//期初 第一期还款日为投放日
@ -795,8 +799,7 @@ function getRatioByMoney(e){
var firstPaymentRatio = getItemValue(0, 0, "FIRST_PAYMENT_RATIO_0");
var ratio = 100 - Number(firstPaymentRatio);
if(ratio > 0 && allMoney != 0) {
//cleanLeaseMoney = allMoney * (ratio / 100);
cleanLeaseMoney = allMoney-equipAmt*firstPaymentRatio/100;
cleanLeaseMoney = allMoney * (ratio / 100);
setItemValue(0, 0, "RENT_RATIO", ((cleanLeaseMoney / equipAmt) * 100).toFixed(6));
setItemValue(0, 0, "CLEAN_LEASE_MONEY", cleanLeaseMoney);
}

View File

@ -1,8 +1,10 @@
package com.tenwa.reckon.product;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Vector;
import jbo.sys.CODE_LIBRARY;
@ -341,17 +343,23 @@ public class ProductCondition {
Map<String,Map<String,String>> map=ProductParamUtil.getProductComponentType(productId, "PRD0320");
if(map.containsKey("ADJUST_INTEREST")){
Map<String,String> rule=map.get("ADJUST_INTEREST");
if("N".equals(rule.get("ISADJUST_INTEREST"))){
/*if("N".equals(rule.get("ISADJUST_INTEREST"))){
doTemp.setColumnAttribute("ADJUST_STYLE","colvisible", "0");
doTemp.setColumnAttribute("ADJUST_TYPE","colvisible", "0");
}else if("Y".equals(rule.get("ISADJUST_INTEREST"))){
doTemp.setColumnAttribute("ADJUST_STYLE","colvisible", "0");
doTemp.setColumnAttribute("ADJUST_TYPE","colvisible", "0");
doTemp.setColumnAttribute("ADJUST_STYLE","colvisible", "1");
doTemp.setColumnAttribute("ADJUST_TYPE","colvisible", "1");
//µ÷Ï¢ÉúЧ½Úµã
doTemp.setColumnAttribute("ADJUST_STYLE","coleditsource","jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='adjust_style' and itemno in ("+this.getSqlWhere(rule.get("adjust_style"))+") order by sortno");
//µ÷Ï¢·½Ê½
doTemp.setColumnAttribute("ADJUST_TYPE","coleditsource","jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='adjust_type' and itemno in ("+this.getSqlWhere(rule.get("rate_float_type"))+") order by sortno");
}*/
if(null != rule.get("rate_float_type") && null != rule.get("adjust_style")) {
//调息方式
doTemp.setDefaultValue("ADJUST_TYPE", rule.get("rate_float_type"));
//调息生效节点
doTemp.setDefaultValue("ADJUST_STYLE", rule.get("adjust_style"));
}
}
}
@ -394,26 +402,35 @@ public class ProductCondition {
if(values.containsKey("InterestDayType")){
doTemp.setDefaultValue("INTEREST_DAY_TYPE", values.get("InterestDayType"));
}
}
//是按起租日计算的情况直接读取当前日期
Map<String, String> valMap = entry.getValue();
for(Entry<String, String> val : valMap.entrySet()) {
if("DefaultDueDay".equals(val.getKey())) {
if(!"02".equals(val.getValue())) {
sJson = sJson.replaceAll("}", ",ActualDay:" + Calendar.getInstance().get(Calendar.DAY_OF_MONTH) + "}");
doTemp.setVisible("DefaultDueDay", false);
doTemp.setRequired("DefaultDueDay", false);
}
break;
}
}
}
if(submap.containsKey("ISSUBSECTION")){
if(s.length()>0)s+=",";
s+="'even_subsection'";
}
if(s.indexOf("even_rent") != -1) {
/*if(s.indexOf("even_rent") != -1) {
s = "'even_rent'";
} else if(s.indexOf("even_corpus") != -1) {
s = "'even_corpus'";
} else {
s = "'even_interest'";
}
}*/
doTemp.setReadOnly("SETTLE_METHOD", true);
doTemp.setColumnAttribute("SETTLE_METHOD","coleditsource","jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='settle_method' and itemno in ("+s+") order by sortno");
doTemp.setDefaultValue("SETTLE_METHOD", s.replaceAll("'", ""));
return "{"+sJson+"}";