提交 734de2d8 authored 作者: huyufan's avatar huyufan

借款

上级 d0de1b2b
...@@ -125,6 +125,7 @@ public enum PerformanceResultEnum implements ResultEnum { ...@@ -125,6 +125,7 @@ public enum PerformanceResultEnum implements ResultEnum {
NB_BANK_ORDER_PAY_ERROR(1803, "宁波银行订单支付失败"), NB_BANK_ORDER_PAY_ERROR(1803, "宁波银行订单支付失败"),
GET_LOAN_RECORD(1901, "货主借款失败"), GET_LOAN_RECORD(1901, "货主借款失败"),
OWNER_ACCOUNT_ERROR(1902, "货主货款不足"),
OWNER_LOAN_RECORD_PAY_STATUS_ERROR(1850, "状态已变更无法支付"), OWNER_LOAN_RECORD_PAY_STATUS_ERROR(1850, "状态已变更无法支付"),
......
...@@ -146,7 +146,7 @@ public class OrderChildLoanComponent { ...@@ -146,7 +146,7 @@ public class OrderChildLoanComponent {
} }
log.info("8.预付运费不够,开始进行借款判断"); log.info("8.预付运费不够,开始进行借款判断");
// 进行借款判断 // 进行借款判断
OwnerLoanAccount ownerLoanAccount = ownerLoanAccountDao.getOneByField(OwnerLoanAccount::getOwnerUserNo, ownerInfoFeignVO.getUserNo()).get(); OwnerLoanAccount ownerLoanAccount = ownerLoanAccountDao.getOneByField(OwnerLoanAccount::getOwnerUserNo, ownerInfoFeignVO.getUserNo()).orElseThrow(PerformanceResultEnum.OWNER_ACCOUNT_ERROR);
BigDecimal ownerLoanAccountSum = ownerLoanAccount.getVirtuallyUsableBalance().add(ownerLoanAccount.getFundingUsableBalance()); BigDecimal ownerLoanAccountSum = ownerLoanAccount.getVirtuallyUsableBalance().add(ownerLoanAccount.getFundingUsableBalance());
if (ownerLoanAccountSum.compareTo(orderChildPrice) < 0) { if (ownerLoanAccountSum.compareTo(orderChildPrice) < 0) {
......
...@@ -53,7 +53,7 @@ public class OwnerLoanListener { ...@@ -53,7 +53,7 @@ public class OwnerLoanListener {
//未借款 //未借款
settlementDriverDetail.setLoanFlag(OwnerLoanRecordEnum.LoanFlag.NO_LOAN.getCode()); settlementDriverDetail.setLoanFlag(OwnerLoanRecordEnum.LoanFlag.NO_LOAN.getCode());
applicationEventPublisher.publishEvent(new SettlementUpdateEvent(this, settlementDriverDetail, settlementOwnerDetail)); applicationEventPublisher.publishEvent(new SettlementUpdateEvent(this, settlementDriverDetail, settlementOwnerDetail));
throw e; return;
} }
settlementOwnerDetailDao.updateInvoiceType(settlementOwnerDetail); settlementOwnerDetailDao.updateInvoiceType(settlementOwnerDetail);
settlementDriverDetailDao.updateInvoiceTypeAndPrepayFreightFlag(settlementDriverDetail); settlementDriverDetailDao.updateInvoiceTypeAndPrepayFreightFlag(settlementDriverDetail);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论