From 3407183f353c87543582b7b04350b5396fe256cd Mon Sep 17 00:00:00 2001
From: tangfutang <3218982385@qq.com>
Date: Tue, 31 Aug 2021 10:45:52 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E6=AE=B5=E8=9E=8D?=
=?UTF-8?q?=E7=BB=BC=E5=90=88=E5=88=A9=E7=8E=87=E8=AE=A1=E7=AE=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../LCCalcSubsectionInfoTempList.jsp | 6 ++---
WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 3 +++
calc/com/tenwa/reckon/bean/ConditionBean.java | 15 ++++++++++--
.../reckon/executor/CashFlowExecutor.java | 24 +++++++++++++++----
.../tenwa/reckon/help/ConditionHelper.java | 4 +++-
.../jbo/app/tenwa/calc/LC_CALC_CONDITION.java | 5 ++++
.../app/tenwa/calc/LC_CALC_CONDITION_HIS.java | 4 ++++
.../tenwa/calc/LC_CALC_CONDITION_TEMP.java | 4 ++++
8 files changed, 54 insertions(+), 11 deletions(-)
diff --git a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp
index 75c90b18f..f41241c95 100644
--- a/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp
+++ b/WebContent/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp
@@ -85,10 +85,10 @@
}
var maxLeaseMoney = getItemValue( 0, getRow(), 'MAX_LEASE_MONEY' ) ;
var minLeaseMoney = getItemValue( 0, getRow(), 'MIN_LEASE_MONEY' );
- if( Number(clm) > Number(maxLeaseMoney) || Number(clm) < Number(minLeaseMoney)){
- alert("该段的融资金额不在产品配置的区间内,请检查!");
+ if( Number(fcleanLeaseMoney) > Number(maxLeaseMoney) || Number(fcleanLeaseMoney) < Number(minLeaseMoney)){
setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', '');
setItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO', '');
+ alert("该段的融资金额不在产品配置的区间内,请检查!");
return
}
setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', fcleanLeaseMoney);
@@ -105,9 +105,9 @@
var maxLeaseMoney = getItemValue( 0, getRow(), 'MAX_LEASE_MONEY' );
var minLeaseMoney = getItemValue( 0, getRow(), 'MIN_LEASE_MONEY' );
if( Number(clm) > Number(maxLeaseMoney) || Number(clm) < Number(minLeaseMoney)){
- alert("该段的融资金额不在产品配置的区间内,请检查!");
setItemValue( 0, getRow(), 'CLEAN_LEASE_MONEY', '');
setItemValue( 0, getRow(), 'CLEAN_LEASE_RATIO', '');
+ alert("该段的融资金额不在产品配置的区间内,请检查!");
return
}
if ( subsectionConfig ) {
diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml
index a9b388627..d93d5b429 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml
@@ -1426,6 +1426,7 @@
+
@@ -2788,6 +2789,7 @@
+
@@ -3374,6 +3376,7 @@
+
diff --git a/calc/com/tenwa/reckon/bean/ConditionBean.java b/calc/com/tenwa/reckon/bean/ConditionBean.java
index 183f6f2e0..d3b290e03 100644
--- a/calc/com/tenwa/reckon/bean/ConditionBean.java
+++ b/calc/com/tenwa/reckon/bean/ConditionBean.java
@@ -177,6 +177,9 @@ public class ConditionBean implements Cloneable{
private String discountInterest; // 贴息(不参与融资)
private String personalInsurance; // 个人意外险
/*****************************/
+ /* ******* 分段融 ****************/
+ private String comprehensiveRate; // 综合利率
+ /*****************************/
/***********************************************************************************
* 暂时未使用字段(历史版本字段)
@@ -1453,6 +1456,7 @@ public class ConditionBean implements Cloneable{
param = (param.isEmpty() ? "0" : param);
return param;
}
+
/*
* 期初为租金计划的最后一期在加一期,期末为租金计划最后一期
*/
@@ -1832,6 +1836,13 @@ public class ConditionBean implements Cloneable{
public void setPersonalInsurance(String personalInsurance) {
this.personalInsurance = personalInsurance;
}
-
-
+
+
+ public void setComprehensiveRate(String comprehensiveRate) {
+ this.comprehensiveRate = comprehensiveRate;
+ }
+
+ public String getComprehensiveRate() {
+ return defaultZero(comprehensiveRate);
+ }
}
diff --git a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java
index 7843cbd13..de8795fc7 100644
--- a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java
+++ b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java
@@ -15,6 +15,7 @@ import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
+import com.gnete.bc.util.Strings;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.reckon.bean.ConditionBean;
import com.tenwa.reckon.bean.TabCalBean;
@@ -34,19 +35,32 @@ public class CashFlowExecutor {
public String run(ConditionBean cb , TabCalBean tcb) throws Exception{
this.delete(tcb, cb);
this.add(cb, tcb);
- String irr = this.getIrr(cb,tcb);
+ String irr = "";
+ if( "segmented_financing".equals( cb.getSettleMethod() ) ){
+ irr = this.getIrr(cb,tcb,"subsectionIRR");
+ String subsectionRate = this.getIrr(cb, tcb, "subsectionRate");
+ cb.setComprehensiveRate( subsectionRate );
+ }else{
+ irr = this.getIrr(cb,tcb,"normal");
+ }
cb.setIrr(irr);
return irr;
}
- private String getIrr(ConditionBean cb ,TabCalBean tcb) throws Exception{
+ //calcType 计算类型 normal正常合同计算IRR;subsectionIRR:分段融计算IRR,subsectionRate:分段融计算综合利率
+ private String getIrr(ConditionBean cb , TabCalBean tcb, String calcType) throws Exception{
String cashSql = "select NET_FLOW,PLAN_DATE from "+Tools.getTable(tcb.getContractCashTb())+" where flowunid ='"+tcb.getDocId()+"' and "+tcb.getPlanCName()+"='"+tcb.getPlanCValue()+"' order by plan_date";
List