123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.AspNetCore.Http;
- using Microsoft.Extensions.Logging;
- using Microsoft.Extensions.Options;
- using Microsoft.AspNetCore.Authorization;
- using System.Web;
- using MySystem.MainModels;
- using LitJson;
- using Library;
- namespace MySystem.Areas.Api.Controllers.v1
- {
- [Area("Api")]
- [Route("Api/v1/[controller]/[action]")]
- public class MerchantAddInfoController : BaseController
- {
- public MerchantAddInfoController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
- {
- }
- #region 创客-首页-新增商户
- [Authorize]
- public JsonResult Add(string value)
- {
- value = DesDecrypt(value);
- JsonData data = JsonMapper.ToObject(value);
- AppResultJson result = AddDo(value);
- return Json(new AppResultJson() { Status = result.Status, Info = result.Info, Data = result.Data });
- }
- public AppResultJson AddDo(string value)
- {
- JsonData data = JsonMapper.ToObject(value);
- string ContactName = data["ContactName"].ToString();
- string ContactIdNumber = data["ContactIdNumber"].ToString();
- string MobilePhone = data["MobilePhone"].ToString();
- string ContactEmail = data["ContactEmail"].ToString();
- string SubjectType = data["SubjectType"].ToString();
- string LicenseCopy = data["LicenseCopy"].ToString();
- string LicenseNumber = data["LicenseNumber"].ToString();
- string CertMerchantName = data["CertMerchantName"].ToString();
- string CertLegalPerson = data["CertLegalPerson"].ToString();
- string IdCardCopy = data["IdCardCopy"].ToString();
- string IdCardNational = data["IdCardNational"].ToString();
- string IdCardName = data["IdCardName"].ToString();
- string IdCardNumber = data["IdCardNumber"].ToString();
- string IdCardAddress = data["IdCardAddress"].ToString();
- string CardPeriodBeginString = data["CardPeriodBegin"].ToString();
- if (string.IsNullOrEmpty(CardPeriodBeginString))
- {
- CardPeriodBeginString = "1900-01-01";
- }
- DateTime CardPeriodBegin = DateTime.Parse(CardPeriodBeginString);
- string CardPeriodEndString = data["CardPeriodEnd"].ToString();
- if (string.IsNullOrEmpty(CardPeriodEndString))
- {
- CardPeriodEndString = "1900-01-01";
- }
- DateTime CardPeriodEnd = DateTime.Parse(CardPeriodEndString);
- string ServicePhone = data["ServicePhone"].ToString();
- string BizStoreName = data["BizStoreName"].ToString();
- string BizAddressCode = data["BizAddressCode"].ToString();
- string BizStoreAddress = data["BizStoreAddress"].ToString();
- string StoreEntrancePic = data["StoreEntrancePic"].ToString();
- string IndoorPic = data["IndoorPic"].ToString();
- string QualificationType = data["QualificationType"].ToString();
- string SettlementId = data["SettlementId"].ToString();
- string AlipayMccCode = "";
- if (!string.IsNullOrEmpty(SettlementId))
- {
- AlipayMccCode = SettlementId.Substring(SettlementId.IndexOf("_") + 1);
- SettlementId = SettlementId.Substring(0, SettlementId.IndexOf("_"));
- }
- string AlipayAccount = data["AlipayAccount"].ToString();
- string BankAccountType = data["BankAccountType"].ToString();
- string AccountName = data["AccountName"].ToString();
- string AccountBank = data["AccountBank"].ToString();
- string BankAddressCode = data["BankAddressCode"].ToString();
- string MerchantShortname = data["MerchantShortname"].ToString();
- string BankName = data["BankName"].ToString();
- string AccountNumber = data["AccountNumber"].ToString();
- string Qualifications = data["Qualifications"].ToString();
- int Finish = int.Parse(function.CheckInt(data["Finish"].ToString()));
- int UserId = int.Parse(function.CheckInt(data["UserId"].ToString()));
- int MerchantAddInfoId = int.Parse(function.CheckInt(data["Id"].ToString()));
- string BankBranchId = "";
- if (Finish == 1)
- {
- OpenBankTable openBank = maindb.OpenBankTable.FirstOrDefault(m => m.BankName == BankName);
- if (openBank == null)
- {
- return new AppResultJson() { Status = "-1", Info = "开户银行全称不正确" };
- }
- BankBranchId = openBank.BankCode;
- }
- Dictionary<string, object> Obj = new Dictionary<string, object>();
- MerchantAddInfo query = maindb.MerchantAddInfo.FirstOrDefault(m => m.CertMerchantName == CertMerchantName);
- if (query == null)
- {
- query = maindb.MerchantAddInfo.Add(new MerchantAddInfo()
- {
- CreateDate = DateTime.Now,
- CertMerchantName = CertMerchantName,
- }).Entity;
- maindb.SaveChanges();
- }
- query.UpdateDate = DateTime.Now;
- query.ContactName = ContactName;
- query.ContactIdNumber = ContactIdNumber;
- query.MobilePhone = MobilePhone;
- query.ContactEmail = ContactEmail;
- query.SubjectType = SubjectType;
- query.LicenseCopy = LicenseCopy;
- query.LicenseNumber = LicenseNumber;
- query.LegalPerson = CertLegalPerson;
- query.CertMerchantName = CertMerchantName;
- query.CertLegalPerson = CertLegalPerson;
- query.ServicePhone = ServicePhone;
- query.BizStoreName = BizStoreName;
- query.BizAddressCode = BizAddressCode;
- query.BizStoreAddress = BizStoreAddress;
- query.StoreEntrancePic = StoreEntrancePic;
- query.IndoorPic = IndoorPic;
- query.QualificationType = QualificationType;
- query.SettlementId = SettlementId;
- query.BankAccountType = BankAccountType;
- query.AccountName = AccountName;
- query.AccountBank = AccountBank;
- query.BankAddressCode = BankAddressCode;
- query.BankName = BankName;
- query.BankBranchId = BankBranchId;
- query.AccountNumber = AccountNumber;
- query.IdCardCopy = IdCardCopy;
- query.IdCardNational = IdCardNational;
- query.IdCardName = IdCardName;
- query.IdCardNumber = IdCardNumber;
- query.IdCardAddress = IdCardAddress;
- query.CardPeriodBegin = CardPeriodBegin;
- query.CardPeriodEnd = CardPeriodEnd;
- query.MerchantShortname = MerchantShortname;
- query.Qualifications = Qualifications;
- query.ActivitiesId = "20191030111cff5b5e";
- query.ActivitiesRate = "0.38";
- query.CreateMan = AlipayAccount;
- query.UpdateMan = AlipayMccCode;
- MerchantInfo merchant = maindb.MerchantInfo.FirstOrDefault(m => m.Id == query.Id);
- if (merchant == null)
- {
- merchant = maindb.MerchantInfo.Add(new MerchantInfo()
- {
- Id = query.Id,
- CreateDate = DateTime.Now,
- }).Entity;
- maindb.SaveChanges();
- }
- merchant.UpdateDate = DateTime.Now;
- merchant.UserId = UserId;
- merchant.Name = CertMerchantName;
- merchant.Mobile = MobilePhone;
- merchant.Areas = BizAddressCode;
- merchant.Address = BizStoreAddress;
- if (Finish == 1)
- {
- merchant.Sort = 1;
-
- RedisDbconn.Instance.AddList("MerchantConfirmQueue", "{\"MerchantId\":\"" + merchant.Id + "\"}");
- }
- maindb.SaveChanges();
- Obj.Add("Id", MerchantAddInfoId);
- return new AppResultJson() { Status = "1", Info = "", Data = Obj };
- }
- #endregion
- #region 创客-首页-商户进件详情
-
- public JsonResult Detail(string value)
- {
- value = DesDecrypt(value);
- JsonData data = JsonMapper.ToObject(value);
- Dictionary<string, object> Obj = DetailDo(value);
- return Json(new AppResultJson() { Status = "1", Info = "", Data = Obj });
- }
- public Dictionary<string, object> DetailDo(string value)
- {
- JsonData data = JsonMapper.ToObject(value);
- Dictionary<string, object> Obj = new Dictionary<string, object>();
- int Id = int.Parse(function.CheckInt(data["Id"].ToString()));
- Dictionary<string, string> Subjects = GetSubjects();
- Dictionary<string, string> AccountTypes = GetAccountTypes();
- MerchantAddInfo query = MerchantAddInfoDbconn.Instance.Get(Id) ?? new MerchantAddInfo();
- List<SettleData> Settles = GetSettles(query.SubjectType);
- Obj.Add("Kind", 1);
- Obj.Add("ContactName", query.ContactName);
- Obj.Add("ContactIdNumber", query.ContactIdNumber);
- Obj.Add("OpenId", query.OpenId);
- Obj.Add("MobilePhone", query.MobilePhone);
- Obj.Add("ContactEmail", query.ContactEmail);
- Obj.Add("SubjectType", query.SubjectType);
- if (Subjects.ContainsKey(function.CheckNull(query.SubjectType)))
- {
- Obj.Add("SubjectTypeName", Subjects[function.CheckNull(query.SubjectType)]);
- }
- else
- {
- Obj.Add("SubjectTypeName", "");
- }
- Obj.Add("LicenseCopy", query.LicenseCopy);
- Obj.Add("LicenseNumber", query.LicenseNumber);
- Obj.Add("LegalPerson", query.LegalPerson);
- Obj.Add("CertCopy", query.CertCopy);
- Obj.Add("CertType", query.CertType);
- Obj.Add("CertNumber", query.CertNumber);
- Obj.Add("CertMerchantName", query.CertMerchantName);
- Obj.Add("CompanyAddress", query.CompanyAddress);
- Obj.Add("CertLegalPerson", query.CertLegalPerson);
- Obj.Add("PeriodBegin", query.PeriodBegin == null ? "" : query.PeriodBegin.Value.ToString("yyyy-MM-dd HH:mm:ss"));
- Obj.Add("PeriodEnd", query.PeriodEnd == null ? "" : query.PeriodEnd.Value.ToString("yyyy-MM-dd HH:mm:ss"));
- Obj.Add("OrganizationCopy", query.OrganizationCopy);
- Obj.Add("OrganizationCode", query.OrganizationCode);
- Obj.Add("OrgPeriodBegin", query.OrgPeriodBegin == null ? "" : query.OrgPeriodBegin.Value.ToString("yyyy-MM-dd HH:mm:ss"));
- Obj.Add("OrgPeriodEnd", query.OrgPeriodEnd == null ? "" : query.OrgPeriodEnd.Value.ToString("yyyy-MM-dd HH:mm:ss"));
- Obj.Add("CertificateLetterCopy", query.CertificateLetterCopy);
- Obj.Add("IdDocType", query.IdDocType);
- Obj.Add("Owner", query.Owner);
- Obj.Add("UboInfoIdType", query.UboInfoIdType);
- Obj.Add("UboInfoIdCardCopy", query.UboInfoIdCardCopy);
- Obj.Add("UboInfoIdCardNational", query.UboInfoIdCardNational);
- Obj.Add("UboInfoIdDocCopy", query.UboInfoIdDocCopy);
- Obj.Add("UboInfoName", query.UboInfoName);
- Obj.Add("UboInfoIdNumber", query.UboInfoIdNumber);
- Obj.Add("UboInfoIdPeriodBegin", query.UboInfoIdPeriodBegin == null ? "" : query.UboInfoIdPeriodBegin.Value.ToString("yyyy-MM-dd HH:mm:ss"));
- Obj.Add("UboInfoIdPeriodEnd", query.UboInfoIdPeriodEnd == null ? "" : query.UboInfoIdPeriodEnd.Value.ToString("yyyy-MM-dd HH:mm:ss"));
- Obj.Add("MerchantShortname", query.MerchantShortname);
- Obj.Add("ServicePhone", query.ServicePhone);
- Obj.Add("SalesScenesType", query.SalesScenesType);
- Obj.Add("BizStoreName", query.BizStoreName);
- Obj.Add("BizAddressCode", query.BizAddressCode);
- Obj.Add("BizStoreAddress", query.BizStoreAddress);
- Obj.Add("StoreEntrancePic", query.StoreEntrancePic);
- Obj.Add("IndoorPic", query.IndoorPic);
- Obj.Add("BizSubAppid", query.BizSubAppid);
- Obj.Add("MpAppid", query.MpAppid);
- Obj.Add("MpSubAppid", query.MpSubAppid);
- Obj.Add("MpPics", query.MpPics);
- Obj.Add("MiniProgramAppid", query.MiniProgramAppid);
- Obj.Add("MiniProgramSubAppid", query.MiniProgramSubAppid);
- Obj.Add("MiniProgramPics", query.MiniProgramPics);
- Obj.Add("AppAppid", query.AppAppid);
- Obj.Add("AppSubAppid", query.AppSubAppid);
- Obj.Add("AppPics", query.AppPics);
- Obj.Add("WebDomain", query.WebDomain);
- Obj.Add("WebAuthorisation", query.WebAuthorisation);
- Obj.Add("WebAppId", query.WebAppId);
- Obj.Add("SubCorpId", query.SubCorpId);
- Obj.Add("WeworkPics", query.WeworkPics);
- Obj.Add("SettlementId", query.SettlementId + "_" + query.UpdateMan);
- Obj.Add("QualificationType", query.QualificationType);
- SettleData item = Settles.FirstOrDefault(m => m.value == query.QualificationType);
- if (item != null)
- {
- Obj.Add("QualificationTypeName", item.ptext + "," + item.text);
- }
- else
- {
- Obj.Add("QualificationTypeName", "");
- }
- Obj.Add("Qualifications", query.Qualifications);
- Obj.Add("ActivitiesId", query.ActivitiesId);
- Obj.Add("ActivitiesRate", query.ActivitiesRate);
- Obj.Add("BankAccountType", query.BankAccountType);
- if (AccountTypes.ContainsKey(function.CheckNull(query.BankAccountType)))
- {
- Obj.Add("BankAccountTypeName", AccountTypes[function.CheckNull(query.BankAccountType)]);
- }
- else
- {
- Obj.Add("BankAccountTypeName", "");
- }
- Obj.Add("AccountName", query.AccountName);
- Obj.Add("AccountBank", query.AccountBank);
- Obj.Add("BankAddressCode", query.BankAddressCode);
- Obj.Add("BankBranchId", query.BankBranchId);
- Obj.Add("BankName", query.BankName);
- Obj.Add("AccountNumber", query.AccountNumber);
- Obj.Add("ApplymentId", query.ApplymentId);
- Obj.Add("SubMchid", query.SubMchid);
- Obj.Add("SignUrl", query.SignUrl);
- Obj.Add("ApplymentState", query.ApplymentState);
- Obj.Add("AuditDetail", query.AuditDetail);
- Obj.Add("IdCardCopy", query.IdCardCopy);
- Obj.Add("IdCardNational", query.IdCardNational);
- Obj.Add("IdCardName", query.IdCardName);
- Obj.Add("IdCardNumber", query.IdCardNumber);
- Obj.Add("IdCardAddress", query.IdCardAddress);
- Obj.Add("CardPeriodBegin", query.CardPeriodBegin == null ? "" : query.CardPeriodBegin.Value.ToString("yyyy-MM-dd HH:mm:ss"));
- Obj.Add("CardPeriodEnd", query.CardPeriodEnd == null ? "" : query.CardPeriodEnd.Value.ToString("yyyy-MM-dd HH:mm:ss"));
- Obj.Add("Id", query.Id);
- Obj.Add("Status", query.Status);
- Obj.Add("CreateDate", query.CreateDate);
- Obj.Add("AlipayAccount", query.CreateMan);
- return Obj;
- }
- #endregion
- #region 创客-首页-进件选项接口
- [Authorize]
- public JsonResult Options(string value)
- {
- value = DesDecrypt(value);
- JsonData data = JsonMapper.ToObject(value);
- List<Dictionary<string, object>> dataList = OptionsDo(value);
- return Json(new AppResultJson() { Status = "1", Info = "", Data = dataList });
- }
- public List<Dictionary<string, object>> OptionsDo(string value)
- {
- JsonData data = JsonMapper.ToObject(value);
- string Kind = data["Kind"].ToString();
- int PageSize = int.Parse(function.CheckInt(data["PageSize"].ToString()));
- int PageNum = int.Parse(function.CheckInt(data["PageNum"].ToString()));
- List<Dictionary<string, object>> dataList = new List<Dictionary<string, object>>();
- if (Kind == "2")
- {
- dataList = GetPersonSettles();
- }
- else if (Kind == "21")
- {
- dataList = GetBusinessSettles();
- }
- else
- {
- Dictionary<string, string> query = new Dictionary<string, string>();
- if (Kind == "1")
- {
- query = GetSubjects();
- }
- else if (Kind == "3")
- {
- query = GetAccountTypes();
- }
- else if (Kind == "4")
- {
- query = GetBanks();
- }
- foreach (string key in query.Keys)
- {
- Dictionary<string, object> curData = new Dictionary<string, object>();
- curData.Add("text", query[key]);
- curData.Add("value", key);
- dataList.Add(curData);
- }
- }
- return dataList;
- }
- public Dictionary<string, string> GetSubjects()
- {
- Dictionary<string, string> dic = new Dictionary<string, string>();
- dic.Add("SUBJECT_TYPE_INDIVIDUAL", "个体户");
- dic.Add("SUBJECT_TYPE_ENTERPRISE", "企业");
-
-
- return dic;
- }
- public List<SettleData> GetSettles(string Kind)
- {
- if (Kind == "SUBJECT_TYPE_INDIVIDUAL")
- {
- return GetPersonSettleItems();
- }
- return GetBusinessSettleItems();
- }
- public List<SettleData> GetPersonSettleItems()
- {
- List<SettleData> dic = new List<SettleData>();
- dic.Add(new SettleData() { ptext = "食品生鲜", text = "肉、禽、蛋及水产品等", value = "719", code = "A0002_B0202" });
- dic.Add(new SettleData() { ptext = "健身运动服务", text = "健身房", value = "719", code = "A0004_B0064" });
- dic.Add(new SettleData() { ptext = "健身运动服务", text = "体育场馆", value = "719", code = "A0004_B0068" });
- dic.Add(new SettleData() { ptext = "居民生活服务", text = "公共交通", value = "719", code = "A0006_B0088" });
- dic.Add(new SettleData() { ptext = "景区/酒店", text = "旅行住宿", value = "719", code = "A0010_B0157" });
- dic.Add(new SettleData() { ptext = "居民生活服务", text = "生活服务", value = "719", code = "A0003_B0116" });
- dic.Add(new SettleData() { ptext = "零售", text = "百货商城", value = "719", code = "A0002_B0017" });
- dic.Add(new SettleData() { ptext = "服饰鞋包", text = "服饰鞋包", value = "719", code = "A0002_B0026" });
- dic.Add(new SettleData() { ptext = "零售", text = "家居家纺建材", value = "719", code = "A0002_B0216" });
- dic.Add(new SettleData() { ptext = "零售", text = "母婴玩具", value = "719", code = "A0002_B0032" });
- dic.Add(new SettleData() { ptext = "零售", text = "数码家电", value = "719", code = "A0003_B0051" });
- dic.Add(new SettleData() { ptext = "零售", text = "图书音像", value = "719", code = "A0002_B0031" });
- dic.Add(new SettleData() { ptext = "居民生活服务", text = "文化玩乐宠物", value = "719", code = "A0004_B0070" });
- dic.Add(new SettleData() { ptext = "咨询/娱乐票务", text = "娱乐票务", value = "719", code = "A0004_B0065" });
- dic.Add(new SettleData() { ptext = "零售", text = "办公用品", value = "719", code = "A0002_B0203" });
- dic.Add(new SettleData() { ptext = "零售", text = "工业产品", value = "719", code = "A0002_B0042" });
- dic.Add(new SettleData() { ptext = "咨询/娱乐票务", text = "专业咨询", value = "719", code = "A0008_B0139" });
- dic.Add(new SettleData() { ptext = "其他", text = "其他类别", value = "716", code = "A0002_B0043" });
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return dic;
- }
- public List<Dictionary<string, object>> GetPersonSettles()
- {
- List<SettleData> dic = GetPersonSettleItems();
- int i = 0;
- List<Dictionary<string, object>> list = new List<Dictionary<string, object>>();
- foreach (string sub in dic.Select(m => m.ptext).Distinct().ToList())
- {
- i += 1;
- Dictionary<string, object> bigDic = new Dictionary<string, object>();
- bigDic.Add("value", i.ToString());
- bigDic.Add("text", sub);
- List<Dictionary<string, object>> children = new List<Dictionary<string, object>>();
- foreach (SettleData ssub in dic.Where(m => m.ptext == sub).ToList())
- {
- Dictionary<string, object> smallDic = new Dictionary<string, object>();
- smallDic.Add("value", ssub.value + "_" + ssub.code);
- smallDic.Add("text", ssub.text);
- smallDic.Add("special", ssub.special);
- children.Add(smallDic);
- }
- bigDic.Add("children", children);
- list.Add(bigDic);
- }
- return list;
- }
- public List<SettleData> GetBusinessSettleItems()
- {
- List<SettleData> dic = new List<SettleData>();
- dic.Add(new SettleData() { ptext = "餐饮", text = "餐饮", value = "716", code = "A0001_B0001" });
- dic.Add(new SettleData() { ptext = "食品生鲜", text = "肉、禽、蛋及水产品等", value = "716", code = "A0002_B0202" });
- dic.Add(new SettleData() { ptext = "健身运动服务", text = "健身房", value = "716", code = "A0004_B0064" });
- dic.Add(new SettleData() { ptext = "健身运动服务", text = "体育场馆", value = "716", code = "A0004_B0068" });
- dic.Add(new SettleData() { ptext = "城市公共交通", text = "公共交通", value = "716", code = "A0006_B0088" });
- dic.Add(new SettleData() { ptext = "景区/酒店", text = "旅行住宿", value = "716", code = "A0010_B0157" });
- dic.Add(new SettleData() { ptext = "居民生活服务", text = "生活服务", value = "716", code = "A0003_B0116" });
- dic.Add(new SettleData() { ptext = "零售", text = "百货商城", value = "716", code = "A0002_B0017" });
- dic.Add(new SettleData() { ptext = "服饰鞋包", text = "服饰鞋包", value = "716", code = "A0002_B0026" });
- dic.Add(new SettleData() { ptext = "零售", text = "家居家纺建材", value = "716", code = "A0002_B0216" });
- dic.Add(new SettleData() { ptext = "零售", text = "母婴玩具", value = "716", code = "A0002_B0032" });
- dic.Add(new SettleData() { ptext = "零售", text = "数码家电", value = "716", code = "A0003_B0051" });
- dic.Add(new SettleData() { ptext = "零售", text = "图书音像", value = "716", code = "A0002_B0031" });
- dic.Add(new SettleData() { ptext = "居民生活服务", text = "文化玩乐宠物", value = "716", code = "A0004_B0070" });
- dic.Add(new SettleData() { ptext = "咨询/娱乐票务", text = "娱乐票务", value = "716", code = "A0004_B0065" });
- dic.Add(new SettleData() { ptext = "零售", text = "办公用品", value = "716", code = "A0002_B0203" });
- dic.Add(new SettleData() { ptext = "零售", text = "工业产品", value = "716", code = "A0002_B0042" });
- dic.Add(new SettleData() { ptext = "婚介平台/就业信息平台/其他信息服务平台", text = "婚介服务", value = "720", code = "A0003_B0053" });
- dic.Add(new SettleData() { ptext = "零售", text = "其它类别", value = "716", code = "A0002_B0043" });
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- return dic;
- }
- public List<Dictionary<string, object>> GetBusinessSettles()
- {
- List<SettleData> dic = GetBusinessSettleItems();
- int i = 0;
- List<Dictionary<string, object>> list = new List<Dictionary<string, object>>();
- foreach (string sub in dic.Select(m => m.ptext).Distinct().ToList())
- {
- i += 1;
- Dictionary<string, object> bigDic = new Dictionary<string, object>();
- bigDic.Add("value", i.ToString());
- bigDic.Add("text", sub);
- List<Dictionary<string, object>> children = new List<Dictionary<string, object>>();
- foreach (SettleData ssub in dic.Where(m => m.ptext == sub).ToList())
- {
- Dictionary<string, object> smallDic = new Dictionary<string, object>();
- smallDic.Add("value", ssub.value + "_" + ssub.code);
- smallDic.Add("text", ssub.text);
- smallDic.Add("special", ssub.special);
- children.Add(smallDic);
- }
- bigDic.Add("children", children);
- list.Add(bigDic);
- }
- return list;
- }
- public Dictionary<string, string> GetAccountTypes()
- {
- Dictionary<string, string> dic = new Dictionary<string, string>();
- dic.Add("BANK_ACCOUNT_TYPE_CORPORATE", "对公银行账户");
- dic.Add("BANK_ACCOUNT_TYPE_PERSONAL", "经营者个人银行卡");
- return dic;
- }
- public Dictionary<string, string> GetBanks()
- {
- Dictionary<string, string> dic = new Dictionary<string, string>();
- dic.Add("工商银行", "工商银行");
- dic.Add("农业银行", "农业银行");
- dic.Add("邮储银行", "邮储银行");
- dic.Add("建设银行", "建设银行");
- dic.Add("招商银行", "招商银行");
- dic.Add("中国银行", "中国银行");
- dic.Add("交通银行", "交通银行");
- dic.Add("浦发银行", "浦发银行");
- dic.Add("广发银行", "广发银行");
- dic.Add("民生银行", "民生银行");
- dic.Add("平安银行", "平安银行");
- dic.Add("光大银行", "光大银行");
- dic.Add("兴业银行", "兴业银行");
- dic.Add("中信银行", "中信银行");
- dic.Add("上海银行", "上海银行");
- dic.Add("其他银行", "其他银行");
- return dic;
- }
- #endregion
- #region 桥接mpap2
- public JsonResult businessscope(string value)
- {
- return Json(new AppResultJson());
- }
- #endregion
- #region 检查签名是否合法,合法返回1,不合法返回提示信息
-
-
-
-
-
-
- private string CheckSign(string value, string[] signField)
- {
- JsonData json = JsonMapper.ToObject(value);
- Dictionary<string, string> dic = new Dictionary<string, string>();
- for (int i = 0; i < signField.Length; i++)
- {
- dic.Add(signField[i], json[signField[i]].ToString());
- }
- string sign = json["sign"].ToString();
- return new Sign().sign(dic, sign);
- }
- #endregion
- }
- }
|