可信空间连接器入住接口
Showing
3 changed files
with
41 additions
and
0 deletions
| ... | @@ -193,6 +193,19 @@ public class EnterpriseController { | ... | @@ -193,6 +193,19 @@ public class EnterpriseController { |
| 193 | return CommonRes.success(true); | 193 | return CommonRes.success(true); |
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | @GetMapping("/get-by-name-uscc") | ||
| 197 | @SystemLog(value = "按名称或者统一社会信用代码查企业信息详情") | ||
| 198 | @Operation(summary = "按名称或者统一社会信用代码查企业信息详情", | ||
| 199 | parameters = { | ||
| 200 | @Parameter(name = "tenantName", description = "企业名称", required = false), | ||
| 201 | @Parameter(name = "uscc", description = "统一社会信用代码", required = false) | ||
| 202 | }) | ||
| 203 | public CommonRes<EnterpriseRSVO> getEnterpriseDetailByNameOrUscc(@RequestParam(required = false) String tenantName, | ||
| 204 | @RequestParam(required = false) String uscc) { | ||
| 205 | EnterpriseRSVO vo = enterpriseService.getEnterpriseDetailByNameOrUscc(tenantName,uscc); | ||
| 206 | return CommonRes.success(vo); | ||
| 207 | } | ||
| 208 | |||
| 196 | //endregion | 209 | //endregion |
| 197 | 210 | ||
| 198 | } | 211 | } | ... | ... |
| ... | @@ -105,4 +105,12 @@ public interface EnterpriseService { | ... | @@ -105,4 +105,12 @@ public interface EnterpriseService { |
| 105 | * @return | 105 | * @return |
| 106 | */ | 106 | */ |
| 107 | EnterpriseRSVO getEnterpriseDetailByLogonUser(String logonUser); | 107 | EnterpriseRSVO getEnterpriseDetailByLogonUser(String logonUser); |
| 108 | |||
| 109 | /** | ||
| 110 | * 按名称或者统一社会信用代码查企业信息详情 | ||
| 111 | * @param tenantName | ||
| 112 | * @param uscc | ||
| 113 | * @return | ||
| 114 | */ | ||
| 115 | EnterpriseRSVO getEnterpriseDetailByNameOrUscc(String tenantName, String uscc); | ||
| 108 | } | 116 | } | ... | ... |
| ... | @@ -629,6 +629,26 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -629,6 +629,26 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 629 | } | 629 | } |
| 630 | 630 | ||
| 631 | @Override | 631 | @Override |
| 632 | public EnterpriseRSVO getEnterpriseDetailByNameOrUscc(String tenantName, String uscc) { | ||
| 633 | if(StringUtils.isBlank(tenantName) && StringUtils.isBlank(uscc)){ | ||
| 634 | throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR,"开发主体名称和统一社会信用代码不能同时为空。"); | ||
| 635 | } | ||
| 636 | LambdaQueryWrapper<MfEnterprise> queryWrapper = Wrappers.lambdaQuery(MfEnterprise.class); | ||
| 637 | if(StringUtils.isNotBlank(tenantName)) { | ||
| 638 | queryWrapper.eq(MfEnterprise::getTenantName, tenantName); | ||
| 639 | } | ||
| 640 | if(StringUtils.isNotBlank(uscc)) { | ||
| 641 | queryWrapper.eq(MfEnterprise::getSocialCreditCode, uscc); | ||
| 642 | } | ||
| 643 | queryWrapper.last("limit 1"); | ||
| 644 | MfEnterprise mfEnterprise = mfEnterpriseService.getOne(queryWrapper); | ||
| 645 | if (ObjectUtils.isEmpty(mfEnterprise)) { | ||
| 646 | return null; | ||
| 647 | } | ||
| 648 | return convertToVO(mfEnterprise); | ||
| 649 | } | ||
| 650 | |||
| 651 | @Override | ||
| 632 | public Boolean check(EnterpriseRQVO vo) { | 652 | public Boolean check(EnterpriseRQVO vo) { |
| 633 | String tenantName = personelFeign.getAllTenantGuidNameMap().getData().get(vo.getTenantGuid()); | 653 | String tenantName = personelFeign.getAllTenantGuidNameMap().getData().get(vo.getTenantGuid()); |
| 634 | TenantRQVO tenant = csbrBeanUtil.convert(vo,TenantRQVO.class); | 654 | TenantRQVO tenant = csbrBeanUtil.convert(vo,TenantRQVO.class); | ... | ... |
-
Please register or sign in to post a comment