Commit c798133a by 陶然

init

parent a2dec19c
......@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Njzj.Bocoms.Openapis
namespace Com.Bocom.OpenApi
{
internal static class Configs
{
......@@ -43,5 +43,20 @@ namespace Njzj.Bocoms.Openapis
/// </summary>
internal static string QueryContractOrderRequestV2 = "/api/iifssmartbooking/queryContractOrder/v2";
/// <summary>
/// 1.4 新增账单
/// </summary>
internal static string AddContractOrderRequestV2 = "/api/iifssmartbooking/addContractOrder/v2";
/// <summary>
/// 1.10 删除账单
/// </summary>
internal static string DelContractOrderRequestV1 = "/api/iifssmartbooking/delContractOrder/v1";
/// <summary>
/// 1.9 取消核销
/// </summary>
internal static string UnWriteOffRequestV1 = "/api/iifssmartbooking/unWriteOff/v1";
}
}
using Com.Bocom.OpenApi.Utils;
using Kivii;
using Kivii.Finances.Entities;
using Kivii.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Com.Bocom.OpenApi.AddContractOrderRequestV2.AddContractOrderRequestV2Biz;
namespace Com.Bocom.OpenApi
{
public static class Extension
{
public static AddContractOrderResponseV2 RequestAddContractOrderV2(Settlement settlement,out string err)
{
if (settlement == null)
{
err = string.Empty;
return null;
}
DefaultBocomClient client = new DefaultBocomClient(Configs.APP_ID, Configs.MY_PRIVATE_KEY, Configs.APIGW_PUBLIC_KEY, BocomConstants.ENCRYPT_TYPE_RSA_AND_AES);
/**
* 测试环境可以忽略SSL证书告警,生产环境不可忽略
*/
client.IgnoreSslHostnameVerifier();
var bizKvid = settlement.Kvid.ToString();
var request = new AddContractOrderRequestV2();
request.SetServiceUrl(Configs.APIGW_URL_ADDRESS + Configs.AddContractOrderRequestV2);
var bizContent = new AddContractOrderRequestV2.AddContractOrderRequestV2Biz();
bizContent.org_id = Configs.ORG_ID;
bizContent.bat_id = bizKvid;
bizContent.cont_order_list = new List<ContOrder>();
var contorder = new ContOrder();
contorder.cont_id = bizKvid;
contorder.org_id = bizContent.org_id;
contorder.ori_payer = settlement.PayerName;
//contorder.ori_ac = "";
//contorder.ori_addr = "仅记录";
//contorder.ori_tel_no = "仅记录";
//contorder.ori_other_info1 = "仅记录";
//contorder.ori_other_info2 = "仅记录";
//contorder.ori_other_info3 = "仅记录";
contorder.ori_itm_nme = settlement.BizId;
contorder.ori_amt = settlement.AmountPlan.ToString();
contorder.ori_offset_amt = (settlement.AmountPlan - settlement.Amount).ToString();
contorder.ori_act_amt = settlement.Amount.ToString();
//contorder.attach_code = "";
contorder.remark = settlement.Remark;
//contorder.offset_remark = "测试2";
contorder.payment_period = $"{DateTime.Now.AddMonths(-2).ToString("yyyy-MM-dd")}~{DateTime.Now.AddMonths(7).ToString("yyyy-MM-dd")}";
contorder.agreement_type = "-1";
bizContent.cont_order_list.Add(contorder);
request.SetBizContent(bizContent);
var response = client.Execute(request, Guid.NewGuid().ToString().Replace("-", ""));
Console.WriteLine("--------------------------------62----------------------------------");
var rtns = new AddContractOrderResponseV2();
if (response.IsSuccess())
{
rtns = response as AddContractOrderResponseV2;
err=string.Empty;
return rtns;
}
else
{
err = response.GetRspMsg();
return null;
}
}
}
}
......@@ -43,6 +43,9 @@
<HintPath>..\..\k5-njzj\packages\Kivii.Core.5.6.2023.4140\lib\net45\Kivii.Core.V4.5.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Kivii.Linq.V4.5, Version=5.6.2023.4200, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\k5-njzj\packages\Kivii.Linq.5.6.2023.4200\lib\net45\Kivii.Linq.V4.5.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" />
......@@ -55,7 +58,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BocomFeature.cs" />
<Compile Include="Configs.cs" />
<Compile Include="Extension.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Sdk\BizContent.cs" />
<Compile Include="Sdk\BocomApiException.cs" />
......@@ -71,22 +76,28 @@
<Compile Include="Sdk\DefaultBocomClient.cs" />
<Compile Include="Sdk\request\AddContractOrderRequestV2.cs" />
<Compile Include="Sdk\request\BJPTBlCustAccountQueryRequestV1.cs" />
<Compile Include="Sdk\request\DelContractOrderRequestV1.cs" />
<Compile Include="Sdk\request\FileUploadRequestV1.cs" />
<Compile Include="Sdk\request\HmdLoanStatusListFileDownloadRequestV1.cs" />
<Compile Include="Sdk\request\IntegralExchangeCheckRequestV1.cs" />
<Compile Include="Sdk\request\IntegralExchangeCreateUrlRequestV1.cs" />
<Compile Include="Sdk\request\MPNG210001RequestV1.cs" />
<Compile Include="Sdk\request\QueryContractOrderRequestV2.cs" />
<Compile Include="Sdk\request\ScfCreateUrlRequestV1.cs" />
<Compile Include="Sdk\request\UnWriteOffRequestV1.cs" />
<Compile Include="Sdk\request\WriteOffResultRequestV2.cs" />
<Compile Include="Sdk\response\AddContractOrderResponseV2.cs" />
<Compile Include="Sdk\response\BJPTBlCustAccountQueryResponseV1.cs" />
<Compile Include="Sdk\response\DelContractOrderResponseV1.cs" />
<Compile Include="Sdk\response\FileDownloadResponseV1.cs" />
<Compile Include="Sdk\response\FileUploadResponseV1.cs" />
<Compile Include="Sdk\response\IntegralExchangeCheckResponseV1.cs" />
<Compile Include="Sdk\response\IntegralExchangeCreateUrlResponseV1.cs" />
<Compile Include="Sdk\response\IntegralExchangeNotifyResponseV1.cs" />
<Compile Include="Sdk\response\MPNG210001ResponseV1.cs" />
<Compile Include="Sdk\response\QueryContractOrderResponseV2.cs" />
<Compile Include="Sdk\response\ScfCreateUrlResponseV1.cs" />
<Compile Include="Sdk\response\UnWriteOffResponseV1.cs" />
<Compile Include="Sdk\response\WriteOffResultResponseV2.cs" />
<Compile Include="Sdk\security\crypt\AESCryptor.cs" />
<Compile Include="Sdk\security\crypt\RSACryptor.cs" />
......@@ -112,9 +123,17 @@
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<Compile Include="Transforms\Request.Injection.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Sdk\Dll\BouncyCastle.Crypto.dll" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Kivii.K5\Kivii.Biz.Finances.V2.0\Src\Kivii.Biz.Finances.V2.0.csproj">
<Project>{8d9479e9-5c4f-4d96-8bc1-c771be0d91b1}</Project>
<Name>Kivii.Biz.Finances.V2.0</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System;
using Com.Bocom.OpenApi;
using System.Runtime.Serialization;
namespace Com.Bocom.OpenApi
{
/// <summary>
/// 1.10 删除账单
/// </summary>
public class DelContractOrderRequestV1 : BocomRequest<DelContractOrderResponseV1>
{
public override Type GetResponseClass()
{
return typeof(DelContractOrderResponseV1);
}
public override bool IsNeedEncrypt()
{
return false;
}
public override string GetMethod()
{
return "POST";
}
public override Type GetBizContentClass()
{
return typeof(DelContractOrderRequestV1Biz);
}
[DataContract]
public class DelContractOrderRequestV1Biz : BizContent
{
/// <summary>
/// 机构编号 </summary>
[DataMember]
public string org_id { get; set; }
/// <summary>
/// 账单编号 </summary>
[DataMember]
public string bill_id { get; set; }
}
}
}
......@@ -11,6 +11,10 @@ using System.Threading.Tasks;
namespace Com.Bocom.OpenApi
{
/// <summary>
/// 1.2 账单查询
/// 智慧记账产品查询账单接口,支持常规账单和框架性协议账单查询。
/// </summary>
public class QueryContractOrderRequestV2 : BocomRequest<QueryContractOrderResponseV2>
{
/// <summary>
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace Com.Bocom.OpenApi
{
/// <summary>
/// 1.9 取消核销
/// </summary>
public class UnWriteOffRequestV1 : BocomRequest<UnWriteOffResponseV1>
{
public override Type GetResponseClass()
{
return typeof(UnWriteOffResponseV1);
}
public override bool IsNeedEncrypt()
{
return false;
}
public override string GetMethod()
{
return "POST";
}
public override Type GetBizContentClass()
{
return typeof(UnWriteOffRequestV1Biz);
}
[DataContract]
public class UnWriteOffRequestV1Biz : BizContent
{
/// <summary>
/// 机构编号 </summary>
[DataMember]
public string org_id { get; set; }
/// <summary>
/// 账单编号 </summary>
[DataMember]
public string bill_id { get; set; }
}
}
}
......@@ -3,12 +3,19 @@ using Kivii.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using static Com.Bocom.OpenApi.QueryContractOrderRequestV2;
namespace Com.Bocom.OpenApi
{
/// <summary>
/// 1.1 账单核销结果查询
/// 1.1.1 功能描述:
/// 智慧记账产品账单核销结果查询接口,获取账单和流水的核销结果。
/// </summary>
public class WriteOffResultRequestV2 : BocomRequest<WriteOffResultResponseV2>
{
......@@ -44,6 +51,7 @@ namespace Com.Bocom.OpenApi
return typeof(WriteOffResultRequestV2Biz);
}
[DataContract]
public class WriteOffResultRequestV2Biz : BizContent
{
......@@ -51,44 +59,44 @@ namespace Com.Bocom.OpenApi
/// 机构编号 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("org_id") private String orgId;
[Alias("org_id")]
public string orgId { get; set; }
[DataMember]
public string org_id { get; set; }
/// <summary>
/// 子机构编号 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("sub_org_id") private String subOrgId;
//internal string subOrgId;
[Alias("sub_org_id")]
public string subOrgId { get; set; }
[DataMember]
public string sub_org_id { get; set; }
/// <summary>
/// 核销日期 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("write_off_dte") private String writeOffDte;
//internal string writeOffDte;
[Alias("write_off_dte")]
public string writeOffDte { get; set; }
[DataMember]
public string write_off_dte { get; set; }
/// <summary>
/// 核销编号 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("write_off_no") private String writeOffNo;
//internal string writeOffNo;
[Alias("write_off_no")]
public string writeOffNo { get; set; }
[DataMember]
public string write_off_no { get; set; }
/// <summary>
/// 页数 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pageablerequest_pagenum") private String pageablerequestPagenum;
//internal string pageablerequestPagenum;
[Alias("pageablerequest_pagenum")]
public string pageablerequestPagenum { get; set; }
[DataMember]
public string pageablerequest_pagenum { get; set; }
/// <summary>
/// 每页显示数据数 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pageablerequest_pagesize") private String pageablerequestPagesize;
//internal string pageablerequestPagesize;
[Alias("pageablerequest_pagesize")]
public string pageablerequestPagesize { get; set; }
[DataMember]
public string pageablerequest_pagesize { get; set; }
}
}
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Com.Bocom.OpenApi
{
public class DelContractOrderResponseV1: BocomResponse
{
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Com.Bocom.OpenApi
{
public class MPNG210001ResponseV1 : BocomResponse
{
/// <summary>
/// "rsp_body" </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("rsp_body") private RspBody rspBody;
public RspBody rsp_body { get; set; }
//* "rsp_head"
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("rsp_head") private RspHead rspHead;
public RspHead rsp_head { get; set; }
public class RspHead
{
/// <summary>
/// 交易标识 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("trans_code") private String transCode;
public string trans_code { get; set; }
/// <summary>
/// 返回码 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("response_code") private String responseCode;
public string response_code { get; set; }
/// <summary>
/// 交易状态 P-处理中 F-失败 S-成功 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("response_status") private String responseStatus;
public string response_status { get; set; }
/// <summary>
/// 响应时间 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("response_time") private String responseTime;
public string response_time { get; set; }
/// <summary>
/// 返回码描述 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("response_msg") private String responseMsg;
public string response_msg { get; set; }
}
public class RspBody
{
/// <summary>
/// 门店识别号 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("shop_id") private String shopId;
public string shop_id { get; set; }
/// <summary>
/// 商户交易编号 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("pay_mer_tran_no") private String payMerTranNo;
public string pay_mer_tran_no { get; set; }
/// <summary>
/// 收款二维码文本 </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @JsonProperty("display_code_text") private String displayCodeText;
public string display_code_text { get; set; }
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Com.Bocom.OpenApi
{
public class UnWriteOffResponseV1 : BocomResponse
{
}
}
......@@ -2,4 +2,5 @@
<packages>
<package id="Kivii.Common" version="5.6.2023.4000" targetFramework="net45" />
<package id="Kivii.Core" version="5.6.2023.4140" targetFramework="net45" />
<package id="Kivii.Linq" version="5.6.2023.4200" targetFramework="net45" />
</packages>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment