ソースを参照

付款审核逻辑优化

liuj 1 ヶ月 前
コミット
c2d0243151
共有1 個のファイルを変更した6 個の追加4 個の削除を含む
  1. 6 4
      src/main/java/com/sunxung/factoring/service/financing/payment/impl/PaymentApplyServiceImpl.java

+ 6 - 4
src/main/java/com/sunxung/factoring/service/financing/payment/impl/PaymentApplyServiceImpl.java

@@ -955,10 +955,12 @@ public class PaymentApplyServiceImpl extends ServiceImpl<PaymentApplyMapper, Pay
         //填充实施产品类型
         autoPlanFactoringProducts(financingBasicInfo, quotaDisburseReport);
         //填充资方到期日
-        DateTime payOutDate = cn.hutool.core.date.DateUtil.parse(loanInfo.getPayoutDate(), "yyyy-MM-dd");
-        DateTime offsetDate = cn.hutool.core.date.DateUtil.offset(payOutDate, DateField.YEAR, 1);
-        String fundExpiryDate = cn.hutool.core.date.DateUtil.format(offsetDate, "yyyy-MM-dd");
-        quotaDisburseReport.setFundingExpiryDate(fundExpiryDate);
+        if (loanInfo != null && loanInfo.getPayoutDate() != null) {
+            DateTime payOutDate = cn.hutool.core.date.DateUtil.parse(loanInfo.getPayoutDate(), "yyyy-MM-dd");
+            DateTime offsetDate = cn.hutool.core.date.DateUtil.offset(payOutDate, DateField.YEAR, 1);
+            String fundExpiryDate = cn.hutool.core.date.DateUtil.format(offsetDate, "yyyy-MM-dd");
+            quotaDisburseReport.setFundingExpiryDate(fundExpiryDate);
+        }
         //填充融资信息
         ReviewFinancingInfo reviewFinancingInfo = reviewFinancingInfoService.getOne(new QueryWrapper<ReviewFinancingInfo>()
                 .eq("review_quota_disburse_id", reviewQuotaDisburse.getId()));