From c51894a2ffd6ee4eacfac1ef44cf5450992043f5 Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Thu, 2 Sep 2021 10:22:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=BC=E5=90=88=E5=88=A9?= =?UTF-8?q?=E7=8E=87=E8=AE=A1=E7=AE=97=E5=92=8C=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Accounting/LoanSimulation/LoanBasicInfo.jsp | 2 ++ .../tenwa/reckon/executor/CashFlowExecutor.java | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp index 2625c1299..09253a440 100644 --- a/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation/LoanBasicInfo.jsp @@ -900,8 +900,10 @@ function changeSettleMethod2(){ } document.all( 'A_Group_0020' ).style.display = 'none'; showItem(0,"SUBSECTION_CONDIG",'none'); + showItem(0,"COMPREHENSIVE_RATE",'none'); if ( settleMethod === 'segmented_financing' ) { showItem(0,"SUBSECTION_CONDIG",'block'); + showItem(0,"COMPREHENSIVE_RATE",'block'); document.all( 'A_Group_0020' ).style.display = 'block'; var param = 'CompClientID=<%=compClientID%>&flowunid=<%=flowunid%>&plannumber=<%=plannumber%>&planCName=<%=planCName%>&IsHistory=<%=ishistory%>&NodeNo=<%=nodeNo%>&calType=<%=calType%>'; AsControl.OpenView( '/Accounting/LoanSimulation/LCCalcSubsectionInfoTempList.jsp', param, 'subsection_list' ); diff --git a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java index de8795fc7..628782c26 100644 --- a/calc/com/tenwa/reckon/executor/CashFlowExecutor.java +++ b/calc/com/tenwa/reckon/executor/CashFlowExecutor.java @@ -57,10 +57,19 @@ public class CashFlowExecutor { dateList.add(cash.get("PLAN_DATE")); } if ("subsectionRate".equals(calcType) ){ - String cleanLeaseMoney = cb.getCleanLeaseMoney(); - netList.set(0,"-"+cleanLeaseMoney); + String subsectionSql = "select IS_BALANCE_LENDING,DISCOUNT,DISCOUNT_COLLECTION_PERIOD from lc_calc_subsection_info_temp where FLOWUNID='"+tcb.getDocId()+"'"; + List> subsectionData =DataOperatorUtil.getDataBySql(tx, subsectionSql, null); + BigDecimal tempMoney = BigDecimal.ZERO; + int coss = 0; + for (Map subsection :subsectionData) { + String ibl = subsection.get("IS_BALANCE_LENDING"); + if(!"Y".equals(ibl)){ + coss = Integer.parseInt( subsection.get("DISCOUNT_COLLECTION_PERIOD") ); + } + tempMoney = new BigDecimal( netList.get(coss) ); + netList.set(coss, ( tempMoney.subtract( new BigDecimal( subsection.get("DISCOUNT") ) ) ).toString() ); + } } - String irr=""; if("STAGE_IRR".equals(cb.getIrrType())){//°´ÆÚIRR BigDecimal issueRate=IRRCalculateUtil.getIRR2(netList);