调整安鹏保证金抵扣为正常抵扣

This commit is contained in:
zhulh 2021-08-19 11:15:17 +08:00
parent d296871c92
commit dc466405d8

View File

@ -446,12 +446,13 @@ public class FundFundPlanExecutor {
List<String> planDates = planBean.getPlanDateList(); List<String> planDates = planBean.getPlanDateList();
List<String> rentPlans = planBean.getRentList(); List<String> rentPlans = planBean.getRentList();
//安鹏逻辑只抵最后一期租金 //安鹏逻辑只抵最后一期租金
BigDecimal lastRent = new BigDecimal(rentPlans.get(rentPlans.size() - 1)); // 取消安鹏只抵最后一期逻辑 by zhulh 2021/08/19
BigDecimal cautionMoneyDeduction = new BigDecimal(cb.getCautionDeductionMoney()); // BigDecimal lastRent = new BigDecimal(rentPlans.get(rentPlans.size() - 1));
if(lastRent.compareTo(cautionMoneyDeduction) < 0) { // BigDecimal cautionMoneyDeduction = new BigDecimal(cb.getCautionDeductionMoney());
cb.setCautionMoneyRemain(cautionMoneyDeduction.subtract(lastRent).toString()); // if(lastRent.compareTo(cautionMoneyDeduction) < 0) {
cb.setCautionDeductionMoney(lastRent.toString()); // cb.setCautionMoneyRemain(cautionMoneyDeduction.subtract(lastRent).toString());
} // cb.setCautionDeductionMoney(lastRent.toString());
// }
List<FundPlanBean> newFundPlans = new ArrayList<FundPlanBean>(); List<FundPlanBean> newFundPlans = new ArrayList<FundPlanBean>();
if(Double.parseDouble(cb.getCautionMoneyRemain()) > 0){//退还保证金 if(Double.parseDouble(cb.getCautionMoneyRemain()) > 0){//退还保证金
FundPlanBean newFundPlan=new FundPlanBean(); FundPlanBean newFundPlan=new FundPlanBean();
@ -467,16 +468,7 @@ public class FundFundPlanExecutor {
} }
if(Double.parseDouble(cb.getCautionDeductionMoney()) > 0){//抵扣保证金 if(Double.parseDouble(cb.getCautionDeductionMoney()) > 0){//抵扣保证金
BigDecimal planMoney=new BigDecimal(cb.getCautionDeductionMoney()); BigDecimal planMoney=new BigDecimal(cb.getCautionDeductionMoney());
FundPlanBean newFundPlan=new FundPlanBean(); int planList=0;
newFundPlan.setFeeType(reduceType);
newFundPlan.setPlanList("1");
newFundPlan.setSettleMethod("payfund6");
newFundPlan.setPayType("pay_type_out");
newFundPlan.setPlanMoney(planMoney.toString());
newFundPlan.setPlanDate(planDates.get(planDates.size() - 1));
newFundPlan.setPayCust(custID);
newFundPlans.add(newFundPlan);
/*int planList=0;
for(int i = planDates.size()-1 ; i >= 0 ; i--){ for(int i = planDates.size()-1 ; i >= 0 ; i--){
planList++; planList++;
BigDecimal rent=new BigDecimal(rentPlans.get(i)); BigDecimal rent=new BigDecimal(rentPlans.get(i));
@ -511,7 +503,7 @@ public class FundFundPlanExecutor {
cb.setDeductionLastPlanDate(planDates.get(i)); cb.setDeductionLastPlanDate(planDates.get(i));
break; break;
} }
}*/ }
}else{ }else{
cb.setDeductionLastPlanDate(cb.getLastPlanDate()); cb.setDeductionLastPlanDate(cb.getLastPlanDate());
} }