From af38948350aedf73176f09d99ab5db1d19e1232a Mon Sep 17 00:00:00 2001 From: 32189 <32189@windows10.microdone.cn> Date: Tue, 25 May 2021 16:58:34 +0800 Subject: [PATCH] =?UTF-8?q?IRR=E5=92=8CROA=E8=AE=A1=E7=AE=97=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E4=B8=AA=E4=BA=BA=E6=84=8F=E5=A4=96=E9=99=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Introductionofrepairvehiclemodelslist.jsp | 2 +- .../Passengercarlist.jsp | 2 +- .../reckon/executor/CashFlowExecutor.java | 7 ++++-- .../tenwa/reckon/help/ConditionHelper.java | 22 +++++++++++++------ 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/Introductionofrepairvehiclemodelslist.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/Introductionofrepairvehiclemodelslist.jsp index 55b742f79..8a80b169b 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/Introductionofrepairvehiclemodelslist.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/Introductionofrepairvehiclemodelslist.jsp @@ -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~*/%> diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/Passengercarlist.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/Passengercarlist.jsp index 05af70d3f..06c79ef42 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/Passengercarlist.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/Passengercarlist.jsp @@ -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~*/%> diff --git a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java index afa7aa61d..ae3b1dc7a 100644 --- a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java +++ b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java @@ -105,7 +105,8 @@ public class CashFlowExecutor { GPSDifference = "0"; } } - + /* + * 根据客户(张文竹)要求,将个人意外险差额去掉 String personalInsuranceDifference = "0" ;//获取产品中的个人意外险差额配置 Map 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' "; } diff --git a/calc/com/tenwa/reckon/help/ConditionHelper.java b/calc/com/tenwa/reckon/help/ConditionHelper.java index c03c9c91c..0b1717844 100644 --- a/calc/com/tenwa/reckon/help/ConditionHelper.java +++ b/calc/com/tenwa/reckon/help/ConditionHelper.java @@ -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 pidMap = productRevenues.get( "personalInsuranceDifference" ); +// BigDecimal gpsDifference = new BigDecimal( productRevenues.get( "GPSDifference" ).get( "GPSDifference" ) );//取产品收益中的GPS差额配置 + String gpsDifference = "0"; + Map 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 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; // 融资额