diff --git a/WebContent/WEB-INF/lib/commons-logging.jar b/WebContent/WEB-INF/lib/commons-logging.jar index 51036199f..c4cef08d6 100644 Binary files a/WebContent/WEB-INF/lib/commons-logging.jar and b/WebContent/WEB-INF/lib/commons-logging.jar differ diff --git a/WebContent/WEB-INF/lib/wsdl4j.jar b/WebContent/WEB-INF/lib/wsdl4j.jar index 67a35fcba..3e73b6332 100644 Binary files a/WebContent/WEB-INF/lib/wsdl4j.jar and b/WebContent/WEB-INF/lib/wsdl4j.jar differ diff --git a/calc/com/tenwa/reckon/help/RentPlanServiceImpl.java b/calc/com/tenwa/reckon/help/RentPlanServiceImpl.java index f7b7b8ab2..cd3d72dfd 100644 --- a/calc/com/tenwa/reckon/help/RentPlanServiceImpl.java +++ b/calc/com/tenwa/reckon/help/RentPlanServiceImpl.java @@ -62,13 +62,13 @@ public class RentPlanServiceImpl { // 得到最后期的本金值 // 用利息倒减本金 - String lastCorpus = NumTools.formatNumberDoubleScale(new BigDecimal(rent_list.get(rent_list.size() - 1).toString()).add(cb.getRetainage()).subtract(new BigDecimal(interest_list.get(interest_list.size()-1))).toString(), RentTools.getInterestAccuracy()); + String lastCorpus = NumTools.formatNumberDoubleScale(new BigDecimal(rent_list.get(rent_list.size() - 1).toString()).subtract(new BigDecimal(interest_list.get(interest_list.size()-1))).toString(), RentTools.getInterestAccuracy()); // 重新设置list值 corpus_list.set(corpus_list.size() - 1, lastCorpus); //interest_list.set(interest_list.size() - 1, lastInter); - rent_list.set(rent_list.size()-1, new BigDecimal(rent_list.get(rent_list.size()-1)).add(cb.getRetainage()).toString()); + rent_list.set(rent_list.size()-1, new BigDecimal(rent_list.get(rent_list.size()-1)).toString()); fpb.setCorpusBusinessList(corpus_list); fpb.setInterestBusinessList(interest_list); @@ -112,7 +112,13 @@ public class RentPlanServiceImpl { // 得到最后期的本金值 String beforCorpus = getBefLastCorpus(corpus_list); String lastCorpus = NumTools.formatNumberDoubleScale(new BigDecimal(totalCorpus).subtract(new BigDecimal(pmtEndValue)).subtract(new BigDecimal(beforCorpus)).toString(), RentTools.getCorpusAccuracy()); - + + //本金比最后一期租金大的情况,租金调整为本金值 + if(new BigDecimal(lastCorpus).compareTo(new BigDecimal(rent_list.get(rent_list.size() -1))) > 0 + || new BigDecimal(interest_list.get(interest_list.size() -1)).compareTo(BigDecimal.ZERO) == 0) { + rent_list.set(rent_list.size() -1, new BigDecimal(lastCorpus).add(new BigDecimal(interest_list.get(interest_list.size() -1))).toString()); + } + String lastInter = NumTools.formatNumberDoubleScale(new BigDecimal(rent_list.get(rent_list.size() - 1).toString()).subtract(new BigDecimal(lastCorpus)).toString(), RentTools.getInterestAccuracy()); // 重新设置list值