AddOpenDivideAccountsUtil.cs 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using LitJson;
  6. using MySystem;
  7. using MySystem.Models.Main;
  8. namespace MySystem
  9. {
  10. /// <summary>
  11. /// 添加分账接收方账户参数赋值
  12. /// </summary>
  13. public class AddOpenDivideAccountsUtil
  14. {
  15. public static AddOpenDivideAccounts AddValue(MerchantAddInfo AddInfo)
  16. {
  17. AddOpenDivideAccounts addOpenDivideAccounts = new AddOpenDivideAccounts();
  18. // addOpenDivideAccounts.acctNo = ""; //非必须 用户编码(创建分账接收方失败或者审核驳回时,修改信息时填写)
  19. addOpenDivideAccounts.userType = "1"; //必须 用户类型 1-企业,2-个人
  20. addOpenDivideAccounts.userName = "蒲晓敏"; //必须 用户名,个人填写身份证姓名,企业填写法人姓名
  21. addOpenDivideAccounts.compNm = "四川省润观米科技有限公司"; //企业必须 企业名称
  22. // addOpenDivideAccounts.mobile=""; //非必须 手机号
  23. addOpenDivideAccounts.legalCertType = "1"; //必须 法人证明类型 1身份证 2护照 3港澳台居民通行证(废弃不用)4外国人永久居留证 5香港来往内地通行证 6澳门来往内地通行证 7台湾同胞来往内地通行证
  24. addOpenDivideAccounts.userCardNo = "511304198607137628"; //必须 身份证号
  25. addOpenDivideAccounts.userCardStartDate = "20150302"; //必须 法人证件开始日期
  26. addOpenDivideAccounts.userCardEndDate = "20350302"; //必须 法人证件结束日期
  27. addOpenDivideAccounts.acctNm = "四川省润观米科技有限公司"; //必须 账户名称
  28. addOpenDivideAccounts.acctType = "0"; //必须 账户类型(0-对公、1-对私)
  29. addOpenDivideAccounts.bankCardNo = "11360000000324886"; //必须 银行卡号
  30. addOpenDivideAccounts.acctBankNo = "304100040000"; //必须 总行行号
  31. addOpenDivideAccounts.acctBankNm = "华夏银行"; //必须 总行名称
  32. addOpenDivideAccounts.acctZbankNo = "304651010227"; //必须 支行行号
  33. addOpenDivideAccounts.acctZbankNm = "华夏银行股份有限公司成都天府支行"; //必须 支行名称
  34. addOpenDivideAccounts.acctZbankCode = "510122"; //必须 开户支行地区码
  35. // addOpenDivideAccounts.reservedPhone=""; //非必须 预留手机号。个人和企业对私必填
  36. addOpenDivideAccounts.licNo = "91510106MA6C7RRTXR"; //企业必须 营业执照号
  37. addOpenDivideAccounts.licStartDate = "20171212"; //企业必须 营业执照开始日期
  38. addOpenDivideAccounts.licEndDate = "长期"; //企业必须 营业执照结束日期
  39. addOpenDivideAccounts.businessAddressCode = "510106"; //企业必须 企业经营地区码
  40. addOpenDivideAccounts.businessAddress = "四川省成都市金牛区星辉西路9号1栋7层11号"; //企业必须 企业经营详细地址
  41. addOpenDivideAccounts.regAddressCode = "510106"; //企业必须 企业注册地址地区码
  42. addOpenDivideAccounts.regAddress = "四川省成都市金牛区星辉西路9号1栋7层11号"; //企业必须 企业注册详细地址
  43. // addOpenDivideAccounts.compTel=""; //非必须 固定电话
  44. addOpenDivideAccounts.businessMcc = "4816"; //企业必须 经营范围mcc
  45. List<ImageItem> imageList = new List<ImageItem>();
  46. ImageItem imageItem = new ImageItem();
  47. //身份证正面
  48. JsonData tokenInfo = new JsonData();
  49. tokenInfo = JsonMapper.ToObject(HaoDaHelper.Instance.GetToken("/static/upload/2023/8/14/1.jpg".Substring("/static/upload/2023/8/14/1.jpg".LastIndexOf("/")).Trim('/'), "0"));
  50. if (tokenInfo["code"].ToString() == "1")
  51. {
  52. var returnInfo = HaoDaHelper.Instance.ReturnFileName(tokenInfo["token"].ToString(), "/static/upload/2023/8/14/1.jpg");
  53. if (returnInfo != "false")
  54. {
  55. imageItem = new ImageItem();
  56. imageItem.name = "idCardFront";
  57. imageItem.value = returnInfo;
  58. imageList.Add(imageItem);
  59. }
  60. }
  61. //身份证反面
  62. tokenInfo = JsonMapper.ToObject(HaoDaHelper.Instance.GetToken("/static/upload/2023/8/14/2.jpg".Substring("/static/upload/2023/8/14/2.jpg".LastIndexOf("/")).Trim('/'), "0"));
  63. if (tokenInfo["code"].ToString() == "1")
  64. {
  65. var returnInfo = HaoDaHelper.Instance.ReturnFileName(tokenInfo["token"].ToString(), "/static/upload/2023/8/14/2.jpg");
  66. if (returnInfo != "false")
  67. {
  68. imageItem = new ImageItem();
  69. imageItem.name = "idCardBack";
  70. imageItem.value = returnInfo;
  71. imageList.Add(imageItem);
  72. }
  73. }
  74. //法人手持身份证正面
  75. tokenInfo = JsonMapper.ToObject(HaoDaHelper.Instance.GetToken("/static/upload/2023/8/14/3.jpg".Substring("/static/upload/2023/8/14/3.jpg".LastIndexOf("/")).Trim('/'), "0"));
  76. if (tokenInfo["code"].ToString() == "1")
  77. {
  78. var returnInfo = HaoDaHelper.Instance.ReturnFileName(tokenInfo["token"].ToString(), "/static/upload/2023/8/14/3.jpg");
  79. if (returnInfo != "false")
  80. {
  81. imageItem = new ImageItem();
  82. imageItem.name = "personWithIdCard";
  83. imageItem.value = returnInfo;
  84. imageList.Add(imageItem);
  85. }
  86. }
  87. //结算银行卡照片
  88. tokenInfo = JsonMapper.ToObject(HaoDaHelper.Instance.GetToken("/static/upload/2023/8/14/00.jpg".Substring("/static/upload/2023/8/14/00.jpg".LastIndexOf("/")).Trim('/'), "0"));
  89. if (tokenInfo["code"].ToString() == "1")
  90. {
  91. var returnInfo = HaoDaHelper.Instance.ReturnFileName(tokenInfo["token"].ToString(), "/static/upload/2023/8/14/00.jpg");
  92. if (returnInfo != "false")
  93. {
  94. imageItem = new ImageItem();
  95. imageItem.name = "bankCard";
  96. imageItem.value = returnInfo;
  97. imageList.Add(imageItem);
  98. }
  99. }
  100. //营业执照
  101. tokenInfo = JsonMapper.ToObject(HaoDaHelper.Instance.GetToken("/static/upload/2023/8/14/5.jpg".Substring("/static/upload/2023/8/14/5.jpg".LastIndexOf("/")).Trim('/'), "0"));
  102. if (tokenInfo["code"].ToString() == "1")
  103. {
  104. var returnInfo = HaoDaHelper.Instance.ReturnFileName(tokenInfo["token"].ToString(), "/static/upload/2023/8/14/5.jpg");
  105. if (returnInfo != "false")
  106. {
  107. imageItem = new ImageItem();
  108. imageItem.name = "license";
  109. imageItem.value = returnInfo;
  110. imageList.Add(imageItem);
  111. }
  112. }
  113. //开户许可证(对公凭证)
  114. tokenInfo = JsonMapper.ToObject(HaoDaHelper.Instance.GetToken("/static/upload/2023/8/14/00.jpg".Substring("/static/upload/2023/8/14/00.jpg".LastIndexOf("/")).Trim('/'), "0"));
  115. if (tokenInfo["code"].ToString() == "1")
  116. {
  117. var returnInfo = HaoDaHelper.Instance.ReturnFileName(tokenInfo["token"].ToString(), "/static/upload/2023/8/14/00.jpg");
  118. if (returnInfo != "false")
  119. {
  120. imageItem = new ImageItem();
  121. imageItem.name = "openAccountLicenses";
  122. imageItem.value = returnInfo;
  123. imageList.Add(imageItem);
  124. }
  125. }
  126. addOpenDivideAccounts.images = imageList; //图片
  127. return addOpenDivideAccounts;
  128. }
  129. }
  130. }