Browse Source

调用苏商还款计划试算接口优化

liuj 2 months ago
parent
commit
63d69517fa

+ 3 - 2
src/main/java/com/sunxung/factoring/service/financing/review/impl/ReviewQuotaDisburseServiceImpl.java

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.snb.fsos.bean.RepayPlanTrial;
 import com.sunxung.factoring.component.enums.FinancingCurrentStageEnum;
+import com.sunxung.factoring.component.enums.SmbCreditStatusEnum;
 import com.sunxung.factoring.component.exception.BusinessException;
 import com.sunxung.factoring.component.exception.ServiceException;
 import com.sunxung.factoring.component.exception.ValidatorException;
@@ -371,13 +372,13 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
             if (supplierInfo != null) {
                 FinancingFromInvestors financingFromInvestors = financingFromInvestorsService.lambdaQuery().eq(FinancingFromInvestors::getSupplierInfoId, supplierInfo.getId())
                         .orderByDesc(FinancingFromInvestors::getId).list().get(0);
-                if (financingFromInvestors != null && financingFromInvestors.getCreditStatus().equals("审批通过")) {
+                if (financingFromInvestors != null && SmbCreditStatusEnum.STATUS_03.getCode().equals(financingFromInvestors.getCreditStatus())) {
                     List<FinancingFromInvestorsHistory> list = financingFromInvestorsHistoryService.lambdaQuery().eq(FinancingFromInvestorsHistory::getFinancingFromInvestorsId, financingFromInvestors.getId())
                             .orderByDesc(FinancingFromInvestorsHistory::getId).list();
                     if (CollectionUtil.isNotEmpty(list)) {
                         FinancingFromInvestorsHistory fromInvestorsHistory = list.get(0);
                         FinancingFromInvestorsNotice notice = financingFromInvestorsNoticeService.lambdaQuery().eq(FinancingFromInvestorsNotice::getFinancingFromInvestorsHistoryId, fromInvestorsHistory.getId()).one();
-                        if (notice != null && notice.getApplyStatus().equals("审批通过")) {
+                        if (notice != null && SmbCreditStatusEnum.STATUS_03.equals(notice.getApplyStatus())) {
                             return notice;
                         }
                     }