UserAccountRecordController.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. /*
  2. * 创客账户变动记录
  3. */
  4. using System;
  5. using System.Web;
  6. using System.Collections.Generic;
  7. using System.Diagnostics;
  8. using System.Linq;
  9. using System.Data;
  10. using System.Threading.Tasks;
  11. using Microsoft.AspNetCore.Mvc;
  12. using Microsoft.AspNetCore.Http;
  13. using Microsoft.Extensions.Logging;
  14. using Microsoft.Extensions.Options;
  15. using MySystem.Models;
  16. using Library;
  17. using LitJson;
  18. using MySystemLib;
  19. namespace MySystem.Areas.Admin.Controllers
  20. {
  21. [Area("Admin")]
  22. [Route("Admin/[controller]/[action]")]
  23. public class UserAccountRecordController : BaseController
  24. {
  25. public UserAccountRecordController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
  26. {
  27. OtherMySqlConn.connstr = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
  28. }
  29. #region 创客账户变动记录列表
  30. /// <summary>
  31. /// 根据条件查询创客账户变动记录列表
  32. /// </summary>
  33. /// <returns></returns>
  34. public IActionResult Index(UserAccountRecord data, string right, int UserId = 0)
  35. {
  36. ViewBag.RightInfo = RightInfo;
  37. ViewBag.right = right;
  38. ViewBag.UserId = UserId.ToString();
  39. List<Users> TopUsers = db.Users.Where(m => m.ParentUserId == 0).ToList();
  40. ViewBag.TopUsers = TopUsers;
  41. List<KqProducts> Brands = db.KqProducts.OrderBy(m => m.Id).ToList();
  42. ViewBag.Brands = Brands;
  43. return View();
  44. }
  45. #endregion
  46. #region 根据条件查询创客账户变动记录列表
  47. /// <summary>
  48. /// 创客账户变动记录列表
  49. /// </summary>
  50. /// <returns></returns>
  51. public JsonResult IndexData(UserAccountRecord data, string MakerCode, string RealName, int TopUserId, string CreateDateData, int UserId = 0, int page = 1, int limit = 30)
  52. {
  53. Dictionary<string, string> Fields = new Dictionary<string, string>();
  54. Fields.Add("ChangeType", "1"); //交易类型
  55. Fields.Add("ProductType", "1"); //产品类型
  56. Fields.Add("TransRecordNo", "3"); //交易流水编号
  57. string condition = condition = " and Status>-1";
  58. //创客编号
  59. if (!string.IsNullOrEmpty(MakerCode))
  60. {
  61. condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + MakerCode + "')";
  62. }
  63. //创客名称
  64. if (!string.IsNullOrEmpty(RealName))
  65. {
  66. condition += " and UserId in (select UserId from UserForRealName where RealName='" + RealName + "')";
  67. }
  68. //顶级创客
  69. if (TopUserId > 0)
  70. {
  71. condition += " and UserId in (select Id from Users where ParentNav like '," + TopUserId + ",%')";
  72. }
  73. if (UserId > 0)
  74. {
  75. condition += " and UserId=" + UserId;
  76. }
  77. if (!string.IsNullOrEmpty(CreateDateData))
  78. {
  79. string[] datelist = CreateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
  80. // string start = datelist[0];
  81. // string end = datelist[1];
  82. // condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
  83. var start = Convert.ToDateTime(Convert.ToDateTime(datelist[0]).ToString("yyyy-MM-dd"));
  84. var end = Convert.ToDateTime(Convert.ToDateTime(datelist[1]).ToString("yyyy-MM-dd") + " 23:59:59");
  85. var check = db.UserAccountRecord.Any(m => m.CreateDate >= start);
  86. var checks = db.UserAccountRecord.Any(m => m.CreateDate <= end);
  87. if (check)
  88. {
  89. var sId = db.UserAccountRecord.Where(m => m.CreateDate >= start).Min(m => m.Id);
  90. condition += " and Id >=" + sId;
  91. }
  92. if (checks)
  93. {
  94. var eId = db.UserAccountRecord.Where(m => m.CreateDate <= end).Max(m => m.Id);
  95. condition += " and Id <=" + eId;
  96. }
  97. }
  98. else
  99. {
  100. // var start = DateTime.Now.ToString("yyyy-MM") + "-01";
  101. // var end = Convert.ToDateTime(start).AddMonths(1);
  102. // condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<'" + end + " 00:00:00'";
  103. var start = Convert.ToDateTime(DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd"));
  104. var check = db.UserAccountRecord.Any(m => m.CreateDate >= start);
  105. if (check)
  106. {
  107. var minId = db.UserAccountRecord.Where(m => m.CreateDate >= start).Min(m => m.Id);
  108. var Info = function.ReadInstance("/WritePage/UsersAccountRecord/UsersAccountRecord.txt");
  109. if (string.IsNullOrEmpty(Info.ToString()))
  110. {
  111. function.WritePage("/WritePage/UsersAccountRecord/", "UsersAccountRecord.txt", minId.ToString());
  112. condition += " and Id >=" + minId;
  113. }
  114. else
  115. {
  116. condition += " and Id >=" + Convert.ToInt32(Info);
  117. }
  118. }
  119. else
  120. {
  121. condition += " and Id =0";
  122. }
  123. }
  124. if (data.ChangeType > 0)
  125. {
  126. condition += " and ChangeType=" + data.ChangeType;
  127. }
  128. if (data.ProductType > 0)
  129. {
  130. condition += " and ProductType=" + data.ProductType;
  131. }
  132. if (!string.IsNullOrEmpty(data.TransRecordNo))
  133. {
  134. condition += " and TransRecordNo='" + data.TransRecordNo + "'";
  135. }
  136. Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("UserAccountRecord", Fields, "Id desc", "0", page, limit, condition);
  137. List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
  138. foreach (Dictionary<string, object> dic in diclist)
  139. {
  140. int UId = int.Parse(dic["UserId"].ToString());
  141. Users user = db.Users.FirstOrDefault(m => m.Id == UId) ?? new Users();
  142. dic["MakerCode"] = user.MakerCode;
  143. dic["RealName"] = user.RealName;
  144. if (!string.IsNullOrEmpty(user.ParentNav))
  145. {
  146. int TopId = int.Parse(user.ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
  147. Users tuser = db.Users.FirstOrDefault(m => m.Id == TopId) ?? new Users();
  148. dic["TopMakerCode"] = tuser.MakerCode;
  149. dic["TopRealName"] = tuser.RealName;
  150. }
  151. int ProductType = int.Parse(dic["ProductType"].ToString());
  152. dic["ProductTypeName"] = RelationClass.GetKqProductBrandInfo(ProductType);
  153. int ChangeType = int.Parse(dic["ChangeType"].ToString());
  154. dic["ChangeTypeName"] = RelationClassForConst.GetChangeTypeInfo(ChangeType);
  155. //获得盟主5元奖励的机具Sn
  156. int SnId = int.Parse(dic["QueryCount"].ToString());
  157. PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnId) ?? new PosMachinesTwo();
  158. dic["PosSn"] = pos.PosSn;
  159. }
  160. Dictionary<string, object> other = new Dictionary<string, object>();
  161. string ChangeTypeAmount0 = "0.00", ChangeTypeAmount1 = "0.00", ChangeTypeAmount2 = "0.00", ChangeTypeAmount3 = "0.00", ChangeTypeAmount4 = "0.00", ChangeTypeAmount5 = "0.00", ChangeTypeAmount6 = "0.00", ChangeTypeAmount61 = "0.00", ChangeTypeAmount62 = "0.00", ChangeTypeAmount63 = "0.00", ChangeTypeAmount64 = "0.00", ChangeTypeAmount50 = "0.00", ChangeTypeAmount111 = "0.00", ChangeTypeAmount112 = "0.00", ChangeTypeAmount60 = "0.00", ChangeTypeAmount31 = "0.00";
  162. DataTable dt = OtherMySqlConn.dtable("select sum(if(ChangeType=0, ChangeAmount, 0)),sum(if(ChangeType=1, ChangeAmount, 0)),sum(if(ChangeType=2, ChangeAmount, 0)),sum(if(ChangeType=6, ChangeAmount, 0)),sum(if(ChangeType=61, ChangeAmount, 0)),sum(if(ChangeType=62, ChangeAmount, 0)),sum(if(ChangeType=63, ChangeAmount, 0)),sum(if(ChangeType=64, ChangeAmount, 0)),sum(if(ChangeType=50, ChangeAmount, 0)),sum(if(ChangeType=111, ChangeAmount, 0)),sum(if(ChangeType=112, ChangeAmount, 0)),sum(if(ChangeType=60, ChangeAmount, 0)),sum(if(ChangeType=31, ChangeAmount, 0)),sum(if(ChangeType=3, ChangeAmount, 0)),sum(if(ChangeType=4, ChangeAmount, 0)),sum(if(ChangeType=5, ChangeAmount, 0)) from UserAccountRecord where 1=1" + condition);
  163. DataTable dts = OtherMySqlConn.dtable("select SUM(FluxProfitAmt) from FluxProfitDetail where ");
  164. if (dt.Rows.Count > 0)
  165. {
  166. ChangeTypeAmount0 = dt.Rows[0][0].ToString();
  167. ChangeTypeAmount1 = dt.Rows[0][1].ToString();
  168. ChangeTypeAmount2 = dt.Rows[0][2].ToString();
  169. ChangeTypeAmount3 = dt.Rows[0][13].ToString();
  170. ChangeTypeAmount4 = dt.Rows[0][14].ToString();
  171. ChangeTypeAmount5 = dt.Rows[0][15].ToString();
  172. ChangeTypeAmount6 = dt.Rows[0][3].ToString();
  173. ChangeTypeAmount61 = dt.Rows[0][4].ToString();
  174. ChangeTypeAmount62 = dt.Rows[0][5].ToString();
  175. ChangeTypeAmount63 = dt.Rows[0][6].ToString();
  176. ChangeTypeAmount64 = dt.Rows[0][7].ToString();
  177. ChangeTypeAmount50 = dt.Rows[0][8].ToString();
  178. ChangeTypeAmount111 = dt.Rows[0][9].ToString();
  179. ChangeTypeAmount112 = dt.Rows[0][10].ToString();
  180. ChangeTypeAmount60 = dt.Rows[0][11].ToString();
  181. ChangeTypeAmount31 = dt.Rows[0][12].ToString();
  182. }
  183. other.Add("ChangeTypeAmount0", ChangeTypeAmount0); //激活奖励
  184. other.Add("ChangeTypeAmount1", ChangeTypeAmount1); //交易分润
  185. other.Add("ChangeTypeAmount2", ChangeTypeAmount2); //提现申请
  186. other.Add("ChangeTypeAmount3", ChangeTypeAmount3); //提现税点扣除
  187. other.Add("ChangeTypeAmount4", ChangeTypeAmount4); //提现税点扣除
  188. other.Add("ChangeTypeAmount5", ChangeTypeAmount5); //提现税点扣
  189. other.Add("ChangeTypeAmount6", ChangeTypeAmount6); //提现失败,解冻
  190. other.Add("ChangeTypeAmount61", ChangeTypeAmount61); //人工冻结
  191. other.Add("ChangeTypeAmount62", ChangeTypeAmount62); //人工解冻
  192. other.Add("ChangeTypeAmount63", ChangeTypeAmount63); //人工扣减
  193. other.Add("ChangeTypeAmount64", ChangeTypeAmount64); //人工增加
  194. other.Add("ChangeTypeAmount50", ChangeTypeAmount50); //开机奖励
  195. other.Add("ChangeTypeAmount111", ChangeTypeAmount111); //分润补贴
  196. other.Add("ChangeTypeAmount112", ChangeTypeAmount112); //推荐奖励
  197. other.Add("ChangeTypeAmount60", ChangeTypeAmount60); //流量卡分佣
  198. other.Add("ChangeTypeAmount31", ChangeTypeAmount31); //红包奖励
  199. obj.Add("other", other);
  200. return Json(obj);
  201. }
  202. #endregion
  203. #region 增加创客账户变动记录
  204. /// <summary>
  205. /// 增加或修改创客账户变动记录信息
  206. /// </summary>
  207. /// <returns></returns>
  208. public IActionResult Add(string right)
  209. {
  210. ViewBag.RightInfo = RightInfo;
  211. ViewBag.right = right;
  212. return View();
  213. }
  214. #endregion
  215. #region 增加创客账户变动记录
  216. /// <summary>
  217. /// 增加或修改创客账户变动记录信息
  218. /// </summary>
  219. /// <returns></returns>
  220. [HttpPost]
  221. public string Add(UserAccountRecord data)
  222. {
  223. Dictionary<string, object> Fields = new Dictionary<string, object>();
  224. Fields.Add("SeoTitle", data.SeoTitle);
  225. Fields.Add("SeoKeyword", data.SeoKeyword);
  226. Fields.Add("SeoDescription", data.SeoDescription);
  227. int Id = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Add("UserAccountRecord", Fields, 0);
  228. AddSysLog(data.Id.ToString(), "UserAccountRecord", "add");
  229. db.SaveChanges();
  230. return "success";
  231. }
  232. #endregion
  233. #region 修改创客账户变动记录
  234. /// <summary>
  235. /// 增加或修改创客账户变动记录信息
  236. /// </summary>
  237. /// <returns></returns>
  238. public IActionResult Edit(string right, int Id = 0)
  239. {
  240. ViewBag.RightInfo = RightInfo;
  241. ViewBag.right = right;
  242. UserAccountRecord editData = db.UserAccountRecord.FirstOrDefault(m => m.Id == Id) ?? new UserAccountRecord();
  243. ViewBag.data = editData;
  244. return View();
  245. }
  246. #endregion
  247. #region 修改创客账户变动记录
  248. /// <summary>
  249. /// 增加或修改创客账户变动记录信息
  250. /// </summary>
  251. /// <returns></returns>
  252. [HttpPost]
  253. public string Edit(UserAccountRecord data)
  254. {
  255. Dictionary<string, object> Fields = new Dictionary<string, object>();
  256. Fields.Add("SeoTitle", data.SeoTitle);
  257. Fields.Add("SeoKeyword", data.SeoKeyword);
  258. Fields.Add("SeoDescription", data.SeoDescription);
  259. new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("UserAccountRecord", Fields, data.Id);
  260. AddSysLog(data.Id.ToString(), "UserAccountRecord", "update");
  261. db.SaveChanges();
  262. return "success";
  263. }
  264. #endregion
  265. #region 删除创客账户变动记录信息
  266. /// <summary>
  267. /// 删除创客账户变动记录信息
  268. /// </summary>
  269. /// <returns></returns>
  270. public string Delete(string Id)
  271. {
  272. string[] idlist = Id.Split(new char[] { ',' });
  273. AddSysLog(Id, "UserAccountRecord", "del");
  274. foreach (string subid in idlist)
  275. {
  276. int id = int.Parse(subid);
  277. Dictionary<string, object> Fields = new Dictionary<string, object>();
  278. Fields.Add("Status", -1);
  279. new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("UserAccountRecord", Fields, id);
  280. }
  281. db.SaveChanges();
  282. return "success";
  283. }
  284. #endregion
  285. #region 开启
  286. /// <summary>
  287. /// 开启
  288. /// </summary>
  289. /// <returns></returns>
  290. public string Open(string Id)
  291. {
  292. string[] idlist = Id.Split(new char[] { ',' });
  293. AddSysLog(Id, "UserAccountRecord", "open");
  294. foreach (string subid in idlist)
  295. {
  296. int id = int.Parse(subid);
  297. Dictionary<string, object> Fields = new Dictionary<string, object>();
  298. Fields.Add("Status", 1);
  299. new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("UserAccountRecord", Fields, id);
  300. }
  301. db.SaveChanges();
  302. return "success";
  303. }
  304. #endregion
  305. #region 关闭
  306. /// <summary>
  307. /// 关闭
  308. /// </summary>
  309. /// <returns></returns>
  310. public string Close(string Id)
  311. {
  312. string[] idlist = Id.Split(new char[] { ',' });
  313. AddSysLog(Id, "UserAccountRecord", "close");
  314. foreach (string subid in idlist)
  315. {
  316. int id = int.Parse(subid);
  317. Dictionary<string, object> Fields = new Dictionary<string, object>();
  318. Fields.Add("Status", 0);
  319. new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("UserAccountRecord", Fields, id);
  320. }
  321. db.SaveChanges();
  322. return "success";
  323. }
  324. #endregion
  325. #region 排序
  326. /// <summary>
  327. /// 排序
  328. /// </summary>
  329. /// <param name="Id"></param>
  330. public string Sort(int Id, int Sort)
  331. {
  332. new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Sort("UserAccountRecord", Sort, Id);
  333. AddSysLog(Id.ToString(), "UserAccountRecord", "sort");
  334. return "success";
  335. }
  336. #endregion
  337. #region 导入数据
  338. /// <summary>
  339. /// 导入数据
  340. /// </summary>
  341. /// <param name="ExcelData"></param>
  342. public string Import(string ExcelData)
  343. {
  344. ExcelData = HttpUtility.UrlDecode(ExcelData);
  345. JsonData list = JsonMapper.ToObject(ExcelData);
  346. for (int i = 1; i < list.Count; i++)
  347. {
  348. JsonData dr = list[i];
  349. db.UserAccountRecord.Add(new UserAccountRecord()
  350. {
  351. CreateDate = DateTime.Now,
  352. UpdateDate = DateTime.Now,
  353. });
  354. db.SaveChanges();
  355. }
  356. AddSysLog("0", "UserAccountRecord", "Import");
  357. return "success";
  358. }
  359. #endregion
  360. #region 导出Excel
  361. /// <summary>
  362. /// 导出Excel
  363. /// </summary>
  364. /// <returns></returns>
  365. public JsonResult ExportExcel(UserAccountRecord data, string MakerCode, string RealName, int TopUserId, int UserId)
  366. {
  367. Dictionary<string, string> Fields = new Dictionary<string, string>();
  368. Fields.Add("ChangeType", "1"); //交易类型
  369. Fields.Add("ProductType", "1"); //产品类型
  370. Fields.Add("TransRecordNo", "3"); //交易流水编号
  371. Fields.Add("CreateDate", "3"); //交易时间
  372. string condition = " and Status>-1";
  373. //创客编号
  374. if (!string.IsNullOrEmpty(MakerCode))
  375. {
  376. condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + MakerCode + "')";
  377. }
  378. //创客名称
  379. if (!string.IsNullOrEmpty(RealName))
  380. {
  381. condition += " and UserId in (select UserId from UserForRealName where RealName='" + RealName + "')";
  382. }
  383. //顶级创客
  384. if (TopUserId > 0)
  385. {
  386. condition += " and UserId in (select Id from Users where ParentNav like '," + TopUserId + ",%')";
  387. }
  388. if (UserId > 0)
  389. {
  390. condition += " and UserId=" + UserId;
  391. }
  392. Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("UserAccountRecord", Fields, "Id desc", "0", 1, 20000, condition, "UserId,ProductType,TransRecordNo,ChangeType,ChangeAmount,Remark,BeforeTotalAmount,AfterTotalAmount,BeforeFreezeAmount,AfterFreezeAmount,BeforeBalanceAmount,AfterBalanceAmount,CreateDate", false);
  393. List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
  394. foreach (Dictionary<string, object> dic in diclist)
  395. {
  396. int UId = int.Parse(dic["UserId"].ToString());
  397. Users user = db.Users.FirstOrDefault(m => m.Id == UId) ?? new Users();
  398. dic["MakerCode"] = user.MakerCode;
  399. dic["RealName"] = user.RealName;
  400. if (!string.IsNullOrEmpty(user.ParentNav))
  401. {
  402. int TopId = int.Parse(user.ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
  403. Users tuser = db.Users.FirstOrDefault(m => m.Id == TopId) ?? new Users();
  404. dic["TopMakerCode"] = tuser.MakerCode;
  405. dic["TopRealName"] = tuser.RealName;
  406. }
  407. int ProductType = int.Parse(dic["ProductType"].ToString());
  408. dic["ProductTypeName"] = RelationClass.GetKqProductBrandInfo(ProductType);
  409. int ChangeType = int.Parse(dic["ChangeType"].ToString());
  410. dic["ChangeTypeName"] = RelationClassForConst.GetChangeTypeInfo(ChangeType);
  411. dic.Remove("UserId");
  412. dic.Remove("ChangeType");
  413. dic.Remove("ProductType");
  414. }
  415. Dictionary<string, object> result = new Dictionary<string, object>();
  416. result.Add("Status", "1");
  417. result.Add("Info", "Excel报表-" + DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss") + ".xlsx");
  418. result.Add("Obj", diclist);
  419. Dictionary<string, object> ReturnFields = new Dictionary<string, object>();
  420. ReturnFields.Add("MakerCode", "创客编号");
  421. ReturnFields.Add("RealName", "创客姓名");
  422. ReturnFields.Add("TopMakerCode", "顶级创客编号");
  423. ReturnFields.Add("TopRealName", "顶级创客名称");
  424. ReturnFields.Add("ProductTypeName", "产品类型");
  425. ReturnFields.Add("TransRecordNo", "交易流水编号");
  426. ReturnFields.Add("ChangeTypeName", "交易类型");
  427. ReturnFields.Add("ChangeAmount", "交易金额");
  428. ReturnFields.Add("Remark", "备注");
  429. ReturnFields.Add("BeforeTotalAmount", "交易前总金额");
  430. ReturnFields.Add("AfterTotalAmount", "交易后总金额");
  431. ReturnFields.Add("BeforeFreezeAmount", "交易前冻结金额");
  432. ReturnFields.Add("AfterFreezeAmount", "交易后冻结金额");
  433. ReturnFields.Add("BeforeBalanceAmount", "交易前余额");
  434. ReturnFields.Add("AfterBalanceAmount", "交易后余额");
  435. ReturnFields.Add("CreateDate", "交易时间");
  436. result.Add("Fields", ReturnFields);
  437. AddSysLog("0", "UserAccountRecord", "ExportExcel");
  438. return Json(result);
  439. }
  440. #endregion
  441. }
  442. }