using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using MySystem; using MySystem.Models.Main; namespace MySystem { /// /// 好哒新建商户参数赋值 /// public class AddNewMerchantSetUtil { public static AddNewMerchant SetValue(MerchantAddInfo AddInfo) { AddNewMerchant addNewMerchant = new AddNewMerchant(); addNewMerchant.brh = "ceshi"; //机构号 addNewMerchant.mchtNo = AddInfo.SubMchid; //收款商户号 addNewMerchant.accountNo = AddInfo.AccountNumber; //银行卡号 addNewMerchant.accountName = AddInfo.AccountName; //开户名(账户名称) addNewMerchant.accountType = AddInfo.BankAccountType; //账户类型 1 对私 0 对公 addNewMerchant.zbankNo = AddInfo.BankBranchId; //开户银行支行号 参考支行号表(联系对接人提供) addNewMerchant.zbankRegionCode = AddInfo.BankAddressCode; //开户银行支行区域码 参考区域码表(联系对接人提供) if (AddInfo.SubjectType == "0") { addNewMerchant.openBankAccName = AddInfo.AccountBank; //开户许可证-开户名 企业商户必填(个体工商户对私不填) addNewMerchant.openBankAccout = AddInfo.AccountNumber; //开户许可证-银行卡号 企业商户必填(个体工商户对私不填) addNewMerchant.openBankRegionCode = AddInfo.BankAddressCode; //开户许可证-银行地区码 企业商户必填(个体工商户对私不填) addNewMerchant.openCollectBankCode = AddInfo.BankBranchId; //开户许可证-银行代码 企业商户必填(个体工商户对私不填) addNewMerchant.openUnionNo = AddInfo.BankName; //开户许可证-开户支行 企业商户必填(个体工商户对私不填) } addNewMerchant.channelKind = AddInfo.ChannelKind; //商户类型 有执照填000002无执照填000001 addNewMerchant.mchtName = AddInfo.CertMerchantName; //商户名称 无营业执照商户命名规则:商户_姓名 有营业执照商户命名规则:与营业执照商户名一致 addNewMerchant.mchtCnShortName = AddInfo.MerchantShortname; //商户简称 addNewMerchant.address = AddInfo.BizStoreAddress; //商户门店地址 详细地址即可,不需要附带省市区 addNewMerchant.alipayRate = "0.38"; //支付宝费率,值0.38,0.33等 addNewMerchant.wechatPayRate = "0.38"; //微信费率,值0.38,0.33等 addNewMerchant.unionPayRate = "0.38"; //银联二维码费率,值0.38,0.33等 addNewMerchant.areaNo = AddInfo.BizAddressCode; //经营地区区域码 参考区域码表,填6位地区码(联系对接人提供) addNewMerchant.businessId = AddInfo.SalesScenesType; //经营范围 参考经营范围表(联系对接人提供) addNewMerchant.licNo = AddInfo.LicenseNumber; //营业执照号 有营业执照必填 addNewMerchant.usinessTerm = AddInfo.PeriodBegin.Value.ToString("yyyyMMdd") + "-" + AddInfo.PeriodEnd.Value.ToString("yyyyMMdd"); //营业执照有效期 格式:20200101-20300101,长期的填 20200101-99991231 addNewMerchant.licenceType = AddInfo.SubjectType; //营业执照类型 0-企业法人营业执照 1-个体工商户营业执照 2-党政,机关及事业单位 3-其他组织 addNewMerchant.userCardNo = AddInfo.IdCardNumber; //商户法人身份证号 addNewMerchant.userPhone = AddInfo.MobilePhone; //法人手机号 if (AddInfo.ChannelKind == "000001") { addNewMerchant.resserveMobile = AddInfo.MobilePhone; //银行预留手机号 channelkind为000001时必填 } addNewMerchant.userName = AddInfo.CertLegalPerson; //商户法人姓名 if (AddInfo.CardPeriodEnd.Value.Year == 2050) { addNewMerchant.periodValidity = AddInfo.CardPeriodBegin.Value.ToString("yyyyMMdd") + "-" + "长期"; //法人身份证有效期 格式:20150101-20200101,若结束日期为长期填20150101-长期 } else { addNewMerchant.periodValidity = AddInfo.CardPeriodBegin.Value.ToString("yyyyMMdd") + "-" + AddInfo.CardPeriodEnd.Value.ToString("yyyyMMdd"); //法人身份证有效期 格式:20150101-20200101,若结束日期为长期填20150101-长期 } List imageList = new List(); ImageItem imageItem = new ImageItem(); //开户许可证 if (!string.IsNullOrEmpty(AddInfo.OpenAccountLicenses)) { imageItem.name = "openAccountLicenses"; imageItem.value = AddInfo.OpenAccountLicenses; imageList.Add(imageItem); } //租赁协议 if (!string.IsNullOrEmpty(AddInfo.RentAgreement)) { imageItem = new ImageItem(); imageItem.name = "rentAgreement"; imageItem.value = AddInfo.RentAgreement; imageList.Add(imageItem); } //盒伙人商户合影 if (!string.IsNullOrEmpty(AddInfo.OperatorMcht)) { imageItem = new ImageItem(); imageItem.name = "operatorMcht"; imageItem.value = AddInfo.OperatorMcht; imageList.Add(imageItem); } //营业执照 if (!string.IsNullOrEmpty(AddInfo.LicenseCopy)) { imageItem = new ImageItem(); imageItem.name = "license"; imageItem.value = AddInfo.LicenseCopy; imageList.Add(imageItem); } //委托结算协议 if (!string.IsNullOrEmpty(AddInfo.AgentProtocol)) { imageItem = new ImageItem(); imageItem.name = "agentProtocol"; imageItem.value = AddInfo.AgentProtocol; imageList.Add(imageItem); } //商户签名图片 if (!string.IsNullOrEmpty(AddInfo.SignaturePicture)) { imageItem = new ImageItem(); imageItem.name = "signaturePicture"; imageItem.value = AddInfo.SignaturePicture; imageList.Add(imageItem); } //辅助照片 if (!string.IsNullOrEmpty(AddInfo.Support)) { imageItem = new ImageItem(); imageItem.name = "support"; imageItem.value = AddInfo.Support; imageList.Add(imageItem); } //门头照 if (!string.IsNullOrEmpty(AddInfo.StoreEntrancePic)) { imageItem = new ImageItem(); imageItem.name = "shopFrontImg"; imageItem.value = AddInfo.StoreEntrancePic; imageList.Add(imageItem); } //收银台 if (!string.IsNullOrEmpty(AddInfo.CheckstandImg)) { imageItem = new ImageItem(); imageItem.name = "checkstandImg"; imageItem.value = AddInfo.CheckstandImg; imageList.Add(imageItem); } //店铺全景 if (!string.IsNullOrEmpty(AddInfo.IndoorPic)) { imageItem = new ImageItem(); imageItem.name = "shopInnerImg"; imageItem.value = AddInfo.IndoorPic; imageList.Add(imageItem); } //商品照片 if (!string.IsNullOrEmpty(AddInfo.ProductImg)) { imageItem = new ImageItem(); imageItem.name = "productImg"; imageItem.value = AddInfo.ProductImg; imageList.Add(imageItem); } //合同签名 if (!string.IsNullOrEmpty(AddInfo.Agreement)) { imageItem = new ImageItem(); imageItem.name = "agreement"; imageItem.value = AddInfo.Agreement; imageList.Add(imageItem); } //税务登记证 if (!string.IsNullOrEmpty(AddInfo.TaxImage)) { imageItem = new ImageItem(); imageItem.name = "taxImage"; imageItem.value = AddInfo.TaxImage; imageList.Add(imageItem); } //组织机构证照片 if (!string.IsNullOrEmpty(AddInfo.OrganizationCopy)) { imageItem = new ImageItem(); imageItem.name = "orgImage"; imageItem.value = AddInfo.OrganizationCopy; imageList.Add(imageItem); } //行业许可证 if (!string.IsNullOrEmpty(AddInfo.IndustryLicense1)) { imageItem = new ImageItem(); imageItem.name = "industryLicense1"; imageItem.value = AddInfo.IndustryLicense1; imageList.Add(imageItem); } //正面人像图片 if (!string.IsNullOrEmpty(AddInfo.FaceRecognition)) { imageItem = new ImageItem(); imageItem.name = "faceRecognition"; imageItem.value = AddInfo.FaceRecognition; imageList.Add(imageItem); } //补充资料 if (!string.IsNullOrEmpty(AddInfo.Extra1)) { imageItem = new ImageItem(); imageItem.name = "extra1"; imageItem.value = AddInfo.Extra1; imageList.Add(imageItem); } //收款人银行卡照片 if (!string.IsNullOrEmpty(AddInfo.BankCard)) { imageItem = new ImageItem(); imageItem.name = "bankCard"; imageItem.value = AddInfo.BankCard; imageList.Add(imageItem); } //法人手持身份证正面 if (!string.IsNullOrEmpty(AddInfo.PersonWithIdCard)) { imageItem = new ImageItem(); imageItem.name = "personWithIdCard"; imageItem.value = AddInfo.PersonWithIdCard; imageList.Add(imageItem); } //对公凭证 if (!string.IsNullOrEmpty(AddInfo.TakeCreditCard)) { imageItem = new ImageItem(); imageItem.name = "takeCreditCard"; imageItem.value = AddInfo.TakeCreditCard; imageList.Add(imageItem); } addNewMerchant.images = imageList; //图片 return addNewMerchant; } } }