修改年利率获取方式
This commit is contained in:
parent
e106c6436d
commit
fc9235f9d9
@ -365,7 +365,7 @@ public class PlatformDataToTemp extends BaseBussiness {
|
||||
// 租金推算方式
|
||||
lcctBo.setAttributeValue("RENT_OR_RATE", "rate");
|
||||
// 设置年利率
|
||||
setYearRate(otherProperty, productId,lcctBo);
|
||||
setYearRate(otherProperty, productId);
|
||||
lcctBo.setAttributeValue("PERIOD_TYPE", otherProperty.get("PERIOD_TYPE"));
|
||||
lcctBo.setAttributeValue("YEAR_RATE", otherProperty.get("YEAR_RATE"));
|
||||
// 设置还款间隔
|
||||
@ -425,30 +425,20 @@ public class PlatformDataToTemp extends BaseBussiness {
|
||||
}
|
||||
}
|
||||
|
||||
public void setYearRate(Map<String, String> otherProperty, String productId,BizObject lcctBo) throws Exception {
|
||||
|
||||
public void setYearRate(Map<String, String> otherProperty, String productId) throws Exception {
|
||||
Map<String, Map<String, String>> productRates = ProductParamUtil.getProductComponentType(productId, "PRD0350");
|
||||
Map<String, String> productRate = productRates.get("product_rate");
|
||||
String periodType = ProductParamUtil.getProductParameterValue(productId, "PRD0350", "period_type", "begin_end");
|
||||
periodType = periodType == null ? "period_type_0" : periodType;
|
||||
otherProperty.put("PERIOD_TYPE", periodType);
|
||||
if (productRate != null) {
|
||||
String isFixedRate = productRate.get("isFixedRate") == null ? "Y" : productRate.get("isFixedRate");
|
||||
if("N".equals(isFixedRate)){
|
||||
String RateTermScopeMax = productRate.get("RateTermScope-MAX") == null ? "0" : productRate.get("RateTermScope-MAX");
|
||||
String RateTermScopeMin = productRate.get("RateTermScope-MIN") == null ? "0" : productRate.get("RateTermScope-MIN");
|
||||
String yearRate = lcctBo.getAttribute("YEAR_RATE")==null ? "-1": lcctBo.getAttribute("YEAR_RATE").toString();
|
||||
if(new BigDecimal(RateTermScopeMax).compareTo(new BigDecimal(yearRate))>=0 && new BigDecimal(yearRate).compareTo(new BigDecimal(RateTermScopeMin))>=0){
|
||||
otherProperty.put("YEAR_RATE", yearRate);
|
||||
}else{
|
||||
throw new Exception("ÊäÈëµÄÄêÀûÂʲ»ºÏ·¨£¡");
|
||||
}
|
||||
}else{
|
||||
String yearRate = productRate.get("ProductRate") == null ? "0" : productRate.get("ProductRate");
|
||||
otherProperty.put("YEAR_RATE", yearRate);
|
||||
}
|
||||
String yearRate = productRate.get("ProductRate") == null ? "0" : productRate.get("ProductRate");
|
||||
otherProperty.put("YEAR_RATE", yearRate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void setFirstSecondPlan(Map<String, String> otherProperty, String productId, BizObject fcc) throws Exception {
|
||||
String periodType = otherProperty.get("PERIOD_TYPE");
|
||||
String leaseAmtDate = DateUtil.getToday();
|
||||
|
||||
@ -159,7 +159,7 @@ public class PlatformDataToTempNotKjflc extends BaseBussiness {
|
||||
// 租金推算方式
|
||||
lcctBo.setAttributeValue("RENT_OR_RATE", "rate");
|
||||
// 设置年利率
|
||||
setYearRate(otherProperty, productId);
|
||||
setYearRate(otherProperty, productId,lcctBo);
|
||||
lcctBo.setAttributeValue("PERIOD_TYPE", otherProperty.get("PERIOD_TYPE"));
|
||||
lcctBo.setAttributeValue("YEAR_RATE", otherProperty.get("YEAR_RATE"));
|
||||
// 设置还款间隔
|
||||
@ -219,15 +219,27 @@ public class PlatformDataToTempNotKjflc extends BaseBussiness {
|
||||
}
|
||||
}
|
||||
|
||||
public void setYearRate(Map<String, String> otherProperty, String productId) throws Exception {
|
||||
public void setYearRate(Map<String, String> otherProperty, String productId,BizObject lcctBo) throws Exception {
|
||||
Map<String, Map<String, String>> productRates = ProductParamUtil.getProductComponentType(productId, "PRD0350");
|
||||
Map<String, String> productRate = productRates.get("product_rate");
|
||||
String periodType = ProductParamUtil.getProductParameterValue(productId, "PRD0350", "period_type", "begin_end");
|
||||
periodType = periodType == null ? "period_type_0" : periodType;
|
||||
otherProperty.put("PERIOD_TYPE", periodType);
|
||||
if (productRate != null) {
|
||||
String yearRate = productRate.get("ProductRate") == null ? "0" : productRate.get("ProductRate");
|
||||
otherProperty.put("YEAR_RATE", yearRate);
|
||||
String isFixedRate = productRate.get("isFixedRate") == null ? "Y" : productRate.get("isFixedRate");
|
||||
if("N".equals(isFixedRate)){
|
||||
String RateTermScopeMax = productRate.get("RateTermScope-MAX") == null ? "0" : productRate.get("RateTermScope-MAX");
|
||||
String RateTermScopeMin = productRate.get("RateTermScope-MIN") == null ? "0" : productRate.get("RateTermScope-MIN");
|
||||
String yearRate = lcctBo.getAttribute("YEAR_RATE")==null ? "-1": lcctBo.getAttribute("YEAR_RATE").toString();
|
||||
if(new BigDecimal(RateTermScopeMax).compareTo(new BigDecimal(yearRate))>=0 && new BigDecimal(yearRate).compareTo(new BigDecimal(RateTermScopeMin))>=0){
|
||||
otherProperty.put("YEAR_RATE", yearRate);
|
||||
}else{
|
||||
throw new Exception("ÊäÈëµÄÄêÀûÂʲ»ºÏ·¨£¡");
|
||||
}
|
||||
}else{
|
||||
String yearRate = productRate.get("ProductRate") == null ? "0" : productRate.get("ProductRate");
|
||||
otherProperty.put("YEAR_RATE", yearRate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user