IRR和ROA计算去除个人意外险
This commit is contained in:
parent
9a88df3a4f
commit
af38948350
@ -12,7 +12,7 @@
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.MultiSelect = true; //多选
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(30);
|
||||
dwTemp.setPageSize((pageSize==null||"undefined".equals(pageSize))?30:Integer.parseInt(pageSize));
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
%>
|
||||
<%/*~END~*/%>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.MultiSelect = true; //多选
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(30);
|
||||
dwTemp.setPageSize((pageSize==null||"undefined".equals(pageSize))?30:Integer.parseInt(pageSize));
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
%>
|
||||
<%/*~END~*/%>
|
||||
|
||||
@ -105,7 +105,8 @@ public class CashFlowExecutor {
|
||||
GPSDifference = "0";
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 根据客户(张文竹)要求,将个人意外险差额去掉
|
||||
String personalInsuranceDifference = "0" ;//获取产品中的个人意外险差额配置
|
||||
Map<String, String> pidMap = productRevenues == null ? null : productRevenues.get( "personalInsuranceDifference" );
|
||||
if( pidMap != null && pidMap.size() > 0){
|
||||
@ -113,7 +114,7 @@ public class CashFlowExecutor {
|
||||
if( personalInsuranceDifference == null || personalInsuranceDifference.isEmpty() ){
|
||||
personalInsuranceDifference = "0";
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
String sql = "";
|
||||
if("MYSQL".equals(InitDBType.DBTYPE)){
|
||||
@ -147,9 +148,11 @@ public class CashFlowExecutor {
|
||||
sql +=" left join code_library tdd on fundplan.fee_type = tdd.itemno and tdd.codeno='FeeType' " ;
|
||||
sql +=" where fundplan.flowunid = '"+ tcb.getDocId()+"' and fundplan."+tcb.getPlanCName()+"='"+tcb.getPlanCValue()+"' and fundplan.fee_type in ('feetype2','feetype1','feetype10','feetype16','feetype17','feetype33','feetype24') ";
|
||||
//根据客户(张文竹)不管是否灵活产品,配置的GPS差额和个人意外险差额添加到IRR计算
|
||||
/*
|
||||
if( !"0".equals(personalInsuranceDifference) ){
|
||||
sql +=" union all select plan_date,'"+personalInsuranceDifference+"' flowin,'个人意外险差额:"+personalInsuranceDifference+"' flowindetail,'' flowout,'' flowoutdetil,'"+personalInsuranceDifference+"' cleanfow from lc_fund_plan_temp where flowunid = '"+tcb.getDocId()+"' and fee_type='feetype10' ";
|
||||
}
|
||||
*/
|
||||
if( !"0".equals(GPSDifference) ){
|
||||
sql += "union all select plan_date,'"+GPSDifference+"' flowin,'GPS差额:"+GPSDifference+"' flowindetail,'' flowout,'' flowoutdetil,'"+GPSDifference+"' cleanfow from lc_fund_plan_temp where flowunid = '"+tcb.getDocId()+"' and fee_type='feetype10' ";
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ public class ConditionHelper {
|
||||
BigDecimal gpsInstallFee =null;//GPS税率
|
||||
BigDecimal rentRate =null;// 租金税率
|
||||
BigDecimal discountInterestRate =null;// 贴息税率
|
||||
BigDecimal personalInsuranceRate =null;// 个人意外险税率
|
||||
// BigDecimal personalInsuranceRate =null;// 个人意外险税率
|
||||
BigDecimal percentage = new BigDecimal("100");
|
||||
if( pslData!=null && pslData.size()>0){
|
||||
String leasform = pslData.get(0).get("leasform");
|
||||
@ -120,7 +120,7 @@ public class ConditionHelper {
|
||||
gpsInstallFee = BigDecimal.ONE.add( new BigDecimal (rateData.get(0).get("gps_install_fee") ).divide( percentage ) );
|
||||
rentRate = BigDecimal.ONE.add( new BigDecimal ( rateData.get(0).get("rent") ).divide( percentage ) );
|
||||
discountInterestRate = BigDecimal.ONE.add( new BigDecimal ( rateData.get(0).get("discount_interest_rate") ).divide( percentage ) );
|
||||
personalInsuranceRate = BigDecimal.ONE.add( new BigDecimal ( rateData.get(0).get("personal_insurance_rate") ).divide( percentage ) );
|
||||
// personalInsuranceRate = BigDecimal.ONE.add( new BigDecimal ( rateData.get(0).get("personal_insurance_rate") ).divide( percentage ) );
|
||||
|
||||
}else{
|
||||
throw new BusinessException( "未配置对应税率!" );
|
||||
@ -139,21 +139,29 @@ public class ConditionHelper {
|
||||
BigDecimal handlingChargeMoney = new BigDecimal( cb.getHandlingChargeMoney() );
|
||||
// GPS差额
|
||||
// BigDecimal gpsDifference = new BigDecimal( cb.getGPSDifference() );
|
||||
BigDecimal gpsDifference = new BigDecimal( productRevenues.get( "GPSDifference" ).get( "GPSDifference" ) );//取产品收益中的GPS差额配置
|
||||
String personalInsuranceDifference = "0" ;//获取产品中的个人意外险差额配置
|
||||
Map<String, String> pidMap = productRevenues.get( "personalInsuranceDifference" );
|
||||
// BigDecimal gpsDifference = new BigDecimal( productRevenues.get( "GPSDifference" ).get( "GPSDifference" ) );//取产品收益中的GPS差额配置
|
||||
String gpsDifference = "0";
|
||||
Map<String, String> GPSMap = productRevenues.get( "GPSDifference" );
|
||||
if( GPSMap != null && GPSMap.size() > 0){
|
||||
gpsDifference = GPSMap.get("GPSDifference");
|
||||
if( gpsDifference == null || gpsDifference.isEmpty() ){
|
||||
gpsDifference = "0";
|
||||
}
|
||||
}
|
||||
// String personalInsuranceDifference = "0" ;//获取产品中的个人意外险差额配置
|
||||
/*Map<String, String> pidMap = productRevenues.get( "personalInsuranceDifference" );
|
||||
if( pidMap != null && pidMap.size() > 0){
|
||||
personalInsuranceDifference = pidMap.get("personalInsuranceDifference");
|
||||
if( personalInsuranceDifference == null || personalInsuranceDifference.isEmpty() ){
|
||||
personalInsuranceDifference = "0";
|
||||
}
|
||||
}
|
||||
}*/
|
||||
String discountInterest = cb.getDiscountInterest();
|
||||
if(discountInterest == null || discountInterest.isEmpty() ){
|
||||
discountInterest = "0";
|
||||
}
|
||||
// 收入
|
||||
BigDecimal in = allInterest.divide( interestRate , 2, 4 ).add( handlingChargeMoney.divide( handRate, 2, 4 ) ).add( gpsDifference.divide( gpsInstallFee, 2, 4 ) ).add( new BigDecimal( discountInterest ).divide(discountInterestRate , 2 ,4 ) ).add( new BigDecimal( personalInsuranceDifference ).divide( personalInsuranceRate , 2 ,4 ) );
|
||||
BigDecimal in = allInterest.divide( interestRate , 2, 4 ).add( handlingChargeMoney.divide( handRate, 2, 4 ) ).add( new BigDecimal(gpsDifference).divide( gpsInstallFee, 2, 4 ) ).add( new BigDecimal( discountInterest ).divide(discountInterestRate , 2 ,4 ) );
|
||||
// 租赁年限
|
||||
int leaseTerm = cb.getLeaseTerm()/12;
|
||||
// 融资额
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user