|
|
@ -46,6 +46,8 @@ import com.yxt.anrui.riskcenter.api.loanoutboundapply.app.AppOutboundDetailsVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.app.AppOutboundVinListVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.flow.*; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanoutboundveh.LoanOutboundVeh; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanrepurchaseapply.LoanRepurchaseApply; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanrepurchasecost.LoanRepurchaseCost; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanrestorereportapply.AlrepaidAndArrVo; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApply; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansecondarysalesapply.LoanSecondarySalesApply; |
|
|
@ -61,6 +63,8 @@ import com.yxt.anrui.riskcenter.biz.loanoutboundveh.LoanOutboundVehService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanredemptionapply.LoanRedemptionApplyService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanrepaymenthistory.LoanRepaymentHistoryService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanrepurchaseapply.LoanRepurchaseApplyService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanrepurchasecost.LoanRepurchaseCostService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loanrestorereportapply.LoanRestoreReportApplyService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loansecondarysalesapply.LoanSecondarySalesApplyService; |
|
|
|
import com.yxt.anrui.riskcenter.biz.loansecondarysalescost.LoanSecondarySalesCostService; |
|
|
@ -142,6 +146,10 @@ public class LoanOutboundApplyService extends MybatisBaseService<LoanOutboundApp |
|
|
|
private LoanSecondarySalesApplyService loanSecondarySalesApplyService; |
|
|
|
@Autowired |
|
|
|
private LoanSecondarySalesCostService loanSecondarySalesCostService; |
|
|
|
@Autowired |
|
|
|
private LoanRepurchaseApplyService loanRepurchaseApplyService; |
|
|
|
@Autowired |
|
|
|
private LoanRepurchaseCostService loanRepurchaseCostService; |
|
|
|
|
|
|
|
public PagerVo<LoanOutboundApplyVo> listPage(PagerQuery<LoanOutboundApplyQuery> pq) { |
|
|
|
IPage<LoanOutboundApply> page = PagerUtil.queryToPage(pq); |
|
|
@ -945,6 +953,30 @@ public class LoanOutboundApplyService extends MybatisBaseService<LoanOutboundApp |
|
|
|
BigDecimal zjzyfMoney = BigDecimal.ZERO; |
|
|
|
String lq = loanRepaymentPlanDetailsService.getYqLq(busVinSid); |
|
|
|
lqMoney = lqMoney.add(new BigDecimal(StringUtils.isBlank(lq) ? "0" : lq)); |
|
|
|
if("1".equals(busSalesOrderVehicle.getRepoState().toString())){//已回购
|
|
|
|
//查询回购的资方费用
|
|
|
|
LoanRepurchaseApply loanRepurchaseApply = loanRepurchaseApplyService.selectByBusVinSid(busSalesOrderVehicle.getSid()); |
|
|
|
if(loanRepurchaseApply != null){ |
|
|
|
LoanRepurchaseCost loanRepurchaseCost = loanRepurchaseCostService.selectByMainSid(loanRepurchaseApply.getSid()); |
|
|
|
if(loanRepurchaseCost != null){ |
|
|
|
//合同违约金
|
|
|
|
BigDecimal bankContractLiquidated = loanRepurchaseCost.getBankContractLiquidated(); |
|
|
|
if(bankContractLiquidated != null){ |
|
|
|
lqMoney = lqMoney.add(bankContractLiquidated); |
|
|
|
} |
|
|
|
//资方名义价
|
|
|
|
BigDecimal bankNominalPrice = loanRepurchaseCost.getBankNominalPrice(); |
|
|
|
if(bankNominalPrice != null){ |
|
|
|
lqMoney = lqMoney.add(bankNominalPrice); |
|
|
|
} |
|
|
|
//资方其他费用
|
|
|
|
BigDecimal bankOtherReceivable = loanRepurchaseCost.getBankOtherReceivable(); |
|
|
|
if(bankOtherReceivable != null){ |
|
|
|
lqMoney = lqMoney.add(bankOtherReceivable); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//未到期欠款
|
|
|
|
String wdq = loanRepaymentPlanDetailsService.getWdq(busVinSid); |
|
|
|
wdqMoney = wdqMoney.add(new BigDecimal(StringUtils.isBlank(wdq) ? "0" : wdq)); |
|
|
@ -1130,6 +1162,30 @@ public class LoanOutboundApplyService extends MybatisBaseService<LoanOutboundApp |
|
|
|
|
|
|
|
String lq = loanRepaymentPlanDetailsService.getYqLq(busVinSid); |
|
|
|
lqMoney = lqMoney.add(new BigDecimal(StringUtils.isBlank(lq) ? "0" : lq)); |
|
|
|
if("1".equals(busSalesOrderVehicle.getRepoState().toString())){//已回购
|
|
|
|
//查询回购的资方费用
|
|
|
|
LoanRepurchaseApply loanRepurchaseApply = loanRepurchaseApplyService.selectByBusVinSid(busSalesOrderVehicle.getSid()); |
|
|
|
if(loanRepurchaseApply != null){ |
|
|
|
LoanRepurchaseCost loanRepurchaseCost = loanRepurchaseCostService.selectByMainSid(loanRepurchaseApply.getSid()); |
|
|
|
if(loanRepurchaseCost != null){ |
|
|
|
//合同违约金
|
|
|
|
BigDecimal bankContractLiquidated = loanRepurchaseCost.getBankContractLiquidated(); |
|
|
|
if(bankContractLiquidated != null){ |
|
|
|
lqMoney = lqMoney.add(bankContractLiquidated); |
|
|
|
} |
|
|
|
//资方名义价
|
|
|
|
BigDecimal bankNominalPrice = loanRepurchaseCost.getBankNominalPrice(); |
|
|
|
if(bankNominalPrice != null){ |
|
|
|
lqMoney = lqMoney.add(bankNominalPrice); |
|
|
|
} |
|
|
|
//资方其他费用
|
|
|
|
BigDecimal bankOtherReceivable = loanRepurchaseCost.getBankOtherReceivable(); |
|
|
|
if(bankOtherReceivable != null){ |
|
|
|
lqMoney = lqMoney.add(bankOtherReceivable); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//未到期欠款
|
|
|
|
String wdq = alrepaidAndArrVo.getUnexpiredMoney(); |
|
|
|
wdqMoney = wdqMoney.add(new BigDecimal(StringUtils.isBlank(wdq) ? "0" : wdq)); |
|
|
|