|
|
|
@ -2,24 +2,29 @@ package com.huoran.nakadai.controller; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.google.gson.Gson; |
|
|
|
|
import com.huoran.common.entity.EnterpriseCertification; |
|
|
|
|
import com.huoran.common.entity.UserAccount; |
|
|
|
|
import com.huoran.common.entity.UserAuthenticationInformation; |
|
|
|
|
import com.huoran.common.response.R; |
|
|
|
|
import com.huoran.common.utils.TokenUtils; |
|
|
|
|
import com.huoran.nakadai.config.AliRealNameAuthenticationConfig; |
|
|
|
|
import com.huoran.common.entity.EnterpriseCertification; |
|
|
|
|
import com.huoran.nakadai.entity.PlatformTeam; |
|
|
|
|
import com.huoran.nakadai.entity.PlatformTeamAccount; |
|
|
|
|
import com.huoran.nakadai.entity.PlatformTeamClassification; |
|
|
|
|
import com.huoran.nakadai.entity.UserInfo; |
|
|
|
|
import com.huoran.common.entity.UserAuthenticationInformation; |
|
|
|
|
import com.huoran.nakadai.entity.res.BusinessLicenseOCRResp; |
|
|
|
|
import com.huoran.nakadai.entity.res.CreditCodeResp; |
|
|
|
|
import com.huoran.nakadai.entity.res.IdCardOCRResp; |
|
|
|
|
import com.huoran.nakadai.entity.res.RealNameAuthenticationResp; |
|
|
|
|
import com.huoran.nakadai.service.EnterpriseCertificationService; |
|
|
|
|
import com.huoran.nakadai.service.UserAuthenticationInformationService; |
|
|
|
|
import com.huoran.nakadai.mapper.PlatformTeamClassificationMapper; |
|
|
|
|
import com.huoran.nakadai.mapper.PlatformTeamMapper; |
|
|
|
|
import com.huoran.nakadai.service.*; |
|
|
|
|
import com.huoran.nakadai.utils.ali.FaceRecognitionAidUtil; |
|
|
|
|
import com.huoran.nakadai.utils.ali.HttpUtils; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.apache.http.HttpResponse; |
|
|
|
|
import org.apache.http.util.EntityUtils; |
|
|
|
|
import org.jetbrains.annotations.NotNull; |
|
|
|
@ -48,6 +53,16 @@ public class AliRealNameAuthenticationController { |
|
|
|
|
@Autowired |
|
|
|
|
public EnterpriseCertificationService enterpriseCertificationService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private PlatformTeamClassificationService platformTeamClassificationService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
public PlatformTeamAccountService platformTeamAccountService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private PlatformTeamService platformTeamService; |
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "删除平台全部认证信息") |
|
|
|
|
@PostMapping("/deletePlatformAuthenticationInformation") |
|
|
|
|
public R deletePlatformAuthenticationInformation(@ApiParam(name = "openIds", value = "微信openId", required = true) @RequestBody List<String> openIds) { |
|
|
|
@ -114,23 +129,12 @@ public class AliRealNameAuthenticationController { |
|
|
|
|
userAuthenticationInformation.setCity(info.getCity()); |
|
|
|
|
userAuthenticationInformation.setCounty(info.getCounty()); |
|
|
|
|
|
|
|
|
|
/*QueryWrapper<HrUserAccount> accountQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
accountQueryWrapper.eq("app_open_id", userAuthenticationInformation.getOpenId()); |
|
|
|
|
accountQueryWrapper.eq("platform_id", 7);*/ |
|
|
|
|
|
|
|
|
|
UserAccount userAccount = enterpriseCertificationService.queryAccountInformation(userAuthenticationInformation.getOpenId(), 7); |
|
|
|
|
|
|
|
|
|
userAccount.setAccount(userAuthenticationInformation.getRealName()); |
|
|
|
|
/*userAccountService.updateById(userAccount);*/ |
|
|
|
|
enterpriseCertificationService.updateAccountInfo(userAccount); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* UpdateWrapper<HrUserInfo> userInfoUpdateWrapper = new UpdateWrapper<>(); |
|
|
|
|
userInfoUpdateWrapper.set("user_name", userAuthenticationInformation.getRealName()); |
|
|
|
|
userInfoUpdateWrapper.eq("user_id", userAccount.getUserId()); |
|
|
|
|
|
|
|
|
|
userInfoService.update(new HrUserInfo(), userInfoUpdateWrapper);*/ |
|
|
|
|
|
|
|
|
|
UserInfo userInfo = new UserInfo(); |
|
|
|
|
userInfo.setUserName(userAuthenticationInformation.getRealName()); |
|
|
|
|
userInfo.setUserId(userAccount.getUserId()); |
|
|
|
@ -179,7 +183,6 @@ public class AliRealNameAuthenticationController { |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
// ("营业执照图片验证失败,请重新再试!");
|
|
|
|
|
return R.error("营业执照图片验证失败,请重新再试!"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -211,161 +214,186 @@ public class AliRealNameAuthenticationController { |
|
|
|
|
EnterpriseCertification certification = enterpriseCertificationService.getOne(queryWrapper); |
|
|
|
|
if (certification == null) { |
|
|
|
|
//通过后台删除组织信息的
|
|
|
|
|
return R.error("您已没有组织信息,请联系管理人员!"); |
|
|
|
|
} |
|
|
|
|
enterpriseCertification.setId(certification.getId()); |
|
|
|
|
try { |
|
|
|
|
HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); |
|
|
|
|
CreditCodeResp info = new Gson().fromJson(EntityUtils.toString(response.getEntity()), CreditCodeResp.class); |
|
|
|
|
if (info.getStatus()) { |
|
|
|
|
if (!ObjectUtils.isEmpty(enterpriseCertificationService.checkWhetherItExists(enterpriseCertification.getCompanyName(), certification.getId(), enterpriseCertification.getOpenId()))) { |
|
|
|
|
errorMsg = "企业名称已存在"; |
|
|
|
|
// (errorMsg);
|
|
|
|
|
/*return R.error("您已没有组织信息,请联系管理人员!");*/ |
|
|
|
|
//重新新增认证信息,且更改认证状态
|
|
|
|
|
enterpriseCertification.setAccountId(Integer.valueOf(accountId)); |
|
|
|
|
if (!ObjectUtils.isEmpty(enterpriseCertificationService.checkWhetherItExists(enterpriseCertification.getCompanyName(), null, null))) { |
|
|
|
|
return R.error("当前企业名称已存在!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return R.error(errorMsg); |
|
|
|
|
enterpriseCertification.setAuditStatus(1); |
|
|
|
|
enterpriseCertification.setAuthenticationStatus(1); |
|
|
|
|
enterpriseCertificationService.save(enterpriseCertification); |
|
|
|
|
|
|
|
|
|
//新增团队信息
|
|
|
|
|
PlatformTeamAccount platformTeamAccount1 = platformTeamAccountService.getOne(new QueryWrapper<PlatformTeamAccount>(). |
|
|
|
|
eq("account_id", accountId). |
|
|
|
|
eq("platform_id", enterpriseCertification.getPlatformSource())); |
|
|
|
|
String teamName = ""; |
|
|
|
|
Integer classificationId = null; |
|
|
|
|
if (platformTeamAccount1 == null) { |
|
|
|
|
// 添加供应商/幼儿园信息
|
|
|
|
|
PlatformTeamAccount platformTeamAccount = new PlatformTeamAccount(); |
|
|
|
|
platformTeamAccount.setAccountId(Integer.valueOf(accountId)); |
|
|
|
|
platformTeamAccount.setPlatformId(Integer.valueOf(enterpriseCertification.getPlatformSource())); |
|
|
|
|
platformTeamAccountService.save(platformTeamAccount); |
|
|
|
|
|
|
|
|
|
// 添加所属供应商/幼儿园分类,分类为空直接新增团队
|
|
|
|
|
PlatformTeamClassification platformTeamClassification = new PlatformTeamClassification(); |
|
|
|
|
platformTeamClassification.setIsTeam(1); |
|
|
|
|
platformTeamClassification.setParentId(0); |
|
|
|
|
platformTeamClassification.setLevel(1); |
|
|
|
|
|
|
|
|
|
teamName = enterpriseCertification.getCompanyName(); |
|
|
|
|
classificationId = platformTeamClassification.getId(); |
|
|
|
|
platformTeamClassification.setClassificationName(teamName + "的团队"); |
|
|
|
|
boolean insert = platformTeamClassificationService.save(platformTeamClassification); |
|
|
|
|
if (insert) { |
|
|
|
|
PlatformTeam platformTeam = new PlatformTeam(); |
|
|
|
|
platformTeam.setManageId(platformTeamAccount.getManageId()); |
|
|
|
|
platformTeam.setClassificationId(platformTeamClassification.getId()); |
|
|
|
|
platformTeamService.save(platformTeam); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//删除上团队信息
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
enterpriseCertification.setId(certification.getId()); |
|
|
|
|
try { |
|
|
|
|
HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); |
|
|
|
|
CreditCodeResp info = new Gson().fromJson(EntityUtils.toString(response.getEntity()), CreditCodeResp.class); |
|
|
|
|
if (info.getStatus()) { |
|
|
|
|
if (!ObjectUtils.isEmpty(enterpriseCertificationService.checkWhetherItExists(enterpriseCertification.getCompanyName(), certification.getId(), enterpriseCertification.getOpenId()))) { |
|
|
|
|
errorMsg = "企业名称已存在"; |
|
|
|
|
return R.error(errorMsg); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//删除上团队信息
|
|
|
|
|
// enterpriseCertificationService.deleteTeamInformation(enterpriseCertification.getAccountId());
|
|
|
|
|
enterpriseCertificationService.updateById(enterpriseCertification); |
|
|
|
|
enterpriseCertificationService.updateById(enterpriseCertification); |
|
|
|
|
|
|
|
|
|
//更改二次验证的组织信息
|
|
|
|
|
return changeTeamInformation(enterpriseCertification); |
|
|
|
|
} else { |
|
|
|
|
errorMsg = info.getReason(); |
|
|
|
|
return R.error().put("message", info.getReason()); |
|
|
|
|
//更改二次验证的组织信息
|
|
|
|
|
return changeTeamInformation(enterpriseCertification); |
|
|
|
|
} else { |
|
|
|
|
errorMsg = info.getReason(); |
|
|
|
|
return R.error().put("message", info.getReason()); |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
return R.error(errorMsg); |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
// (errorMsg);
|
|
|
|
|
return R.error(errorMsg); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@NotNull |
|
|
|
|
private R changeTeamInformation (@RequestBody EnterpriseCertification enterpriseCertification){ |
|
|
|
|
enterpriseCertification.setSubmitTime(new Date()); |
|
|
|
|
UserAccount userAccount1 = enterpriseCertificationService.queryAccountInformation(enterpriseCertification.getOpenId(), Integer.valueOf(enterpriseCertification.getPlatformSource())); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
userAccount1.setAccount(enterpriseCertification.getCompanyName()); |
|
|
|
|
enterpriseCertificationService.updateAccountInfo(userAccount1); |
|
|
|
|
|
|
|
|
|
@NotNull |
|
|
|
|
private R changeTeamInformation(@RequestBody EnterpriseCertification enterpriseCertification) { |
|
|
|
|
enterpriseCertification.setSubmitTime(new Date()); |
|
|
|
|
/*QueryWrapper<HrUserAccount> accountQueryWrapper1 = new QueryWrapper<>(); |
|
|
|
|
accountQueryWrapper1.eq("app_open_id", enterpriseCertification.getOpenId()); |
|
|
|
|
accountQueryWrapper1.eq("platform_id", enterpriseCertification.getPlatformSource());*/ |
|
|
|
|
UserAccount userAccount1 = enterpriseCertificationService.queryAccountInformation(enterpriseCertification.getOpenId(), |
|
|
|
|
Integer.valueOf(enterpriseCertification.getPlatformSource())); |
|
|
|
|
|
|
|
|
|
// userAccountService.updateById(userAccount1);
|
|
|
|
|
userAccount1.setAccount(enterpriseCertification.getCompanyName()); |
|
|
|
|
enterpriseCertificationService.updateAccountInfo(userAccount1); |
|
|
|
|
|
|
|
|
|
/* UpdateWrapper<HrUserInfo> userInfoUpdateWrapper = new UpdateWrapper<>(); |
|
|
|
|
userInfoUpdateWrapper.set("user_name", enterpriseCertification.getCompanyName()); |
|
|
|
|
userInfoUpdateWrapper.eq("user_id", userAccount1.getUserId()); |
|
|
|
|
userInfoService.update(new HrUserInfo(), userInfoUpdateWrapper);*/ |
|
|
|
|
|
|
|
|
|
/*UserInfo userInfo = new UserInfo(); |
|
|
|
|
userInfo.setUserName(enterpriseCertification.getCompanyName()); |
|
|
|
|
userInfo.setUserId(userAccount1.getUserId()); |
|
|
|
|
enterpriseCertificationService.updateUserInfo(userInfo);*/ |
|
|
|
|
|
|
|
|
|
//删除团队信息
|
|
|
|
|
//删除团队信息
|
|
|
|
|
// enterpriseCertificationService.deleteTeamInformation(enterpriseCertification.getAccountId());
|
|
|
|
|
return R.ok("提交成功,请等待审核!"); |
|
|
|
|
} |
|
|
|
|
return R.ok("提交成功,请等待审核!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "统一社会信用代码认证(auditStatus给1,新增认证状态为待审核,用于个人认证幼儿园或供应商情况下)", response = CreditCodeResp.class) |
|
|
|
|
@PostMapping("/organizationCertification") |
|
|
|
|
public R organizationCertification(@RequestBody EnterpriseCertification enterpriseCertification, HttpServletRequest request) throws IOException { |
|
|
|
|
@ApiOperation(value = "统一社会信用代码认证(auditStatus给1,新增认证状态为待审核,用于个人认证幼儿园或供应商情况下)", response = CreditCodeResp.class) |
|
|
|
|
@PostMapping("/organizationCertification") |
|
|
|
|
public R organizationCertification (@RequestBody EnterpriseCertification |
|
|
|
|
enterpriseCertification, HttpServletRequest request) throws IOException { |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
String accountId = TokenUtils.getIdByJwtToken(request); |
|
|
|
|
enterpriseCertification.setAccountId(Integer.valueOf(accountId));*/ |
|
|
|
|
enterpriseCertification.setSubmitTime(new Date()); |
|
|
|
|
String host = "https://sys.81api.com"; |
|
|
|
|
String path = "/verifyCompany/"; |
|
|
|
|
String method = "GET"; |
|
|
|
|
Map<String, String> headers = new HashMap<String, String>(); |
|
|
|
|
//最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
|
|
|
|
|
headers.put("Authorization", "APPCODE " + "5a7f623d06724a4da5806c1fb0544e47"); |
|
|
|
|
Map<String, String> querys = new HashMap<String, String>(); |
|
|
|
|
querys.put("ComapnyName", enterpriseCertification.getCompanyName()); |
|
|
|
|
querys.put("CreditCode", enterpriseCertification.getCreditCode()); |
|
|
|
|
querys.put("LegalPersonName", enterpriseCertification.getLegalPerson()); |
|
|
|
|
|
|
|
|
|
String errorMsg = ""; |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); |
|
|
|
|
CreditCodeResp info = new Gson().fromJson(EntityUtils.toString(response.getEntity()), CreditCodeResp.class); |
|
|
|
|
if (info.getStatus()) { |
|
|
|
|
if (!ObjectUtils.isEmpty(enterpriseCertificationService.checkWhetherItExists(enterpriseCertification.getCompanyName(), null, enterpriseCertification.getOpenId()))) { |
|
|
|
|
errorMsg = "企业名称已存在"; |
|
|
|
|
return R.error(errorMsg); |
|
|
|
|
} |
|
|
|
|
enterpriseCertificationService.save(enterpriseCertification); |
|
|
|
|
|
|
|
|
|
//更改二次验证的组织信息
|
|
|
|
|
return changeTeamInformation(enterpriseCertification); |
|
|
|
|
} else { |
|
|
|
|
errorMsg = info.getReason(); |
|
|
|
|
|
|
|
|
|
//失败后删除本次生成的企业团队信息
|
|
|
|
|
enterpriseCertification.setSubmitTime(new Date()); |
|
|
|
|
String host = "https://sys.81api.com"; |
|
|
|
|
String path = "/verifyCompany/"; |
|
|
|
|
String method = "GET"; |
|
|
|
|
Map<String, String> headers = new HashMap<String, String>(); |
|
|
|
|
//最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
|
|
|
|
|
headers.put("Authorization", "APPCODE " + "bd4ad25d0e41466eabb31d9baa16a79f"); |
|
|
|
|
Map<String, String> querys = new HashMap<String, String>(); |
|
|
|
|
querys.put("ComapnyName", enterpriseCertification.getCompanyName()); |
|
|
|
|
querys.put("CreditCode", enterpriseCertification.getCreditCode()); |
|
|
|
|
querys.put("LegalPersonName", enterpriseCertification.getLegalPerson()); |
|
|
|
|
|
|
|
|
|
String errorMsg = ""; |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); |
|
|
|
|
CreditCodeResp info = new Gson().fromJson(EntityUtils.toString(response.getEntity()), CreditCodeResp.class); |
|
|
|
|
if (info.getStatus()) { |
|
|
|
|
if (!ObjectUtils.isEmpty(enterpriseCertificationService.checkWhetherItExists(enterpriseCertification.getCompanyName(), null, enterpriseCertification.getOpenId()))) { |
|
|
|
|
errorMsg = "企业名称已存在"; |
|
|
|
|
return R.error(errorMsg); |
|
|
|
|
} |
|
|
|
|
enterpriseCertificationService.save(enterpriseCertification); |
|
|
|
|
|
|
|
|
|
//更改二次验证的组织信息
|
|
|
|
|
return changeTeamInformation(enterpriseCertification); |
|
|
|
|
} else { |
|
|
|
|
errorMsg = info.getReason(); |
|
|
|
|
|
|
|
|
|
//失败后删除本次生成的企业团队信息
|
|
|
|
|
/*QueryWrapper<HrUserAccount> accountQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
accountQueryWrapper.eq("app_open_id", enterpriseCertification.getOpenId()); |
|
|
|
|
accountQueryWrapper.eq("platform_id", enterpriseCertification.getPlatformSource()); |
|
|
|
|
|
|
|
|
|
HrUserAccount userAccount = userAccountService.getOne(accountQueryWrapper);*/ |
|
|
|
|
|
|
|
|
|
UserAccount userAccount = enterpriseCertificationService.queryAccountInformation(enterpriseCertification.getOpenId(), |
|
|
|
|
Integer.valueOf(enterpriseCertification.getPlatformSource())); |
|
|
|
|
UserAccount userAccount = enterpriseCertificationService.queryAccountInformation(enterpriseCertification.getOpenId(), Integer.valueOf(enterpriseCertification.getPlatformSource())); |
|
|
|
|
|
|
|
|
|
enterpriseCertificationService.deleteUserInformation(userAccount.getUserId()); |
|
|
|
|
enterpriseCertificationService.deleteAccountInformation(userAccount.getId()); |
|
|
|
|
enterpriseCertificationService.deleteUserInformation(userAccount.getUserId()); |
|
|
|
|
enterpriseCertificationService.deleteAccountInformation(userAccount.getId()); |
|
|
|
|
/*userInfoService.removeById(userAccount.getUserId()); |
|
|
|
|
userAccountService.removeById(userAccount);*/ |
|
|
|
|
return R.error().put("message", info.getReason()); |
|
|
|
|
return R.error().put("message", info.getReason()); |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
return R.error().put("message", errorMsg); |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
return R.error().put("message", errorMsg); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
|
String host = "https://sys.81api.com"; |
|
|
|
|
String path = "/verifyCompany/"; |
|
|
|
|
String method = "GET"; |
|
|
|
|
Map<String, String> headers = new HashMap<String, String>(); |
|
|
|
|
//最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
|
|
|
|
|
headers.put("Authorization", "APPCODE " + AliRealNameAuthenticationConfig.ALI_API_APPCODE); |
|
|
|
|
Map<String, String> querys = new HashMap<String, String>(); |
|
|
|
|
querys.put("ComapnyName", "荆州国瑞网络科技有限公司"); |
|
|
|
|
querys.put("CreditCode", "91421000MA494BGL8W"); |
|
|
|
|
querys.put("LegalPersonName", "余承文"); |
|
|
|
|
|
|
|
|
|
String errorMsg = ""; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); |
|
|
|
|
CreditCodeResp info = new Gson().fromJson(EntityUtils.toString(response.getEntity()), CreditCodeResp.class); |
|
|
|
|
if (info.getStatus()) { |
|
|
|
|
public static void main (String[]args){ |
|
|
|
|
String host = "https://sys.81api.com"; |
|
|
|
|
String path = "/verifyCompany/"; |
|
|
|
|
String method = "GET"; |
|
|
|
|
Map<String, String> headers = new HashMap<String, String>(); |
|
|
|
|
//最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
|
|
|
|
|
headers.put("Authorization", "APPCODE " + AliRealNameAuthenticationConfig.ALI_API_APPCODE); |
|
|
|
|
Map<String, String> querys = new HashMap<String, String>(); |
|
|
|
|
querys.put("ComapnyName", "荆州国瑞网络科技有限公司"); |
|
|
|
|
querys.put("CreditCode", "91421000MA494BGL8W"); |
|
|
|
|
querys.put("LegalPersonName", "余承文"); |
|
|
|
|
|
|
|
|
|
String errorMsg = ""; |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); |
|
|
|
|
CreditCodeResp info = new Gson().fromJson(EntityUtils.toString(response.getEntity()), CreditCodeResp.class); |
|
|
|
|
if (info.getStatus()) { |
|
|
|
|
/*if (!ObjectUtils.isEmpty(enterpriseCertificationService.checkWhetherItExists(enterpriseCertification.getCompanyName(), null, enterpriseCertification.getOpenId()))) { |
|
|
|
|
errorMsg = "企业名称已存在"; |
|
|
|
|
(errorMsg); |
|
|
|
|
} |
|
|
|
|
enterpriseCertificationService.save(enterpriseCertification);*/ |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
errorMsg = info.getReason(); |
|
|
|
|
} else { |
|
|
|
|
errorMsg = info.getReason(); |
|
|
|
|
|
|
|
|
|
System.err.println("错误信息:" + errorMsg); |
|
|
|
|
System.err.println("错误信息:" + errorMsg); |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
errorMsg = "系统错误"; |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
errorMsg = "系统错误"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |