|
@@ -3,6 +3,7 @@ package com.sunxung.factoring.service.financing.review.impl;
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -24,6 +25,7 @@ import com.sunxung.factoring.entity.financing.apply.CAcceptanceGoodsInfo;
|
|
|
import com.sunxung.factoring.entity.financing.apply.CFinancingBasicInfo;
|
|
|
import com.sunxung.factoring.entity.financing.apply.CFinancingGoodsInfo;
|
|
|
import com.sunxung.factoring.entity.financing.review.*;
|
|
|
+import com.sunxung.factoring.entity.financing.sop.EnterpriseVerifyCreditSearch;
|
|
|
import com.sunxung.factoring.entity.project.ProjectInformation;
|
|
|
import com.sunxung.factoring.entity.smb.FinancingFromInvestors;
|
|
|
import com.sunxung.factoring.entity.smb.FinancingFromInvestorsHistory;
|
|
@@ -58,6 +60,8 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
@@ -194,6 +198,8 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
|
private SMBApiService smbApiService;
|
|
|
@Autowired
|
|
|
private FileService fileService;
|
|
|
+ @Value("${config.verifyCreditEntBusiness.url}")
|
|
|
+ private String verifyCreditEntBusinessUrl;
|
|
|
|
|
|
@Override
|
|
|
public List<ReviewIncomeExpenditurePlan> generateIncomeExpenditurePlan(ReviewFinancingInfo reviewFinancingInfo) {
|
|
@@ -331,6 +337,18 @@ public class ReviewQuotaDisburseServiceImpl extends ServiceImpl<ReviewQuotaDisbu
|
|
|
checkFinancingAmount(quotaDisburse);
|
|
|
//添加三方企业工商信息
|
|
|
addBusinessInfo(quotaDisburse);
|
|
|
+ //调用sop校验征信上报信息
|
|
|
+ Enterprise enterprise = enterpriseService.getById(financingBasicInfo.getMainEnterpriseId());
|
|
|
+ if (enterprise != null) {
|
|
|
+ EnterpriseVerifyCreditSearch verifyCreditSearch = new EnterpriseVerifyCreditSearch();
|
|
|
+ verifyCreditSearch.setEnterpriseIdentity(enterprise.getSocialCreditCode());
|
|
|
+ verifyCreditSearch.setCustomerId(ConstantUtil.QUOTA_DISBURSE_REPORT_CUSTOMER_ID);
|
|
|
+ ResponseEntity<String> responseEntity = restTemplate.postForEntity(verifyCreditEntBusinessUrl, verifyCreditSearch, String.class);
|
|
|
+ ResponseJson responseJson = JSONUtil.toBean(responseEntity.getBody(), ResponseJson.class);
|
|
|
+ if (responseEntity.getStatusCode().value() != HttpStatus.OK.value() || !responseJson.isSuccess()) {
|
|
|
+ throw new BusinessException(CodeUtil.FAIL, "二代征信信息完整性校验失败:" + responseJson.getMsg());
|
|
|
+ }
|
|
|
+ }
|
|
|
Map<String, Object> procVariables = new HashMap<>();
|
|
|
Long assigneeId = assigneeService.getIdByBusiness(quotaDisburse.getFinancingBasicInfoId(), ConstantUtil.FINANCING_APPLY,
|
|
|
ConstantUtil.ASSIGNEE_RISK_MANAGER);
|