CloudContract.Standard 4.3.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package CloudContract.Standard --version 4.3.0
NuGet\Install-Package CloudContract.Standard -Version 4.3.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="CloudContract.Standard" Version="4.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CloudContract.Standard --version 4.3.0
#r "nuget: CloudContract.Standard, 4.3.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.
// Install CloudContract.Standard as a Cake Addin
#addin nuget:?package=CloudContract.Standard&version=4.3.0

// Install CloudContract.Standard as a Cake Tool
#tool nuget:?package=CloudContract.Standard&version=4.3.0

没有全部封装,只封装了合同签署需要用到的这些接口(含存证、下载)

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using CloudContract.Standard;
using CloudContract.Standard.Models;
using CloudContract.Standard.Models.Contract;
using CloudContract.Standard.Models.Moulage;
using CloudContract.Standard.Models.User;

namespace Demo
{
    class Program
    {
        static string appId = "";
        static string appKey = "";
        static string baseAddress = BaseApi.BASE_ADDRESS;
        static string token = "";
        static async Task Main(string[] args)
        {
            try
            {
                await TestAuthApi();
                // await TestUserApi();
                // await TestMoulageApi();
                await TestContractApi();
                Console.ReadLine();
            }
            catch (Exception ex)
            {
                Console.WriteLine($"{ex.Message}\r\n\t{ex.StackTrace}");
            }
        }

        static async Task TestAuthApi()
        {
            var api = new AuthApi()
            {
                AppId = appId,
                AppKey = appKey,
                BaseAddress = baseAddress,
            };
           // 平台自己登录
            token = await api.Login(null);
           // 平台的用户登录
            // token = await api.Login("xxx");

            Console.WriteLine($"AuthApi.Login() => Token:{token}");
        }

        static async Task TestUserApi()
        {
            var api = new UserApi()
            {
                AppId = appId,
                AppKey = appKey,
                BaseAddress = baseAddress,
            };
            api.SetToken(token);

            //var res = await api.CreatePerson(new CreatePersonModel
            //{
            //    UserName = "xx",
            //    IdentityRegion = "0",
            //    CertifyNum = "xxxx",
            //    PhoneRegion = "0",
            //    PhoneNo = "xxx",
            //    CaType = "B2",
            //});

            //var res = await api.CreateCompany(new CreateCompanyModel
            //{
            //    UserName = "xxx股份有限公司",
            //    CertifyType = "1", // 社会信用代码
            //    CertifyNum = "xxx",
            //    PhoneNo = "xxx",
            //    CaType = "B2",
            //});
            //Console.WriteLine($"TestUserApi.CreatePerson() => Token:{res}");
        }

        static async Task TestMoulageApi()
        {
            var api = new MoulageApi()
            {
                AppId = appId,
                AppKey = appKey,
                BaseAddress = baseAddress,
            };
            api.SetToken(token);

            var id1 = await api.CreatePersonMoulage(new CreatePersonMoulage
            {
                SignerId = "xxx",
            });

            var id2 = await api.CreateCompanyMoulage(new CreateCompanyMoulageModel
            {
                SignerId = "xxx",
            });
            Console.WriteLine($"TestMoulageApi.Create() => Id1:{id1},  Id2:{id2}");
        }
        static async Task TestContractApi()
        {
            var api = new ContractApi()
            {
                AppId = appId,
                AppKey = appKey,
                BaseAddress = baseAddress,
            };
            api.SetToken(token);
            #region 存证合同
            var res = await api.RetainEvidenceContac(new RetainEvidenceContactModel
            {
                IdType = "0",
                IdContent = "1903040109xxx",
            });
            Console.WriteLine($"TestContractApi.RetainEvidenceContac() => 存证id:{res}");
            #endregion 

            #region 下载合同
            //var bytes = await api.DownloadContact(new DownloadContactModel
            //{
            //    IdType = "0",
            //    IdContent = "1903040109385484",
            //});

            //System.IO.File.WriteAllBytes(@"C:\Users\kunge\Desktop\test111.pdf", bytes);
            #endregion 

            #region 根据模板创建合同
            //var placeholder = new Dictionary<string, string>
            //{
            //    {"${乙方姓名}", "xx" },
            //    {"${工程地点}", "xxxxx" },
            //};
            //var res = await api.CreateContract(new CreateContractModel
            //{
            //    ContractNo = "",
            //    ContractTitle = "xx合同",
            //    TemplateId = "TEM1007793",
            //    ContractData = new ContractdataModel
            //    {
            //        Placeholder = placeholder,
            //        Tables = new List<TableModel>
            //         {
            //             new TableModel
            //             {
            //                Index = 0,
            //                Table = new List<Dictionary<string, object>>
            //                {
            //                    new Dictionary<string, object>
            //                    {
            //                        { "1", "111"},
            //                        { "2", "2019年3月4日"},
            //                        { "3", "2019年3月6日"},
            //                    },
            //                    new Dictionary<string, object>
            //                    {
            //                        { "1", "aaa"},
            //                        { "2", "2019年4月1日"},
            //                        { "3", "2019年4月19日"},
            //                    },
            //                }
            //             },
            //         },
            //    },
            //});
            //Console.WriteLine($"TestContractApi.CreateContract() => Token:{res}");
            #endregion

            #region 添加签署者
            //await api.AddContractSigner(new AddContractSignerModel
            //{
            //    IdType = "0", // 合同id
            //    IdContent = res,
            //    Signers = new List<SignerModel>
            //    {
            //        new SignerModel
            //        {
            //            SignerId ="xx",
            //            SignPositionType = "0", // 关键字定位
            //            PositionContent = "",
            //            SignValidateType = "0", // 不校验
            //            SignMode = "0", // 每次绘制印章
            //        },
            //        new SignerModel
            //        {
            //            SignerId ="xx",
            //            SignPositionType = "1", // 标签定位
            //            PositionContent ="76603",
            //            SignValidateType = "0", // 不校验
            //            SignMode = "1", // 每次绘制印章
            //        },
            //    },
            //});
            //Console.WriteLine($"TestContractApi.AddContractSigner() => 添加签署者");
            #endregion

            #region 签署合同
            //await api.SignContract(new SignContractModel
            //{
            //    IdType = "0",
            //    IdContent = res,
            //    SignerId = "xx",
            //});
            //Console.WriteLine($"TestContractApi.SignContract() => 签署合同");
            #endregion

        }
    }
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated

云合同API对接4.3.0版本