Bitzsoft.Integrations.EnterpriseInfo
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Bitzsoft.Integrations.EnterpriseInfo --version 1.0.0
NuGet\Install-Package Bitzsoft.Integrations.EnterpriseInfo -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bitzsoft.Integrations.EnterpriseInfo" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bitzsoft.Integrations.EnterpriseInfo" Version="1.0.0" />
<PackageReference Include="Bitzsoft.Integrations.EnterpriseInfo" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bitzsoft.Integrations.EnterpriseInfo --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Bitzsoft.Integrations.EnterpriseInfo, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Bitzsoft.Integrations.EnterpriseInfo@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bitzsoft.Integrations.EnterpriseInfo&version=1.0.0
#tool nuget:?package=Bitzsoft.Integrations.EnterpriseInfo&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Bitzsoft.Integrations.EnterpriseInfo
企业信息查询抽象层,统一接口与强类型模型,屏蔽企查查、天眼查、启信宝等第三方供应商差异。
功能特性
- 统一查询接口
IEnterpriseInfoProvider:屏蔽底层供应商差异,提供一致的企业信息查询 API - 企业搜索:按关键字搜索企业,支持分页
- 工商信息:获取企业基本照面信息及详情(股东、主要人员、分支机构、变更记录等)
- 三要素核验:企业名称、统一社会信用代码、法定代表人姓名一致性验证
- 风险扫描:多维度风险摘要(失信、被执行、诉讼、经营异常、行政处罚等)
- 股东信息:企业股东出资比例及类型
- 司法案件:裁判文书、失信被执行、开庭公告等司法数据
- 实际控制人:穿透企业股权结构获取实际控制人及控制链
- 强类型模型:所有接口返回不可变(
init)强类型模型,IReadOnlyList<T>保证集合只读 - 可扩展架构:实现
IEnterpriseInfoProvider即可接入新的企业信息供应商
安装
.NET CLI
dotnet add package Bitzsoft.Integrations.EnterpriseInfo
PackageReference
<PackageReference Include="Bitzsoft.Integrations.EnterpriseInfo" Version="1.0.0" />
配置
本包为抽象层,不包含具体供应商配置。请查阅各实现包的文档:
- Qichacha:
appsettings.json中配置Key+SecretKey - Tianyancha:
appsettings.json中配置Token - Qixin:
appsettings.json中配置AppKey+SecretKey
注册服务
// 单一供应商注册(以企查查为例)
services.AddBitzsoftQichachaEnterpriseInfo(options =>
{
options.Key = "your-app-key";
options.SecretKey = "your-secret-key";
});
// 或使用 IConfiguration 绑定
services.AddBitzsoftQichachaEnterpriseInfo(configuration, "Qichacha");
使用示例
企业搜索与基本信息查询
using Bitzsoft.Integrations.EnterpriseInfo;
using Bitzsoft.Integrations.EnterpriseInfo.Models;
public class EnterpriseService
{
private readonly IEnterpriseInfoProvider _provider;
public EnterpriseService(IEnterpriseInfoProvider provider)
{
_provider = provider;
}
public async Task<EnterpriseBasicInfo> LookupAsync(string keyword)
{
// 先模糊搜索
var searchResult = await _provider.SearchAsync(keyword);
var match = searchResult.Items.FirstOrDefault();
if (match is null)
throw new InvalidOperationException($"未找到匹配企业: {keyword}");
// 获取工商照面信息
return await _provider.GetBasicInfoAsync(match.CreditCode ?? match.Name);
}
}
三要素核验
public async Task<bool> VerifyEnterpriseAsync(
string creditCode, string name, string legalPerson)
{
var result = await _provider.VerifyAsync(creditCode, name, legalPerson);
return result.IsMatch;
}
风险扫描
public async Task<EnterpriseRiskSummary> AssessRiskAsync(string creditCodeOrName)
{
var summary = await _provider.GetRiskSummaryAsync(creditCodeOrName);
Console.WriteLine($"企业: {summary.Name}");
Console.WriteLine($"风险等级: {summary.RiskLevel}");
Console.WriteLine($"失信记录: {summary.DishonestCount}");
Console.WriteLine($"被执行: {summary.ExecutedCount}");
Console.WriteLine($"诉讼: {summary.LitigationCount}");
Console.WriteLine($"经营异常: {summary.AbnormalCount}");
Console.WriteLine($"行政处罚: {summary.PenaltyCount}");
return summary;
}
获取股东与实际控制人
public async Task ShareholderReportAsync(string creditCodeOrName)
{
var shareholders = await _provider.GetShareholdersAsync(creditCodeOrName);
foreach (var s in shareholders.Take(5))
{
Console.WriteLine($"{s.Name}: {s.ShareholdingRatio:P1} ({s.ShareholderType})");
}
var controller = await _provider.GetActualControllerAsync(creditCodeOrName);
Console.WriteLine($"实际控制人: {controller.ControllerName}, 控制比例: {controller.ControlRatio:P1}");
}
核心类型一览
| 类型 | 说明 |
|---|---|
IEnterpriseInfoProvider |
企业信息查询核心接口(8 个方法 + ProviderName 属性) |
IEnterpriseInfoConfigProvider |
供应商配置提供器接口(BaseUrl + HttpClientName) |
EnterpriseSearchResult |
企业搜索结果(含分页信息) |
EnterpriseSearchItem |
搜索结果条目(名称、信用代码、法定代表人、注册资本等) |
EnterpriseBasicInfo |
工商照面基本信息 |
EnterpriseDetailInfo |
企业详情(含基本信息 + 股东 + 主要人员 + 变更记录 + 分支机构) |
EnterpriseVerificationResult |
三要素核验结果(IsMatch + 企业各项信息) |
EnterpriseRiskSummary |
风险扫描摘要(多维度风险计数 + 明细列表) |
EnterpriseRiskLevel |
风险等级枚举(Low / Medium / High / Unknown) |
EnterpriseRiskItem |
风险明细项(类型、描述、等级、日期) |
EnterpriseShareholderInfo |
股东信息(名称、持股比例、认缴资本、股东类型) |
EnterpriseLegalCase |
司法案件(标题、案由、法院、金额、涉诉当事人) |
EnterpriseCaseParty |
案件当事人(名称 + 角色) |
EnterpriseActualController |
实际控制人(名称、控制比例、控制链) |
EnterpriseControlChainNode |
控制链节点(名称、类型、持股比例) |
EnterpriseKeyPersonnel |
主要人员(姓名 + 职位) |
EnterpriseChangeRecord |
工商变更记录(项目、变更前后内容、日期) |
EnterpriseBranch |
分支机构信息 |
EnterpriseInfoException |
供应商异常(ProviderName + ErrorCode + ProviderMessage) |
EnterpriseInfoResult<T> |
通用查询结果包装(IsSuccess + Data + ErrorMessage + 分页信息) |
依赖
Microsoft.Extensions.DependencyInjection:DI 容器支持
相关包
- Bitzsoft.Integrations.Compatibility:基础工具库
- Bitzsoft.Integrations.EnterpriseInfo.Qichacha:企查查实现(167 个 API)
- Bitzsoft.Integrations.EnterpriseInfo.Tianyancha:天眼查实现(225 个 API)
- Bitzsoft.Integrations.EnterpriseInfo.Qixin:启信宝实现(270 个 API)
- Bitzsoft.Integrations.EnterpriseInfo.All:全部供应商聚合包
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.0)
- Bitzsoft.Integrations.Core (>= 1.0.0)
-
net5.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.0)
- Bitzsoft.Integrations.Core (>= 1.0.0)
-
net8.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.0)
- Bitzsoft.Integrations.Core (>= 1.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Bitzsoft.Integrations.EnterpriseInfo:
| Package | Downloads |
|---|---|
|
Bitzsoft.Integrations.EnterpriseInfo.Qichacha
企查查企业信息查询实现 |
|
|
Bitzsoft.Integrations.EnterpriseInfo.Tianyancha
天眼查企业信息查询实现 |
|
|
Bitzsoft.Integrations.EnterpriseInfo.Qixin
启信宝企业信息查询实现 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 226 | 8/3/2026 |
| 1.0.0 | 218 | 8/2/2026 |
| 1.0.0-alpha.10 | 63 | 7/26/2026 |
| 1.0.0-alpha.9 | 68 | 7/12/2026 |
| 1.0.0-alpha.8 | 206 | 7/1/2026 |
| 1.0.0-alpha.7 | 89 | 6/16/2026 |
| 1.0.0-alpha.6 | 86 | 6/16/2026 |
| 1.0.0-alpha.5 | 80 | 6/14/2026 |
| 1.0.0-alpha.3 | 79 | 6/7/2026 |