Преглед изворни кода

fix(苏商银行):续授信逻辑修改

liutao пре 1 месец
родитељ
комит
c6516f4ff4

+ 1 - 1
build.gradle

@@ -9,7 +9,7 @@ targetCompatibility = 1.8
 
 jar {
     baseName = 'factoring-trade-prod'
-    version = '1.0.66'
+    version = '1.0.67'
 }
 
 springBoot {

+ 18 - 16
src/main/java/com/sunxung/factoring/service/financing/contract/impl/ContractLegalFinalApprovalServiceImpl.java

@@ -150,23 +150,25 @@ public class ContractLegalFinalApprovalServiceImpl extends ServiceImpl<ContractL
         ReviewQuotaDisburse reviewQuotaDisburse = reviewQuotaDisburseService.getById(reviewFinancingInfo.getReviewQuotaDisburseId());
         CFinancingBasicInfo cFinancingBasicInfo = financingBasicInfoService.getById(reviewQuotaDisburse.getFinancingBasicInfoId());
         SupplierInfo supplierInfo = supplierInfoService.getByEnterpriseId(cFinancingBasicInfo.getMainEnterpriseId());
-        List<FinancingFromInvestors> financingFromInvestorsList = financingFromInvestorsService.lambdaQuery().eq(FinancingFromInvestors::getSupplierInfoId, supplierInfo.getId()).orderByDesc(FinancingFromInvestors::getId).list();
-        if(CollectionUtil.isNotEmpty(financingFromInvestorsList)){
-            FinancingFromInvestors financingFromInvestors = financingFromInvestorsList.get(0);
-            //查询账户信息
-            AccountInfoQuery accountInfoQuery = new AccountInfoQuery();
-            accountInfoQuery.setSceneCode("3");
-            accountInfoQuery.setAcctType("5");
-            List<AccountInfoQueryResp> accountInfoQueryResps = smbApiService.accountInfoQuery(accountInfoQuery, financingFromInvestors.getOpenId());
-            if(CollectionUtil.isEmpty(accountInfoQueryResps)){
-                throw new BusinessException(CodeUtil.FAIL,"为查询到账户信息");
-            }
-            AccountInfoQueryResp accountInfoQueryResp = accountInfoQueryResps.get(0);
+        if(reviewFinancingInfo.getInstitutionName().equals(ConstantUtil.JIANGSU_SUSHANG_BANK)){
+            List<FinancingFromInvestors> financingFromInvestorsList = financingFromInvestorsService.lambdaQuery().eq(FinancingFromInvestors::getSupplierInfoId, supplierInfo.getId()).orderByDesc(FinancingFromInvestors::getId).list();
+            if(CollectionUtil.isNotEmpty(financingFromInvestorsList)){
+                FinancingFromInvestors financingFromInvestors = financingFromInvestorsList.get(0);
+                //查询账户信息
+                AccountInfoQuery accountInfoQuery = new AccountInfoQuery();
+                accountInfoQuery.setSceneCode("3");
+                accountInfoQuery.setAcctType("5");
+                List<AccountInfoQueryResp> accountInfoQueryResps = smbApiService.accountInfoQuery(accountInfoQuery, financingFromInvestors.getOpenId());
+                if(CollectionUtil.isEmpty(accountInfoQueryResps)){
+                    throw new BusinessException(CodeUtil.FAIL,"为查询到账户信息");
+                }
+                AccountInfoQueryResp accountInfoQueryResp = accountInfoQueryResps.get(0);
 
-            financingFromInvestors.setRepaymentAccount(accountInfoQueryResp.getClientAcct());
-            financingFromInvestors.setRepaymentAccountName(accountInfoQueryResp.getAcctName());
-            financingFromInvestors.setRepaymentAccountType("内部户");
-            financingFromInvestorsService.updateById(financingFromInvestors);
+                financingFromInvestors.setRepaymentAccount(accountInfoQueryResp.getClientAcct());
+                financingFromInvestors.setRepaymentAccountName(accountInfoQueryResp.getAcctName());
+                financingFromInvestors.setRepaymentAccountType("内部户");
+                financingFromInvestorsService.updateById(financingFromInvestors);
+            }
         }
 
         if (null == contractLegalFinalApproval) {