|
|
@ -834,14 +834,17 @@ public class LoanRepurchaseApplyService extends MybatisBaseService<LoanRepurchas |
|
|
|
} |
|
|
|
} |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void pushRiskToFin(String businessSid,String payTypeCode,String accountNumber){ |
|
|
|
public void pushRiskToFin(String businessSid,String payTypeCode,String accountNumber,String cost){ |
|
|
|
LoanRepurchaseApply loanRepurchaseApply = fetchBySid(businessSid); |
|
|
|
LoanRepurchaseCost loanRepurchaseCost = loanRepurchaseCostService.selectByMainSid(businessSid); |
|
|
|
//查询月还明细表,遍历
|
|
|
|
List<LoanRepaymentPlanDetails> list = loanRepaymentPlanDetailsService.selectByBusVinSid2(loanRepurchaseApply.getBusVinSid()); |
|
|
|
list.removeAll(Collections.singleton(null)); |
|
|
|
if(!list.isEmpty()){ |
|
|
|
BigDecimal bankSettlePrice = loanRepurchaseCost.getBankSettlePrice(); |
|
|
|
BigDecimal bankSettlePrice = BigDecimal.ZERO; |
|
|
|
if(StringUtils.isNotBlank(cost)){ |
|
|
|
bankSettlePrice = new BigDecimal(cost); |
|
|
|
} |
|
|
|
if(bankSettlePrice != null && bankSettlePrice.compareTo(BigDecimal.ZERO)>0){ |
|
|
|
for (int jj = 0; jj < list.size(); jj++) { |
|
|
|
LoanRepaymentPlanDetails loanRepaymentPlanDetails = list.get(jj); |
|
|
@ -858,7 +861,6 @@ public class LoanRepurchaseApplyService extends MybatisBaseService<LoanRepurchas |
|
|
|
loanRepaymentPlanDetails.setPaymentMoney(paymentMoney); |
|
|
|
loanRepaymentPlanDetailsService.updateById(loanRepaymentPlanDetails); |
|
|
|
}else{ |
|
|
|
bankSettlePrice = BigDecimal.ZERO; |
|
|
|
BigDecimal paymentMoney = loanRepaymentPlanDetails.getPaymentMoney(); |
|
|
|
if(paymentMoney != null){ |
|
|
|
paymentMoney = paymentMoney.add(bankSettlePrice); |
|
|
|