Bitzsoft.Integrations.Yonyou 1.0.0-alpha.10

This is a prerelease version of Bitzsoft.Integrations.Yonyou.
dotnet add package Bitzsoft.Integrations.Yonyou --version 1.0.0-alpha.10
                    
NuGet\Install-Package Bitzsoft.Integrations.Yonyou -Version 1.0.0-alpha.10
                    
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.Yonyou" Version="1.0.0-alpha.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bitzsoft.Integrations.Yonyou" Version="1.0.0-alpha.10" />
                    
Directory.Packages.props
<PackageReference Include="Bitzsoft.Integrations.Yonyou" />
                    
Project file
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.Yonyou --version 1.0.0-alpha.10
                    
#r "nuget: Bitzsoft.Integrations.Yonyou, 1.0.0-alpha.10"
                    
#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.Yonyou@1.0.0-alpha.10
                    
#: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.Yonyou&version=1.0.0-alpha.10&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Bitzsoft.Integrations.Yonyou&version=1.0.0-alpha.10&prerelease
                    
Install as a Cake Tool

Bitzsoft.Integrations.Yonyou

用友 YonBIP OpenAPI 多租户连接器,目标框架为 net5.0;net8.0;net10.0

安装

dotnet add package Bitzsoft.Integrations.Yonyou

已实现能力

  • 企业自建应用 AppKey + AppSecret 的官方 HMAC-SHA256 认证;
  • 官方数据中心发现,以及私有代理/测试发现地址的显式主机信任边界;
  • 按租户、用友租户、endpoint profile、凭据和服务端点隔离的 token 并发缓存;
  • 客户档案 newlistrange 完整请求过滤条件、强类型响应和未裁剪原始 JSON;
  • 最大 5000 条的页码分页;
  • profile、任务和运行绑定的 opaque continuation cursor;
  • 仅显式 SyncMode.Full 的可恢复全量同步。

普通业务请求和响应正文默认完整保留,不设置强制大小上限。只有 token 交换使用显式敏感标记禁止请求、响应正文进入审计日志;它不会改变发往用友的 实际 payload。

凭据与注册

凭据字段:

AppKey
AppSecret

固定端点注册:

services.AddBitzsoftYonyou(
    YonyouEndpoint.CreateCustom(
        new Uri("https://gateway.example/"),
        new Uri("https://token.example/")),
    new[]
    {
        new YonyouCustomerSyncProfile(
            "Customers",
            providerTenantId: "your-yonyou-tenant")
    });

官方数据中心发现注册:

services.AddBitzsoftYonyou(
    YonyouEndpointProfile.Official,
    new[]
    {
        new YonyouCustomerSyncProfile(
            "Customers",
            providerTenantId: "your-yonyou-tenant")
    });

查询与同步

直接分页查询:

var page = await client.QueryCustomersAsync(
    new YonyouRequestContext(
        tenantId: "host-tenant",
        providerTenantId: "yonyou-tenant"),
    new YonyouCustomerQuery(
        pageIndex: 1,
        pageSize: 500,
        filter: new YonyouCustomerFilter(
            customerClassCode: "01")));

同步时每次都必须明确指定 Full:

var result = await engine.RunAsync(
    new SyncRunRequest(
        jobKey,
        mode: SyncMode.Full,
        pageSize: 500),
    source,
    sink,
    reconciler);

不要使用 Automatic。同步引擎在首个完整运行后会将 Automatic 解析成 Incremental,而当前客户档案 API 没有可证明无漏数的闭合增量协议,连接器会以 incremental_not_supported 明确拒绝。

已知限制:

  • 厂商页码协议没有稳定排序键或快照边界;全量运行期间源数据并发变化可能导致 漂页。应安排低变更窗口,并依靠周期性 Full 与 reconcile 收敛。
  • stopStatus=true 表示停用,不表示删除,因此记录始终以 IsDeleted=false 交付,并在 yonyou.stopStatus 元数据中保留状态。
  • 只有完整结束的 Full reconcile 才能识别目标端存在、源本轮未出现的记录; 暂停或失败运行不得据此执行硬删除。
  • 当前不包含增量同步、写操作、Webhook、供应商主数据、其他 ERP 对象、ISV 套件授权或真实厂商沙箱认证。

官方契约

官方契约:

Product 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.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Bitzsoft.Integrations.Yonyou:

Package Downloads
Bitzsoft.Integrations.All

Bitzsoft 第三方集成聚合包 — net5.0 包含传统连接器,net8.0+ 额外包含受上游 TFM 限制的 AI 模块

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-alpha.10 48 7/26/2026