ソースを参照

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

liuj 1 ヶ月 前
コミット
e512fd12f9
共有2 個のファイルを変更した19 個の追加17 個の削除を含む
  1. 1 1
      build.gradle
  2. 18 16
      src/main/java/com/sunxung/factoring/service/financing/contract/impl/ContractLegalFinalApprovalServiceImpl.java

+ 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) {