Переглянути джерело

Merge remote-tracking branch 'origin/smb' into smb

liutao 1 місяць тому
батько
коміт
07edc6a6fb

+ 6 - 4
src/main/java/com/sunxung/factoring/service/financing/review/impl/ReviewQuotaDisburseServiceImpl.java

@@ -1616,9 +1616,6 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
     private void addFinancingInfo(ReviewQuotaDisburse reviewQuotaDisburse, CFinancingBasicInfo financingBasicInfo) {
         if (null != reviewQuotaDisburse && null != reviewQuotaDisburse.getReviewFinancingInfo()) {
             ReviewFinancingInfo financingInfo = reviewQuotaDisburse.getReviewFinancingInfo();
-            BigDecimal zero = BigDecimal.ZERO;
-            // 最大比例
-            BigDecimal maxRatio = new BigDecimal("1");
             //融资利率
             if (financingInfo.getFinancingRate() != null) {
                 financingInfo.setFinancingRate(financingInfo.getFinancingRate().divide(new BigDecimal("100"), 4, RoundingMode.HALF_UP));
@@ -1634,7 +1631,12 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
                 financingInfo.setFinancingRatio(financingRatio);
             }
             // 设置融资金额=收支计划中放款类型的本金加和
-            BigDecimal financingAmount = calculateFinancingAmount(reviewQuotaDisburse);
+            BigDecimal financingAmount;
+            if (reviewQuotaDisburse.isVisible()) {
+                financingAmount = calculateFinancingAmount(reviewQuotaDisburse);
+            } else {
+                financingAmount = financingInfo.getFinancingAmount();
+            }
             financingInfo.setFinancingAmount(financingAmount);
             // 融资比例=融资金额/选择的应收账款净额加和
             BigDecimal netAmountTotal = reviewQuotaDisburse.getAccountsReceivableNetAmountTotal();