Parcourir la source

付款审核逻辑优化

liuj il y a 1 mois
Parent
commit
c2d0243151

+ 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()));