Просмотр исходного кода

Merge branch 'test-adminserver' of kxs-end/admin-server into release-adminserver

lichunlei 2 лет назад
Родитель
Сommit
bb356998cd
46 измененных файлов с 3120 добавлено и 888 удалено
  1. BIN
      .DS_Store
  2. 10 4
      AppStart/ExcelHelper.cs
  3. 383 0
      AppStart/Helper/ImportHelper/BatchEditUserAmountService.cs
  4. 128 0
      AppStart/Helper/ImportHelper/PreWithdrawalResultsService.cs
  5. 128 0
      AppStart/Helper/ImportHelper/StoreHouseWithdrawalResultsService.cs
  6. BIN
      Areas/.DS_Store
  7. 67 0
      Areas/Admin/Controllers/MainServer/PreAmountRecordController.cs
  8. 67 0
      Areas/Admin/Controllers/MainServer/StoreHouseAmountRecordController.cs
  9. 448 20
      Areas/Admin/Controllers/MainServer/SysToolsController.cs
  10. 68 0
      Areas/Admin/Controllers/MainServer/UsersController.cs
  11. 6 8
      Areas/Admin/Controllers/OperateServer/SysAdminOperateController.cs
  12. 7 7
      Areas/Admin/Controllers/OperateServer/UserCashRecordOperateController.cs
  13. 131 0
      Areas/Admin/Views/MainServer/PreAmountRecord/ImportByQueue.cshtml
  14. 2 1
      Areas/Admin/Views/MainServer/PreAmountRecord/Indexs.cshtml
  15. 131 0
      Areas/Admin/Views/MainServer/StoreHouseAmountRecord/ImportByQueue.cshtml
  16. 124 0
      Areas/Admin/Views/MainServer/SysTools/AddBindData.cshtml
  17. 131 0
      Areas/Admin/Views/MainServer/SysTools/AddDepositData.cshtml
  18. 131 0
      Areas/Admin/Views/MainServer/SysTools/AddTradeData.cshtml
  19. 10 1
      Areas/Admin/Views/MainServer/SysTools/ChangePosFee.cshtml
  20. 144 0
      Areas/Admin/Views/MainServer/Users/ImportByQueue.cshtml
  21. 2 0
      Areas/Admin/Views/OperateServer/SysAdminOperate/EditBalance.cshtml
  22. 9 1
      SpModels/KssMerchant.cs
  23. 42 0
      SpModels/MerchantRecord.cs
  24. 10 0
      SpModels/OrderNos.cs
  25. 11 0
      SpModels/OrderNos2.cs
  26. 52 0
      SpModels/TradeRecordCheck.cs
  27. 394 8
      SpModels/WebCMSEntities.cs
  28. 29 25
      Startup.cs
  29. 6 6
      appsettings.Development.json
  30. BIN
      wwwroot/.DS_Store
  31. BIN
      wwwroot/admin/images/ABackground-logo.png
  32. BIN
      wwwroot/layuiadmin/.DS_Store
  33. 89 10
      wwwroot/layuiadmin/modules_main/PreCardAmountRecord_Admin.js
  34. 87 9
      wwwroot/layuiadmin/modules_main/StoreHouseCardAmountRecord_Admin.js
  35. 253 36
      wwwroot/layuiadmin/modules_main/Users_Admin.js
  36. 9 9
      wwwroot/layuiadmin/modules_operate/SysAdminOperate_Admin.js
  37. 0 12
      wwwroot/other/mybjq/asp.net/README.txt
  38. BIN
      wwwroot/other/mybjq/asp.net/bin/LitJSON.dll
  39. 0 1
      wwwroot/other/mybjq/asp.net/file_manager_json.ashx
  40. 0 227
      wwwroot/other/mybjq/asp.net/file_manager_json.ashx.cs
  41. 0 227
      wwwroot/other/mybjq/asp.net/file_manager_json1.ashx
  42. 0 1
      wwwroot/other/mybjq/asp.net/upload_json.ashx
  43. 0 136
      wwwroot/other/mybjq/asp.net/upload_json.ashx.cs
  44. 0 139
      wwwroot/other/mybjq/asp.net/upload_json1.ashx
  45. 8 0
      wwwroot/other/oss/upload-min-oss.js
  46. 3 0
      wwwroot/other/oss/upload-min-oss.jsold

+ 10 - 4
AppStart/ExcelHelper.cs

@@ -460,8 +460,11 @@ namespace MySystem
                                         store.LaveNum -= OpStoreNum;
                                         store.OutNum += OpStoreNum;
                                         db.SaveChanges();
-                                        string SendData = "{\"Kind\":\"5\",\"Data\":{\"StoreId\":\"" + StoreId + "\",\"BrandId\":\"" + BrandId + "\",\"OpStoreNum\":\"" + OpStoreNum + "\"}}";
-                                        RedisDbconn.Instance.AddList("StoreApplyQueue", SendData);
+                                        if(BrandId != 14)
+                                        {
+                                            string SendData = "{\"Kind\":\"5\",\"Data\":{\"StoreId\":\"" + StoreId + "\",\"BrandId\":\"" + BrandId + "\",\"OpStoreNum\":\"" + OpStoreNum + "\"}}";
+                                            RedisDbconn.Instance.AddList("StoreApplyQueue", SendData);
+                                        }
                                     }
                                     foreach (string key in toStoreData.Keys)
                                     {
@@ -499,8 +502,11 @@ namespace MySystem
                                         store.TotalNum += OpStoreNum;
                                         store.LaveNum += OpStoreNum;
                                         db.SaveChanges();
-                                        string SendData = "{\"Kind\":\"5\",\"Data\":{\"StoreId\":\"" + StoreId + "\",\"BrandId\":\"" + BrandId + "\",\"OpStoreNum\":\"-" + OpStoreNum + "\"}}";
-                                        RedisDbconn.Instance.AddList("StoreApplyQueue", SendData);
+                                        if(BrandId != 14)
+                                        {
+                                            string SendData = "{\"Kind\":\"5\",\"Data\":{\"StoreId\":\"" + StoreId + "\",\"BrandId\":\"" + BrandId + "\",\"OpStoreNum\":\"-" + OpStoreNum + "\"}}";
+                                            RedisDbconn.Instance.AddList("StoreApplyQueue", SendData);
+                                        }
                                     }
                                     db.SaveChanges();
                                     tran.Commit();

+ 383 - 0
AppStart/Helper/ImportHelper/BatchEditUserAmountService.cs

@@ -0,0 +1,383 @@
+using System;
+using System.Threading;
+using System.Linq;
+using System.Data;
+using Library;
+using MySystem.Models;
+using System.Collections.Generic;
+
+/// <summary>
+/// 创客信息相关数据导入
+/// </summary>
+namespace MySystem
+{
+    public class BatchEditUserAmountService
+    {
+        public readonly static BatchEditUserAmountService Instance = new BatchEditUserAmountService();
+        private BatchEditUserAmountService()
+        {
+        }
+
+        public void Start()//启动
+        {
+            Thread thread = new Thread(ImportPostDo);
+            thread.IsBackground = true;
+            thread.Start();
+        }
+
+        public void ImportPostDo()
+        {
+            while (true)
+            {
+                try
+                {
+                    string data = RedisDbconn.Instance.RPop<string>("BatchEditUserAmountQueue");
+                    if (!string.IsNullOrEmpty(data))
+                    {
+                        string[] dataList = data.Split("#cut#");
+                        string _ExcelPath = dataList[0];
+                        string _Kind = dataList[1];
+                        string checkKey = dataList[2];
+                        string Operator = dataList[3]; // 操作人
+                        int SuccessCount = 0;
+                        int DoCount = 0;
+                        string FullExcelPath = function.getPath(_ExcelPath);
+                        FullExcelPath = FullExcelPath.Replace("//", "/");
+                        DataTable list = new PublicFunction().ExcelToDataTable(FullExcelPath);
+                        int TotalCount = list.Rows.Count;
+                        while (DoCount < list.Rows.Count)
+                        {
+                            WebCMSEntities db = new WebCMSEntities();
+                            //导入结算金额
+                            if (_Kind == "1")
+                            {
+                                var tran = db.Database.BeginTransaction();
+                                try
+                                {
+                                    int Size = 100;
+                                    if (list.Rows.Count - DoCount < 100)
+                                    {
+                                        Size = list.Rows.Count - DoCount;
+                                    }
+                                    Dictionary<string, int> storeData = new Dictionary<string, int>();
+                                    for (int i = DoCount; i < DoCount + Size; i++)
+                                    {
+                                        DataRow dr = list.Rows[i];
+                                        string MakerCode = dr[0].ToString(); //创客编号
+                                        string RealName = dr[1].ToString(); //创客姓名
+                                        string SettleAmount = dr[2].ToString(); //提现结算金额(元)
+                                        UserForMakerCode UserCode = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode);
+                                        if (UserCode.UserId > 0)
+                                        {
+                                            var user = db.Users.FirstOrDefault(m => m.Id == UserCode.UserId) ?? new Users();
+                                            if (user.Id > 0)
+                                            {
+                                                SuccessCount += 1;
+                                                user.SettleAmount = decimal.Parse(function.CheckInt(SettleAmount));
+                                            }
+                                            else
+                                            {
+                                                RedisDbconn.Instance.AddList("ErrList" + checkKey, "未找到" + MakerCode + " " + RealName + "创客信息");
+                                            }
+                                        }
+                                        else
+                                        {
+                                            RedisDbconn.Instance.AddList("ErrList" + checkKey, "未找到" + MakerCode + "编号关联信息");
+                                        }
+                                    }
+                                    DoCount += Size;
+                                    db.SaveChanges();
+                                    tran.Commit();
+                                    if (DoCount >= list.Rows.Count)
+                                    {
+                                        RedisDbconn.Instance.Set("BatchEditUserAmountCheckImport:" + checkKey, "success|" + SuccessCount);
+                                        RedisDbconn.Instance.SetExpire("BatchEditUserAmountCheckImport:" + checkKey, 60000);
+                                    }
+                                }
+                                catch (Exception ex)
+                                {
+                                    DoCount = list.Rows.Count;
+                                    function.WriteLog(ex.ToString(), "导入结算金额");
+                                    tran.Rollback();
+                                    ErrorMsg msg = new ErrorMsg()
+                                    {
+                                        Time = DateTime.Now,
+                                        ErrorContent = ex.ToString(),
+                                    };
+                                    function.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(msg), "导入结算金额Excel文件异常");
+                                }
+                                tran.Dispose();
+                            }
+                            //导入冻结金额
+                            if (_Kind == "2")
+                            {
+                                var tran = db.Database.BeginTransaction();
+                                try
+                                {
+                                    int Size = 100;
+                                    if (list.Rows.Count - DoCount < 100)
+                                    {
+                                        Size = list.Rows.Count - DoCount;
+                                    }
+                                    Dictionary<string, int> storeData = new Dictionary<string, int>();
+                                    for (int i = DoCount; i < DoCount + Size; i++)
+                                    {
+                                        DataRow dr = list.Rows[i];
+                                        string MakerCode = dr[0].ToString(); //创客编号
+                                        string RealName = dr[1].ToString(); //创客姓名
+                                        string CashFreezeAmt = dr[2].ToString(); //提现结算金额(元)
+                                        UserForMakerCode UserCode = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode);
+                                        if (UserCode.UserId > 0)
+                                        {
+                                            var user = db.Users.FirstOrDefault(m => m.Id == UserCode.UserId) ?? new Users();
+                                            if (user.Id > 0)
+                                            {
+                                                SuccessCount += 1;
+                                                user.CashFreezeAmt = decimal.Parse(function.CheckInt(CashFreezeAmt));
+                                            }
+                                            else
+                                            {
+                                                RedisDbconn.Instance.AddList("ErrList" + checkKey, "未找到" + MakerCode + " " + RealName + "创客信息");
+                                            }
+                                        }
+                                        else
+                                        {
+                                            RedisDbconn.Instance.AddList("ErrList" + checkKey, "未找到" + MakerCode + "编号关联信息");
+                                        }
+                                    }
+                                    DoCount += Size;
+                                    db.SaveChanges();
+                                    tran.Commit();
+                                    if (DoCount >= list.Rows.Count)
+                                    {
+                                        RedisDbconn.Instance.Set("BatchEditUserAmountCheckImport:" + checkKey, "success|" + SuccessCount);
+                                        RedisDbconn.Instance.SetExpire("BatchEditUserAmountCheckImport:" + checkKey, 60000);
+                                    }
+                                }
+                                catch (Exception ex)
+                                {
+                                    DoCount = list.Rows.Count;
+                                    function.WriteLog(ex.ToString(), "导入冻结金额");
+                                    tran.Rollback();
+                                    ErrorMsg msg = new ErrorMsg()
+                                    {
+                                        Time = DateTime.Now,
+                                        ErrorContent = ex.ToString(),
+                                    };
+                                    function.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(msg), "导入冻结金额Excel文件异常");
+                                }
+                                tran.Dispose();
+                            }
+                            //导入风控数据
+                            if (_Kind == "3")
+                            {
+                                var tran = db.Database.BeginTransaction();
+                                try
+                                {
+                                    int Size = 100;
+                                    if (list.Rows.Count - DoCount < 100)
+                                    {
+                                        Size = list.Rows.Count - DoCount;
+                                    }
+                                    Dictionary<string, int> storeData = new Dictionary<string, int>();
+                                    for (int i = DoCount; i < DoCount + Size; i++)
+                                    {
+                                        DataRow dr = list.Rows[i];
+                                        string MakerCode = dr[0].ToString(); //创客编号
+                                        string RealName = dr[1].ToString(); //创客姓名
+                                        string RiskFlag = dr[2].ToString(); //风控标记(0 否 1 是)
+                                        string RiskNote = dr[3].ToString(); //风控备注
+                                        UserForMakerCode UserCode = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode);
+                                        if (UserCode.UserId > 0)
+                                        {
+                                            var user = db.Users.FirstOrDefault(m => m.Id == UserCode.UserId && m.RealName == RealName) ?? new Users();
+                                            if (user.Id > 0)
+                                            {
+                                                SuccessCount += 1;
+                                                user.RiskFlag = ulong.Parse(function.CheckInt(RiskFlag));
+                                                user.RiskRemark = RiskNote;
+                                            }
+                                            else
+                                            {
+                                                RedisDbconn.Instance.AddList("ErrList" + checkKey, "未找到" + MakerCode + " " + RealName + "创客信息");
+                                            }
+                                        }
+                                        else
+                                        {
+                                            RedisDbconn.Instance.AddList("ErrList" + checkKey, "未找到" + MakerCode + "编号关联信息");
+                                        }
+                                    }
+                                    DoCount += Size;
+                                    db.SaveChanges();
+                                    tran.Commit();
+                                    if (DoCount >= list.Rows.Count)
+                                    {
+                                        RedisDbconn.Instance.Set("BatchEditUserAmountCheckImport:" + checkKey, "success|" + SuccessCount);
+                                        RedisDbconn.Instance.SetExpire("BatchEditUserAmountCheckImport:" + checkKey, 60000);
+                                    }
+                                }
+                                catch (Exception ex)
+                                {
+                                    DoCount = list.Rows.Count;
+                                    function.WriteLog(ex.ToString(), "导入风控数据");
+                                    tran.Rollback();
+                                    ErrorMsg msg = new ErrorMsg()
+                                    {
+                                        Time = DateTime.Now,
+                                        ErrorContent = ex.ToString(),
+                                    };
+                                    function.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(msg), "导入风控数据Excel文件异常");
+                                }
+                                tran.Dispose();
+                            }
+                            //批量修改账户金额
+                            if (_Kind == "4")
+                            {
+                                var tran = db.Database.BeginTransaction();
+                                try
+                                {
+                                    int Size = 100;
+                                    if (list.Rows.Count - DoCount < 100)
+                                    {
+                                        Size = list.Rows.Count - DoCount;
+                                    }
+                                    Dictionary<string, int> storeData = new Dictionary<string, int>();
+                                    for (int i = DoCount; i < DoCount + Size; i++)
+                                    {
+                                        DataRow dr = list.Rows[i];
+                                        string MakerCode = dr[0].ToString(); //创客编号
+                                        string RealName = dr[1].ToString(); //创客姓名
+                                        string OperationAmt = dr[2].ToString();//操作金额
+                                        string OperationType = dr[3].ToString();//操作类型(1-冻结 2-解冻 3-扣减 4-增加)
+                                        UserForMakerCode UserCode = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode);
+                                        if (UserCode.UserId > 0)
+                                        {
+                                            var user = db.Users.FirstOrDefault(m => m.Id == UserCode.UserId && m.RealName == RealName) ?? new Users();
+                                            if (user.Id > 0)
+                                            {
+                                                UserAccount account = db.UserAccount.FirstOrDefault(m => m.Id == user.Id) ?? new UserAccount();
+                                                if (account.Id == 0)
+                                                {
+                                                    account = db.UserAccount.Add(new UserAccount()
+                                                    {
+                                                        Id = user.Id,
+                                                        UserId = user.Id,
+                                                    }).Entity;
+                                                    db.SaveChanges();
+                                                }
+                                                if (account.Id > 0)
+                                                {
+                                                    decimal BeforeTotalAmount = account.TotalAmount; //变更前总金额
+                                                    decimal BeforeFreezeAmount = account.FreezeAmount; //变更前冻结金额
+                                                    decimal BeforeBalanceAmount = account.BalanceAmount; //变更前余额
+                                                    int ChangeType = 0;
+                                                    if (OperationType == "1" && Convert.ToDecimal(OperationAmt) > account.BalanceAmount)
+                                                    {
+                                                        RedisDbconn.Instance.AddList("ErrList" + checkKey, "以下操作失败" + user.MakerCode + ',' + user.RealName + "冻结金额大于余额");
+                                                    }
+                                                    if (OperationType == "2" && Convert.ToDecimal(OperationAmt) > account.FreezeAmount)
+                                                    {
+                                                        RedisDbconn.Instance.AddList("ErrList" + checkKey, "以下操作失败" + user.MakerCode + ',' + user.RealName + "解冻金额大于冻结金额");
+                                                    }
+                                                    if (OperationType == "3" && Convert.ToDecimal(OperationAmt) > account.BalanceAmount)
+                                                    {
+                                                        RedisDbconn.Instance.AddList("ErrList" + checkKey, "以下操作失败" + user.MakerCode + ',' + user.RealName + "扣减金额大于余额");
+                                                    }
+                                                    if ((OperationType == "1" && Convert.ToDecimal(OperationAmt) <= account.BalanceAmount) || (OperationType == "2" && Convert.ToDecimal(OperationAmt) <= account.FreezeAmount) || (OperationType == "3" && Convert.ToDecimal(OperationAmt) <= account.BalanceAmount) || (OperationType == "4"))
+                                                    {
+                                                        if (OperationType == "1" && Convert.ToDecimal(OperationAmt) <= account.BalanceAmount)
+                                                        {
+                                                            account.BalanceAmount -= Convert.ToDecimal(OperationAmt);
+                                                            account.FreezeAmount += Convert.ToDecimal(OperationAmt);
+                                                            ChangeType = 61;
+                                                        }
+                                                        if (OperationType == "2" && Convert.ToDecimal(OperationAmt) <= account.FreezeAmount)
+                                                        {
+                                                            account.BalanceAmount += Convert.ToDecimal(OperationAmt);
+                                                            account.FreezeAmount -= Convert.ToDecimal(OperationAmt);
+                                                            ChangeType = 62;
+                                                        }
+                                                        if (OperationType == "3" && Convert.ToDecimal(OperationAmt) <= account.BalanceAmount)
+                                                        {
+                                                            account.TotalAmount -= Convert.ToDecimal(OperationAmt);
+                                                            account.BalanceAmount -= Convert.ToDecimal(OperationAmt);
+                                                            ChangeType = 63;
+                                                        }
+                                                        if (OperationType == "4")
+                                                        {
+                                                            account.TotalAmount += Convert.ToDecimal(OperationAmt);
+                                                            account.BalanceAmount += Convert.ToDecimal(OperationAmt);
+                                                            ChangeType = 64;
+                                                        }
+                                                        decimal AfterTotalAmount = account.TotalAmount; //变更后总金额
+                                                        decimal AfterFreezeAmount = account.FreezeAmount; //变更后冻结金额
+                                                        decimal AfterBalanceAmount = account.BalanceAmount; //变更后余额
+                                                        UserAccountRecord userAccountRecord = db.UserAccountRecord.Add(new UserAccountRecord()
+                                                        {
+                                                            CreateDate = DateTime.Now,
+                                                            UpdateDate = DateTime.Now,
+                                                            UserId = user.Id, //创客
+                                                            ChangeType = ChangeType, //变动类型
+                                                            ChangeAmount = Convert.ToDecimal(OperationAmt), //变更金额
+                                                            BeforeTotalAmount = BeforeTotalAmount, //变更前总金额
+                                                            AfterTotalAmount = AfterTotalAmount, //变更后总金额
+                                                            BeforeFreezeAmount = BeforeFreezeAmount, //变更前冻结金额
+                                                            AfterFreezeAmount = AfterFreezeAmount, //变更后冻结金额
+                                                            BeforeBalanceAmount = BeforeBalanceAmount, //变更前余额
+                                                            AfterBalanceAmount = AfterBalanceAmount, //变更后余额
+                                                            Remark = dr[4].ToString(),
+                                                        }).Entity;
+                                                        db.SaveChanges();
+                                                        SuccessCount += 1;
+                                                        function.WriteLog(DateTime.Now.ToString() + "\n" + user.Id.ToString(), "批量修改账户金额");
+                                                    }
+                                                }
+                                            }
+                                            else
+                                            {
+                                                RedisDbconn.Instance.AddList("ErrList" + checkKey, "未找到" + MakerCode + " " + RealName + "创客信息");
+                                            }
+                                        }
+                                        else
+                                        {
+                                            RedisDbconn.Instance.AddList("ErrList" + checkKey, "未找到" + MakerCode + "编号关联信息");
+                                        }
+                                    }
+                                    DoCount += Size;
+                                    db.SaveChanges();
+                                    tran.Commit();
+                                    if (DoCount >= list.Rows.Count)
+                                    {
+                                        RedisDbconn.Instance.Set("BatchEditUserAmountCheckImport:" + checkKey, "success|" + SuccessCount);
+                                        RedisDbconn.Instance.SetExpire("BatchEditUserAmountCheckImport:" + checkKey, 60000);
+                                    }
+                                }
+                                catch (Exception ex)
+                                {
+                                    DoCount = list.Rows.Count;
+                                    function.WriteLog(ex.ToString(), "批量修改账户金额");
+                                    tran.Rollback();
+                                    ErrorMsg msg = new ErrorMsg()
+                                    {
+                                        Time = DateTime.Now,
+                                        ErrorContent = ex.ToString(),
+                                    };
+                                    function.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(msg), "批量修改账户金额Excel文件异常");
+                                }
+                                tran.Dispose();
+                            }
+                        }
+                    }
+                    else
+                    {
+                        Thread.Sleep(5000);
+                    }
+                }
+                catch (Exception ex)
+                {
+                    function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "后台导入Excel文件队列异常");
+                }
+            }
+        }
+    }
+}

+ 128 - 0
AppStart/Helper/ImportHelper/PreWithdrawalResultsService.cs

@@ -0,0 +1,128 @@
+using System;
+using System.Threading;
+using System.Linq;
+using System.Data;
+using Library;
+using MySystem.Models;
+using System.Collections.Generic;
+
+/// <summary>
+/// 小分仓临时额度提现结果导入
+/// </summary>
+namespace MySystem
+{
+    public class PreWithdrawalResultsService
+    {
+        public readonly static PreWithdrawalResultsService Instance = new PreWithdrawalResultsService();
+        private PreWithdrawalResultsService()
+        {
+        }
+
+        public void Start()//启动
+        {
+            Thread thread = new Thread(ImportPostDo);
+            thread.IsBackground = true;
+            thread.Start();
+        }
+
+        public void ImportPostDo()
+        {
+            while (true)
+            {
+                try
+                {
+                    string data = RedisDbconn.Instance.RPop<string>("PreWithdrawalResultsQueue");
+                    if (!string.IsNullOrEmpty(data))
+                    {
+                        string[] dataList = data.Split("#cut#");
+                        string _ExcelPath = dataList[0];
+                        string _Kind = dataList[1];
+                        string checkKey = dataList[2];
+                        string Operator = dataList[3]; // 操作人
+                        int SuccessCount = 0;
+                        int DoCount = 0;
+                        string FullExcelPath = function.getPath(_ExcelPath);
+                        FullExcelPath = FullExcelPath.Replace("//", "/");
+                        DataTable list = new PublicFunction().ExcelToDataTable(FullExcelPath);
+                        int TotalCount = list.Rows.Count;
+                        while (DoCount < list.Rows.Count)
+                        {
+                            WebCMSEntities db = new WebCMSEntities();
+                            //导入结算金额
+                            if (_Kind == "1")
+                            {
+                                var tran = db.Database.BeginTransaction();
+                                try
+                                {
+                                    int Size = 100;
+                                    if (list.Rows.Count - DoCount < 100)
+                                    {
+                                        Size = list.Rows.Count - DoCount;
+                                    }
+                                    Dictionary<string, int> storeData = new Dictionary<string, int>();
+                                    for (int i = DoCount; i < DoCount + Size; i++)
+                                    {
+                                        DataRow dr = list.Rows[i];
+                                        string Id = dr[0].ToString();
+                                        string IsOk = dr[11].ToString();
+                                        var id = int.Parse(Id);
+                                        var Info = db.PreAmountRecord.FirstOrDefault(m => m.Id == id) ?? new PreAmountRecord();
+                                        if (Info.Id > 0)
+                                        {
+                                            if (IsOk == "是") Info.Status = 1;
+                                            if (IsOk == "否")
+                                            {
+                                                Info.Status = -1;
+                                                var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == Info.UserId) ?? new UserAccount();
+                                                if (userAccount.Id > 0)
+                                                {
+                                                    userAccount.PreTempAmount += Info.UseAmount;//退还卡充值临额
+                                                    userAccount.ValidPreAmount += Info.UseAmount;//退还可用额度
+                                                }
+                                            }
+                                            SuccessCount += 1;
+                                        }
+                                        else
+                                        {
+                                            RedisDbconn.Instance.AddList("ErrList" + checkKey, "未找到记录为Id" + Id + "相关信息");
+                                        }
+                                    }
+                                    DoCount += Size;
+                                    db.SaveChanges();
+                                    tran.Commit();
+                                    if (DoCount >= list.Rows.Count)
+                                    {
+                                        RedisDbconn.Instance.Set("PreWithdrawalResultsCheckImport:" + checkKey, "success|" + SuccessCount);
+                                        RedisDbconn.Instance.SetExpire("PreWithdrawalResultsCheckImport:" + checkKey, 60000);
+                                    }
+                                }
+                                catch (Exception ex)
+                                {
+                                    DoCount = list.Rows.Count;
+                                    function.WriteLog(ex.ToString(), "导入结算金额");
+                                    tran.Rollback();
+                                    ErrorMsg msg = new ErrorMsg()
+                                    {
+                                        Time = DateTime.Now,
+                                        ErrorContent = ex.ToString(),
+                                    };
+                                    function.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(msg), "导入结算金额Excel文件异常");
+                                }
+                                tran.Dispose();
+                            }
+
+                        }
+                    }
+                    else
+                    {
+                        Thread.Sleep(50000);
+                    }
+                }
+                catch (Exception ex)
+                {
+                    function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "后台导入Excel文件队列异常");
+                }
+            }
+        }
+    }
+}

+ 128 - 0
AppStart/Helper/ImportHelper/StoreHouseWithdrawalResultsService.cs

@@ -0,0 +1,128 @@
+using System;
+using System.Threading;
+using System.Linq;
+using System.Data;
+using Library;
+using MySystem.Models;
+using System.Collections.Generic;
+
+/// <summary>
+/// 分仓临时额度提现结果导入
+/// </summary>
+namespace MySystem
+{
+    public class StoreHouseWithdrawalResultsService
+    {
+        public readonly static StoreHouseWithdrawalResultsService Instance = new StoreHouseWithdrawalResultsService();
+        private StoreHouseWithdrawalResultsService()
+        {
+        }
+
+        public void Start()//启动
+        {
+            Thread thread = new Thread(ImportPostDo);
+            thread.IsBackground = true;
+            thread.Start();
+        }
+
+        public void ImportPostDo()
+        {
+            while (true)
+            {
+                try
+                {
+                    string data = RedisDbconn.Instance.RPop<string>("StoreHouseWithdrawalResultsQueue");
+                    if (!string.IsNullOrEmpty(data))
+                    {
+                        string[] dataList = data.Split("#cut#");
+                        string _ExcelPath = dataList[0];
+                        string _Kind = dataList[1];
+                        string checkKey = dataList[2];
+                        string Operator = dataList[3]; // 操作人
+                        int SuccessCount = 0;
+                        int DoCount = 0;
+                        string FullExcelPath = function.getPath(_ExcelPath);
+                        FullExcelPath = FullExcelPath.Replace("//", "/");
+                        DataTable list = new PublicFunction().ExcelToDataTable(FullExcelPath);
+                        int TotalCount = list.Rows.Count;
+                        while (DoCount < list.Rows.Count)
+                        {
+                            WebCMSEntities db = new WebCMSEntities();
+                            //导入结果
+                            if (_Kind == "1")
+                            {
+                                var tran = db.Database.BeginTransaction();
+                                try
+                                {
+                                    int Size = 100;
+                                    if (list.Rows.Count - DoCount < 100)
+                                    {
+                                        Size = list.Rows.Count - DoCount;
+                                    }
+                                    Dictionary<string, int> storeData = new Dictionary<string, int>();
+                                    for (int i = DoCount; i < DoCount + Size; i++)
+                                    {
+                                        DataRow dr = list.Rows[i];
+                                        string Id = dr[0].ToString();
+                                        string IsOk = dr[11].ToString();
+                                        var id = int.Parse(Id);
+                                        var Info = db.StoreHouseAmountRecord.FirstOrDefault(m => m.Id == id) ?? new StoreHouseAmountRecord();
+                                        if (Info.Id > 0)
+                                        {
+                                            if (IsOk == "是") Info.Status = 1;
+                                            if (IsOk == "否")
+                                            {
+                                                Info.Status = -1;
+                                                var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == Info.UserId) ?? new UserAccount();
+                                                if (userAccount.Id > 0)
+                                                {
+                                                    userAccount.TempAmount += Info.UseAmount;//退还卡充值临额
+                                                    userAccount.ValidAmount += Info.UseAmount;//退还可用额度
+                                                }
+                                            }
+                                            SuccessCount += 1;
+                                        }
+                                        else
+                                        {
+                                            RedisDbconn.Instance.AddList("ErrList" + checkKey, "未找到记录为Id" + Id + "相关信息");
+                                        }
+                                    }
+                                    DoCount += Size;
+                                    db.SaveChanges();
+                                    tran.Commit();
+                                    if (DoCount >= list.Rows.Count)
+                                    {
+                                        RedisDbconn.Instance.Set("StoreHouseWithdrawalResultsCheckImport:" + checkKey, "success|" + SuccessCount);
+                                        RedisDbconn.Instance.SetExpire("StoreHouseWithdrawalResultsCheckImport:" + checkKey, 60000);
+                                    }
+                                }
+                                catch (Exception ex)
+                                {
+                                    DoCount = list.Rows.Count;
+                                    function.WriteLog(ex.ToString(), "分仓临时额度提现结果导入");
+                                    tran.Rollback();
+                                    ErrorMsg msg = new ErrorMsg()
+                                    {
+                                        Time = DateTime.Now,
+                                        ErrorContent = ex.ToString(),
+                                    };
+                                    function.WriteLog(Newtonsoft.Json.JsonConvert.SerializeObject(msg), "分仓临时额度提现结果导入Excel文件异常");
+                                }
+                                tran.Dispose();
+                            }
+
+                        }
+                    }
+                    else
+                    {
+                        Thread.Sleep(50000);
+                    }
+                }
+                catch (Exception ex)
+                {
+                    function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "后台导入Excel文件队列异常");
+                }
+            }
+        }
+    }
+}

BIN
Areas/.DS_Store


+ 67 - 0
Areas/Admin/Controllers/MainServer/PreAmountRecordController.cs

@@ -455,5 +455,72 @@ namespace MySystem.Areas.Admin.Controllers
         }
         #endregion
 
+
+        #region 通过队列导入数据
+
+        public IActionResult ImportByQueue(string right, string ExcelKind)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+            ViewBag.ExcelKind = ExcelKind;
+            return View();
+        }
+        /// <summary>
+        /// 通过队列导入数据
+        /// </summary>
+        /// <param name="ExcelPath"></param>
+        [HttpPost]
+        public string ImportByQueuePost(string ExcelPath, int Kind = 0)
+        {
+            string key = function.MD5_16(Guid.NewGuid().ToString());
+            RedisDbconn.Instance.AddList("PreWithdrawalResultsQueue", ExcelPath + "#cut#" + Kind + "#cut#" + key + "#cut#" + SysUserName);
+            return "success|" + key;
+        }
+        public string CheckImport(string key)
+        {
+            string result = RedisDbconn.Instance.Get<string>("PreWithdrawalResultsCheckImport:" + key);
+            if (!string.IsNullOrEmpty(result))
+            {
+                string[] datalist = result.Split('|');
+                if (datalist[0] == "success")
+                {
+                    return result;
+                }
+                return datalist[0];
+            }
+            return "0";
+        }
+        public Dictionary<string, object> CheckImportV2(string key)
+        {
+            Dictionary<string, object> Obj = new Dictionary<string, object>();
+            string result = RedisDbconn.Instance.Get<string>("PreWithdrawalResultsCheckImport:" + key);
+            if (!string.IsNullOrEmpty(result))
+            {
+                string[] datalist = result.Split('|');
+                if (datalist[0] == "success")
+                {
+                    List<string> errList = RedisDbconn.Instance.GetList<string>("ErrList" + key);
+                    if (errList.Count > 0)
+                    {
+                        Obj.Add("status", 2);
+                        Obj.Add("errList", errList);
+                    }
+                    else
+                    {
+                        Obj.Add("status", 1);
+                        Obj.Add("data", result);
+                    }
+                    return Obj;
+                }
+                Obj.Add("status", 0);
+                Obj.Add("data", datalist[0]);
+                return Obj;
+            }
+            Obj.Add("status", -1);
+            Obj.Add("data", "执行中...");
+            return Obj;
+        }
+        #endregion
+
     }
 }

+ 67 - 0
Areas/Admin/Controllers/MainServer/StoreHouseAmountRecordController.cs

@@ -801,5 +801,72 @@ namespace MySystem.Areas.Admin.Controllers
         }
         #endregion
 
+
+        #region 通过队列导入数据
+
+        public IActionResult ImportByQueue(string right, string ExcelKind)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+            ViewBag.ExcelKind = ExcelKind;
+            return View();
+        }
+        /// <summary>
+        /// 通过队列导入数据
+        /// </summary>
+        /// <param name="ExcelPath"></param>
+        [HttpPost]
+        public string ImportByQueuePost(string ExcelPath, int Kind = 0)
+        {
+            string key = function.MD5_16(Guid.NewGuid().ToString());
+            RedisDbconn.Instance.AddList("StoreHouseWithdrawalResultsQueue", ExcelPath + "#cut#" + Kind + "#cut#" + key + "#cut#" + SysUserName);
+            return "success|" + key;
+        }
+        public string CheckImport(string key)
+        {
+            string result = RedisDbconn.Instance.Get<string>("StoreHouseWithdrawalResultsCheckImport:" + key);
+            if (!string.IsNullOrEmpty(result))
+            {
+                string[] datalist = result.Split('|');
+                if (datalist[0] == "success")
+                {
+                    return result;
+                }
+                return datalist[0];
+            }
+            return "0";
+        }
+        public Dictionary<string, object> CheckImportV2(string key)
+        {
+            Dictionary<string, object> Obj = new Dictionary<string, object>();
+            string result = RedisDbconn.Instance.Get<string>("StoreHouseWithdrawalResultsCheckImport:" + key);
+            if (!string.IsNullOrEmpty(result))
+            {
+                string[] datalist = result.Split('|');
+                if (datalist[0] == "success")
+                {
+                    List<string> errList = RedisDbconn.Instance.GetList<string>("ErrList" + key);
+                    if (errList.Count > 0)
+                    {
+                        Obj.Add("status", 2);
+                        Obj.Add("errList", errList);
+                    }
+                    else
+                    {
+                        Obj.Add("status", 1);
+                        Obj.Add("data", result);
+                    }
+                    return Obj;
+                }
+                Obj.Add("status", 0);
+                Obj.Add("data", datalist[0]);
+                return Obj;
+            }
+            Obj.Add("status", -1);
+            Obj.Add("data", "执行中...");
+            return Obj;
+        }
+        #endregion
+
     }
 }

+ 448 - 20
Areas/Admin/Controllers/MainServer/SysToolsController.cs

@@ -1677,7 +1677,7 @@ namespace MySystem.Areas.Admin.Controllers
                         opUserAccount.ValidAmount += oldpos.OpReserve3;
                         opUserAccount.ValidForGetAmount += oldpos.OpReserve2;
                         opUserAccount.TotalAmt += oldpos.OpReserve1;
-
+                        
                         OpAmountItem opAmountItem = new OpAmountItem
                         {
                             UserId = oldpos.OpId,//创客Id
@@ -6049,7 +6049,15 @@ namespace MySystem.Areas.Admin.Controllers
         }
 
         [HttpPost]
-        public string ChangePosFeeDo(string PosSn, string BrandId, string Deposit)
+        /// <summary>
+        /// 调整机具服务费
+        /// </summary>
+        /// <param name="PosSn">机具号</param>
+        /// <param name="BrandId">品牌Id</param>
+        /// <param name="Deposit">服务费</param>
+        /// <param name="OnlyShow">只修改显示</param>
+        /// <returns></returns>
+        public string ChangePosFeeDo(string PosSn, string BrandId, string Deposit, int OnlyShow)
         {
             AddSysLog("0", "SysTools", "ChangePosFeeDo");
             if (string.IsNullOrEmpty(PosSn))
@@ -6092,10 +6100,17 @@ namespace MySystem.Areas.Admin.Controllers
                         {
                             return "失败,无" + Deposit + "服务费相关设置权限";
                         }
-                        var info = PublicChangePosFee.SetJKDeposit(SnId.ToString(), Deposit);
-                        if (info != "设置成功")
+                        if (OnlyShow == 1)
                         {
-                            return info;
+                            posInfo.PrizeParams = Deposit;
+                        }
+                        else
+                        {
+                            var info = PublicChangePosFee.SetJKDeposit(SnId.ToString(), Deposit);
+                            if (info != "设置成功")
+                            {
+                                return info;
+                            }
                         }
                     }
                     //开店宝
@@ -6109,10 +6124,17 @@ namespace MySystem.Areas.Admin.Controllers
                         {
                             return "失败,无" + Deposit + "服务费相关设置权限";
                         }
-                        var info = PublicChangePosFee.SetKDBDeposit(SnId.ToString(), Deposit);
-                        if (info != "设置成功")
+                        if (OnlyShow == 1)
                         {
-                            return info;
+                            posInfo.PrizeParams = Deposit;
+                        }
+                        else
+                        {
+                            var info = PublicChangePosFee.SetKDBDeposit(SnId.ToString(), Deposit);
+                            if (info != "设置成功")
+                            {
+                                return info;
+                            }
                         }
                     }
                     //乐刷
@@ -6125,10 +6147,17 @@ namespace MySystem.Areas.Admin.Controllers
                         {
                             return "失败,无" + Deposit + "服务费相关设置权限";
                         }
-                        var info = PublicChangePosFee.SetLSDeposit(SnId.ToString(), Deposit);
-                        if (info != "设置成功")
+                        if (OnlyShow == 1)
                         {
-                            return info;
+                            posInfo.PrizeParams = Deposit;
+                        }
+                        else
+                        {
+                            var info = PublicChangePosFee.SetLSDeposit(SnId.ToString(), Deposit);
+                            if (info != "设置成功")
+                            {
+                                return info;
+                            }
                         }
                     }
                     //立刷
@@ -6142,10 +6171,17 @@ namespace MySystem.Areas.Admin.Controllers
                         {
                             return "失败,无" + Deposit + "服务费相关设置权限";
                         }
-                        var info = PublicChangePosFee.SetLISDeposit(SnId.ToString(), Deposit);
-                        if (info != "设置成功")
+                        if (OnlyShow == 1)
                         {
-                            return info;
+                            posInfo.PrizeParams = Deposit;
+                        }
+                        else
+                        {
+                            var info = PublicChangePosFee.SetLISDeposit(SnId.ToString(), Deposit);
+                            if (info != "设置成功")
+                            {
+                                return info;
+                            }
                         }
                     }
                     //盛付通
@@ -6192,10 +6228,17 @@ namespace MySystem.Areas.Admin.Controllers
                         {
                             return "失败,无" + Deposit + "服务费相关设置权限";
                         }
-                        var info = PublicChangePosFee.SetLDDeposit(SnId.ToString(), Deposit);
-                        if (info != "设置成功")
+                        if (OnlyShow == 1)
                         {
-                            return info;
+                            posInfo.PrizeParams = Deposit;
+                        }
+                        else
+                        {
+                            var info = PublicChangePosFee.SetLDDeposit(SnId.ToString(), Deposit);
+                            if (info != "设置成功")
+                            {
+                                return info;
+                            }
                         }
                     }
                     //盒易付
@@ -6209,10 +6252,17 @@ namespace MySystem.Areas.Admin.Controllers
                         {
                             return "失败,无" + Deposit + "服务费相关设置权限";
                         }
-                        var info = PublicChangePosFee.SetHYFDeposit(SnId.ToString(), Deposit);
-                        if (info != "设置成功")
+                        if (OnlyShow == 1)
                         {
-                            return info;
+                            posInfo.PrizeParams = Deposit;
+                        }
+                        else
+                        {
+                            var info = PublicChangePosFee.SetHYFDeposit(SnId.ToString(), Deposit);
+                            if (info != "设置成功")
+                            {
+                                return info;
+                            }
                         }
                     }
                 }
@@ -6226,5 +6276,383 @@ namespace MySystem.Areas.Admin.Controllers
         }
         #endregion
 
+
+
+
+
+        #region 添加SP测试绑定数据
+
+        public IActionResult AddBindData(string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+            return View();
+        }
+
+        [HttpPost]
+        public string AddBindDataDo(string PosSn)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == PosSn);
+            if(pos != null)
+            {
+                string CertId = function.get_Random(6) + "********" + function.get_Random(4);
+                string MerName = function.get_Random(20);
+                string AgentName = function.get_Random(20);
+                string MerNo = function.get_Random(20);
+                string Field1 = function.get_Random(20);
+                string Field2 = function.get_Random(20);
+                string Mobile = "13" + function.get_Random(1) + "****" + function.get_Random(4);
+                string ChannelSerial = DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
+                string ProductType = pos.BrandId.ToString();
+                if(ProductType == "3") ProductType = "1";
+                if(ProductType == "5") ProductType = "4";
+                if(ProductType == "11") ProductType = "10";
+                if(ProductType == "13") ProductType = "12";
+
+                SpModels.WebCMSEntities spdb = new SpModels.WebCMSEntities();
+                spdb.BindRecord.Add(new SpModels.BindRecord()
+                {
+                    Status = 1,
+                    CreateDate = DateTime.Now,
+                    SeoKeyword = CertId,
+                    ChannelSerial = ChannelSerial,
+                    UpdateTime = DateTime.Now,
+                    CreateTime = DateTime.Now,
+                    MerNewSnNo = Mobile,
+                    ProductType = ProductType,
+                    MerSnNo = PosSn,
+                    MerName = MerName,
+                    AgentName = AgentName,
+                    MerNo = MerNo,
+                    Field1 = "绑定",
+                    Field2 = Field2,
+                    Field3 = AgentName,
+                });
+                spdb.Merchants.Add(new SpModels.Merchants()
+                {
+                    Status = 1,
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+                    SnNo = PosSn,
+                    UpdateTime = DateTime.Now,
+                    CreateTime = DateTime.Now,
+                    Remark = "商户入库",
+                    ProductType = ProductType,
+                    MerIdcardNo = CertId,
+                    MerMobile = Mobile,
+                    AgentName = AgentName,
+                    MerName = MerName,
+                    MerNo = MerNo,
+                    Field2 = "绑定",
+                });
+                if(ProductType == "12")
+                {
+                    spdb.MerchantRecord.Add(new SpModels.MerchantRecord()
+                    {
+                        Status = 1,
+                        CreateDate = DateTime.Now,
+                        LegalIdCard = CertId,
+                        LegalName = MerName,
+                        ProductType = ProductType,
+                        AgentNo = AgentName,
+                        Field1 = "盒易付H版",
+                        Field2 = function.get_Random(6),
+                        CreateTime = DateTime.Now,
+                        MerNo = MerNo,
+                        MerOperateDate = DateTime.Now,
+                        MerStatus = "正常",
+                        MerName = "成都市美食梦想高档烤鸭店",
+                        AgentName = "成都市聚贤缘信息技术有限公司",
+                    });
+                }
+                spdb.SaveChanges();
+                spdb.Dispose();
+            }
+            db.Dispose();
+            return "提交成功";
+        }
+        #endregion
+
+
+        #region 添加SP测试押金数据
+
+        public IActionResult AddDepositData(string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+            return View();
+        }
+
+        [HttpPost]
+        public string AddDepositDataDo(string PosSn, decimal Deposit)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == PosSn);
+            if(pos != null)
+            {
+                PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId) ?? new PosMerchantInfo();
+                string TradeSerialNo = function.get_Random(30);
+                string MerName = merchant.MerchantName;
+                string AgentName = function.get_Random(20);
+                string MerNo = merchant.KqMerNo;
+                string ChannelSerial = DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
+                string BankCardNo = function.get_Random(6) + "******" + function.get_Random(4);
+                string ProductType = pos.BrandId.ToString();
+                if(ProductType == "3") ProductType = "1";
+                if(ProductType == "5") ProductType = "4";
+                if(ProductType == "11") ProductType = "10";
+                if(ProductType == "13") ProductType = "12";
+
+                if(ProductType == "1")
+                {
+                    spdb.TradeRecord.Add(new SpModels.TradeRecord()
+                    {
+                        Status = 1,
+                        CreateDate = DateTime.Now,
+                        ChannelSerial = ChannelSerial,
+                        AgentNo = AgentName,
+                        ProductType = ProductType,
+                        SettleMethod = "S",
+                        BankCardNo = BankCardNo,
+                        TradeSnNo = PosSn,
+                        BankCardType = "01",
+                        SerEntryMode = "N",
+                        TradeType = "SK",
+                        TradeTime = DateTime.Now.ToString("yyyyMMdd"),
+                        TradeStatus = "3",
+                        TradeAmount = Deposit,
+                        MerNo = MerNo,
+                        MerName = MerName,
+                        TradeSerialNo = "M" + TradeSerialNo,
+                    });
+                }
+                else if(ProductType == "10")
+                {
+                    spdb.TradeRecord.Add(new SpModels.TradeRecord()
+                    {
+                        Status = 1,
+                        CreateDate = DateTime.Now,
+                        ChannelSerial = ChannelSerial,
+                        AgentNo = AgentName,
+                        ProductType = ProductType,
+                        SettleMethod = "S",
+                        BankCardNo = BankCardNo,
+                        TradeSnNo = PosSn,
+                        BankCardType = "01",
+                        SerEntryMode = "1",
+                        TradeType = "M015",
+                        TradeTime = DateTime.Now.ToString("yyyyMMdd"),
+                        TradeStatus = "3",
+                        TradeAmount = Deposit,
+                        MerNo = MerNo,
+                        MerName = MerName,
+                        TradeSerialNo = TradeSerialNo,
+                    });
+                }
+                else if(ProductType == "12")
+                {
+                    spdb.TradeRecord.Add(new SpModels.TradeRecord()
+                    {
+                        Status = 1,
+                        CreateDate = DateTime.Now,
+                        ChannelSerial = ChannelSerial,
+                        AgentNo = AgentName,
+                        ProductType = ProductType,
+                        SettleMethod = "S",
+                        BankCardNo = BankCardNo,
+                        TradeSnNo = PosSn,
+                        BankCardType = "C",
+                        SerEntryMode = "40",
+                        TradeType = "SK",
+                        TradeTime = DateTime.Now.ToString("yyyyMMdd"),
+                        TradeStatus = "S",
+                        TradeAmount = Deposit,
+                        MerNo = MerNo,
+                        MerName = MerName,
+                        TradeSerialNo = TradeSerialNo,
+                    });
+                }
+                else
+                {
+                    spdb.ActivateRecord.Add(new SpModels.ActivateRecord()
+                    {
+                        Status = 1,
+                        CreateDate = DateTime.Now,
+                        SeoTitle = Deposit.ToString(),
+                        ProductType = ProductType,
+                        AgentNo = AgentName,
+                        ActivateDate = DateTime.Now,
+                        ActivateStatus = "00",
+                        SnNo = PosSn,
+                        MerName = MerName,
+                        MerNo = MerNo,
+                        ChannelSerial = ChannelSerial
+                    });
+                }
+                
+                spdb.SaveChanges();
+                spdb.Dispose();
+            }
+            db.Dispose();
+            return "提交成功";
+        }
+        #endregion
+
+
+        #region 添加SP测试交易数据
+
+        public IActionResult AddTradeData(string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+            return View();
+        }
+
+        [HttpPost]
+        public string AddTradeDataDo(string PosSn, decimal Amount)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == PosSn);
+            if(pos != null)
+            {
+                PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId) ?? new PosMerchantInfo();
+                string TradeSerialNo = function.get_Random(30);
+                string MerName = merchant.MerchantName;
+                string AgentName = function.get_Random(20);
+                string MerNo = merchant.KqMerNo;
+                string ChannelSerial = DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
+                string BankCardNo = function.get_Random(6) + "******" + function.get_Random(4);
+                string ProductType = pos.BrandId.ToString();
+                if(ProductType == "3") ProductType = "1";
+                if(ProductType == "5") ProductType = "4";
+                if(ProductType == "11") ProductType = "10";
+                if(ProductType == "13") ProductType = "12";
+
+                if(ProductType == "1")
+                {
+                    spdb.TradeRecord.Add(new SpModels.TradeRecord()
+                    {
+                        Status = 1,
+                        CreateDate = DateTime.Now,
+                        ChannelSerial = ChannelSerial,
+                        AgentNo = AgentName,
+                        ProductType = ProductType,
+                        SettleMethod = "S",
+                        BankCardNo = BankCardNo,
+                        TradeSnNo = PosSn,
+                        BankCardType = "01",
+                        SerEntryMode = "I",
+                        TradeType = "SK",
+                        TradeTime = DateTime.Now.ToString("yyyyMMdd"),
+                        TradeStatus = "3",
+                        TradeAmount = Amount,
+                        MerNo = MerNo,
+                        MerName = MerName,
+                        TradeSerialNo = "M" + TradeSerialNo,
+                    });
+                }
+                else if(ProductType == "10")
+                {
+                    spdb.TradeRecord.Add(new SpModels.TradeRecord()
+                    {
+                        Status = 1,
+                        CreateDate = DateTime.Now,
+                        ChannelSerial = ChannelSerial,
+                        AgentNo = AgentName,
+                        ProductType = ProductType,
+                        SettleMethod = "S",
+                        BankCardNo = BankCardNo,
+                        TradeSnNo = PosSn,
+                        BankCardType = "01",
+                        SerEntryMode = "0",
+                        TradeType = "M015",
+                        TradeTime = DateTime.Now.ToString("yyyyMMdd"),
+                        TradeStatus = "3",
+                        TradeAmount = Amount,
+                        MerNo = MerNo,
+                        MerName = MerName,
+                        TradeSerialNo = TradeSerialNo,
+                    });
+                }
+                else if(ProductType == "12")
+                {
+                    spdb.TradeRecord.Add(new SpModels.TradeRecord()
+                    {
+                        Status = 1,
+                        CreateDate = DateTime.Now,
+                        ChannelSerial = ChannelSerial,
+                        AgentNo = AgentName,
+                        ProductType = ProductType,
+                        SettleMethod = "S",
+                        BankCardNo = BankCardNo,
+                        TradeSnNo = PosSn,
+                        BankCardType = "C",
+                        SerEntryMode = "31",
+                        TradeType = "0",
+                        TradeTime = DateTime.Now.ToString("yyyyMMdd"),
+                        TradeStatus = "S",
+                        TradeAmount = Amount,
+                        MerNo = MerNo,
+                        MerName = MerName,
+                        TradeSerialNo = TradeSerialNo,
+                    });
+                }
+                else if(ProductType == "7")
+                {
+                    spdb.TradeRecord.Add(new SpModels.TradeRecord()
+                    {
+                        Status = 1,
+                        CreateDate = DateTime.Now,
+                        ChannelSerial = ChannelSerial,
+                        AgentNo = AgentName,
+                        ProductType = ProductType,
+                        SettleMethod = "S",
+                        BankCardNo = BankCardNo,
+                        TradeSnNo = PosSn,
+                        BankCardType = "CC",
+                        TradeType = "PUR",
+                        TradeTime = DateTime.Now.ToString("yyyyMMdd"),
+                        TradeStatus = "00",
+                        TradeAmount = Amount,
+                        MerNo = MerNo,
+                        MerName = MerName,
+                        TradeSerialNo = TradeSerialNo,
+                    });
+                }
+                else if(ProductType == "15")
+                {
+                    spdb.TradeRecord.Add(new SpModels.TradeRecord()
+                    {
+                        Status = 1,
+                        CreateDate = DateTime.Now,
+                        ChannelSerial = ChannelSerial,
+                        AgentNo = AgentName,
+                        ProductType = ProductType,
+                        SettleMethod = "S",
+                        BankCardNo = BankCardNo,
+                        TradeSnNo = PosSn,
+                        BankCardType = "02",
+                        TradeType = "104",
+                        TradeTime = DateTime.Now.ToString("yyyyMMdd"),
+                        TradeStatus = "00",
+                        TradeAmount = Amount,
+                        MerNo = MerNo,
+                        MerName = MerName,
+                        TradeSerialNo = TradeSerialNo,
+                    });
+                }
+                
+                spdb.SaveChanges();
+                spdb.Dispose();
+            }
+            db.Dispose();
+            return "提交成功";
+        }
+        #endregion
+
     }
 }

+ 68 - 0
Areas/Admin/Controllers/MainServer/UsersController.cs

@@ -1215,6 +1215,74 @@ namespace MySystem.Areas.Admin.Controllers
         }
         #endregion
 
+
+        #region 通过队列导入数据
+
+        public IActionResult ImportByQueue(string right, string ExcelKind)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+            ViewBag.ExcelKind = ExcelKind;
+            return View();
+        }
+        /// <summary>
+        /// 通过队列导入数据
+        /// </summary>
+        /// <param name="ExcelPath"></param>
+        [HttpPost]
+        public string ImportByQueuePost(string ExcelPath, int Kind = 0)
+        {
+            string key = function.MD5_16(Guid.NewGuid().ToString());
+            RedisDbconn.Instance.AddList("BatchEditUserAmountQueue", ExcelPath + "#cut#" + Kind + "#cut#" + key + "#cut#" + SysUserName);
+            return "success|" + key;
+        }
+        public string CheckImport(string key)
+        {
+            string result = RedisDbconn.Instance.Get<string>("BatchEditUserAmountCheckImport:" + key);
+            if (!string.IsNullOrEmpty(result))
+            {
+                string[] datalist = result.Split('|');
+                if (datalist[0] == "success")
+                {
+                    return result;
+                }
+                return datalist[0];
+            }
+            return "0";
+        }
+        public Dictionary<string, object> CheckImportV2(string key)
+        {
+            Dictionary<string, object> Obj = new Dictionary<string, object>();
+            string result = RedisDbconn.Instance.Get<string>("BatchEditUserAmountCheckImport:" + key);
+            if (!string.IsNullOrEmpty(result))
+            {
+                string[] datalist = result.Split('|');
+                if (datalist[0] == "success")
+                {
+                    List<string> errList = RedisDbconn.Instance.GetList<string>("ErrList" + key);
+                    if (errList.Count > 0)
+                    {
+                        Obj.Add("status", 2);
+                        Obj.Add("errList", errList);
+                    }
+                    else
+                    {
+                        Obj.Add("status", 1);
+                        Obj.Add("data", result);
+                    }
+                    return Obj;
+                }
+                Obj.Add("status", 0);
+                Obj.Add("data", datalist[0]);
+                return Obj;
+            }
+            Obj.Add("status", -1);
+            Obj.Add("data", "执行中...");
+            return Obj;
+        }
+        #endregion
+
+
         #region 导出Excel
 
         /// <summary>

+ 6 - 8
Areas/Admin/Controllers/OperateServer/SysAdminOperateController.cs

@@ -667,7 +667,7 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 account.TotalAmt -= decimal.Parse(OperationAmount);
                 OperateType = 2;//系统扣减
-                description = "系统扣减未使用额度";
+                description = "系统扣减未使用额度" + "-" + Note;
                 ChangeType = 13;
             }
 
@@ -677,7 +677,7 @@ namespace MySystem.Areas.Admin.Controllers
                 // sysAdmin.ReturnAmount = decimal.Parse(OperationAmount);
                 account.TotalAmt += decimal.Parse(OperationAmount);
                 OperateType = 1;//系统增加
-                description = "系统增加未使用额度";
+                description = "系统增加未使用额度" + "-" + Note;
                 ChangeType = 12;
             }
             decimal AfterAmount = account.TotalAmt + account.ValidAmount + account.ValidForGetAmount; //变更后总金额
@@ -687,7 +687,6 @@ namespace MySystem.Areas.Admin.Controllers
 
             if (OperateType > 0 && decimal.Parse(OperationAmount) > 0)
             {
-
                 OpAmountItem opAmountItem = new OpAmountItem
                 {
                     UserId = sysAdmin.UserId,//创客Id
@@ -705,16 +704,15 @@ namespace MySystem.Areas.Admin.Controllers
 
                 RedisDbconn.Instance.AddList("OperateAmountRecordServiceQueue", opAmountItem);
                 AddSysLog(data.Id.ToString(), "SysAdmin", "EditAmt");
+                opdb.SaveChanges();
 
                 if (Kind == 2 && ReturnFlag == 1)
                 {
                     RedisDbconn.Instance.AddList("OperateAddServiceQueue", sysAdmin.Id.ToString());
-
                 }
             }
             return "success";
         }
-
         #endregion
 
 
@@ -751,18 +749,18 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 account.ValidForGetAmount -= decimal.Parse(OperationAmount);
                 OperateType = 2;
-                description = "系统扣减可提现额度";
+                description = "系统扣减可提现额度" + "-" + Note;
                 ChangeType = 13;
             }
             else if (Kind == 1 && decimal.Parse(OperationAmount) > account.ValidForGetAmount)
             {
-                return "扣减金额大于可提现额度";
+                return "扣减金额大于可提现额度" + "-" + Note;
             }
             else if (Kind == 2)
             {
                 account.ValidForGetAmount += decimal.Parse(OperationAmount);
                 OperateType = 1;
-                description = "系统增加可提现额度";
+                description = "系统增加可提现额度" + "-" + Note;
                 ChangeType = 12;
             }
             decimal AfterAmount = account.TotalAmt + account.ValidAmount + account.ValidForGetAmount; //变更后总金额

+ 7 - 7
Areas/Admin/Controllers/OperateServer/UserCashRecordOperateController.cs

@@ -534,23 +534,23 @@ namespace MySystem.Areas.Admin.Controllers
                 UserAccount account = opdb.UserAccount.FirstOrDefault(m => m.Id == edit.UserId);
                 if (account != null)
                 {
-                    decimal TradeAmount = edit.TradeAmount;
-                    decimal BeforeAmount = account.TotalAmt + account.ValidAmount + account.ValidForGetAmount; //变更前总金额
-                    decimal AfterAmount = account.TotalAmt + account.ValidAmount + account.ValidForGetAmount + TradeAmount; //变更后总金额
-                    account.ValidForGetAmount += TradeAmount;//返回可提现余额
+                    // decimal TradeAmount = edit.TradeAmount;
+                    // decimal BeforeAmount = account.TotalAmt + account.ValidAmount + account.ValidForGetAmount; //变更前总金额
+                    // decimal AfterAmount = account.TotalAmt + account.ValidAmount + account.ValidForGetAmount + TradeAmount; //变更后总金额
+                    // account.ValidForGetAmount += TradeAmount;//返回可提现余额
 
                     OpAmountItem opAmountItem = new OpAmountItem
                     {
                         UserId = edit.UserId,//创客Id
-                        OperateType = 1,//操作类型(0 总和 1 增加 2 减少)
+                        OperateType = 1,//操作类型(0 总和 1 增加 2 减少 3驳回)
                         ChangeType = 7,//类别
                         Remark = "提现驳回",//备注
                         UseAmount = edit.TradeAmount,//变更总额度
                         UseValidForGetAmount = edit.TradeAmount,//变更可提现额度
                         UseTotalAmt = 0,//变更未使用额度
                         UseValidAmount = 0,//变更关联分仓额度
-                        DataType = 0,//来源类型,区分表(1订单,2机具,3申请记录,4购买运营中心,5预扣款 6兑换大盟主 7仓库)
-                        DataId = 0//来源Id,表的主键Id
+                        DataType = 8,//来源类型,区分表(1订单,2机具,3申请记录,4购买运营中心,5预扣款 6兑换大盟主 7仓库 8运营中心提现)
+                        DataId = edit.Id//来源Id,表的主键Id
                     };
 
                     RedisDbconn.Instance.AddList("OperateAmountRecordServiceQueue", opAmountItem);

+ 131 - 0
Areas/Admin/Views/MainServer/PreAmountRecord/ImportByQueue.cshtml

@@ -0,0 +1,131 @@
+@{
+    string RightInfo = ViewBag.RightInfo as string;
+    string right = ViewBag.right as string;
+    string ExcelKind = ViewBag.ExcelKind as string;
+    
+}
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>导入数据</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
+    <script src="/admin/js/jquery-1.10.1.min.js"></script>
+    <script src="/admin/js/LAreaData2.js"></script>
+    <style>
+        .layui-form-label{
+            width: 135px !important;
+        }
+        .layui-form-item .layui-input-block{
+            margin-left: 165px !important;
+        }
+    </style>
+</head>
+<body>
+
+    <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
+        <input type="hidden" name="Kind" value="@ExcelKind" />
+        
+        <div class="layui-card">
+          <div class="layui-card-body">
+            <div class="layui-tab" lay-filter="mytabbar">
+                <div class="layui-tab-content mt20">
+                    <div class="layui-tab-item layui-show">
+                        <div class="layui-form-item">
+                            @* <label class="layui-form-label">模板下载</label> *@
+                            <div class="layui-form-mid layui-word-aux" id="excelTemp">
+                                @if(ExcelKind == "1")
+                                {
+                                }
+                            </div>
+                        </div>
+                        <div class="layui-form-item">
+                            <label class="layui-form-label">excel文件</label>
+                            <div class="layui-input-block">
+                                <div class="layui-upload">
+                                    <input type="hidden" id="ExcelPath" name="ExcelPath" value="">
+                                    <button class="layui-btn" type="button" id="ExcelPathBtn">选择</button>
+                                    <div class="layui-inline layui-word-aux"></div>
+                                </div>
+                                <div class="mt10" id="ExcelPathFile">
+                                </div>
+                            </div>
+                        </div>
+                        
+                    </div>
+
+                </div>
+            </div>
+            <div class="layui-form-item layui-hide">
+                <input type="button" lay-submit lay-filter="LAY-list-front-submit" id="LAY-list-front-submit" value="确认">
+            </div>
+          </div>
+        </div>
+    </div>
+
+    <script src="/layuiadmin/layui/layui.js"></script>
+    <script src="/other/oss/upload-min.js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
+    <script src="/other/mybjq/kindeditor-min.js"></script>
+    <script src="/other/mybjq/lang/zh_CN.js"></script>
+    <script>
+        
+                    
+        //编辑器
+        KindEditor.ready(function (K) {
+            
+        });
+
+        
+        var tree;
+        var element;
+        var upload;
+        layui.config({
+            base: '/layuiadmin/' //静态资源所在路径
+        }).extend({
+            index: 'lib/index' //主入口模块
+        }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'], function () {
+            var $ = layui.$
+                , form = layui.form
+                , layer = layui.layer
+                , layedit = layui.layedit
+                , laydate = layui.laydate
+                , croppers = layui.croppers
+                , transfer = layui.transfer
+                , util = layui.util;
+            tree = layui.tree;
+            element = layui.element;
+            upload = layui.upload;
+        
+            //Hash地址的定位
+            var layid = location.hash.replace(/^#test=/, '');
+            element.tabChange('test', layid);
+            element.on('tab(test)', function (elem) {
+                location.hash = 'test=' + $(this).attr('lay-id');
+            });
+    
+            //日期
+            
+
+            //上传文件
+            WebUploadJs('ExcelPathBtn', '@(Library.ConfigurationManager.AppSettings["Database"].ToString())/upload/v2', {width:0,height:0,quality:0},{max_file_size:1048576},  function (filename) {
+                $('#ExcelPathFile').html(filename);
+                $('#ExcelPath').val(filename);
+            });
+
+            //穿梭框
+            
+            
+
+            //TreeView,比如权限管理
+            
+
+            //省市区
+
+        });
+
+    </script>
+</body>
+</html>

+ 2 - 1
Areas/Admin/Views/MainServer/PreAmountRecord/Indexs.cshtml

@@ -140,7 +140,8 @@
         </div>
         <div class="layui-form-item ml10">
             <div class="layui-input-block">
-                <button type="button" class="layui-btn" onclick="ConfirmImport()">立即导入</button>
+                @* <button type="button" class="layui-btn" onclick="ConfirmImport()">立即导入</button> *@
+                <button type="button" class="layui-btn" onclick="ConfirmImportByQueue()">立即导入</button>
             </div>
         </div>
     </div>

+ 131 - 0
Areas/Admin/Views/MainServer/StoreHouseAmountRecord/ImportByQueue.cshtml

@@ -0,0 +1,131 @@
+@{
+    string RightInfo = ViewBag.RightInfo as string;
+    string right = ViewBag.right as string;
+    string ExcelKind = ViewBag.ExcelKind as string;
+    
+}
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>导入数据</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
+    <script src="/admin/js/jquery-1.10.1.min.js"></script>
+    <script src="/admin/js/LAreaData2.js"></script>
+    <style>
+        .layui-form-label{
+            width: 135px !important;
+        }
+        .layui-form-item .layui-input-block{
+            margin-left: 165px !important;
+        }
+    </style>
+</head>
+<body>
+
+    <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
+        <input type="hidden" name="Kind" value="@ExcelKind" />
+        
+        <div class="layui-card">
+          <div class="layui-card-body">
+            <div class="layui-tab" lay-filter="mytabbar">
+                <div class="layui-tab-content mt20">
+                    <div class="layui-tab-item layui-show">
+                        <div class="layui-form-item">
+                            @* <label class="layui-form-label">模板下载</label> *@
+                            <div class="layui-form-mid layui-word-aux" id="excelTemp">
+                                @if(ExcelKind == "1")
+                                {
+                                }
+                            </div>
+                        </div>
+                        <div class="layui-form-item">
+                            <label class="layui-form-label">excel文件</label>
+                            <div class="layui-input-block">
+                                <div class="layui-upload">
+                                    <input type="hidden" id="ExcelPath" name="ExcelPath" value="">
+                                    <button class="layui-btn" type="button" id="ExcelPathBtn">选择</button>
+                                    <div class="layui-inline layui-word-aux"></div>
+                                </div>
+                                <div class="mt10" id="ExcelPathFile">
+                                </div>
+                            </div>
+                        </div>
+                        
+                    </div>
+
+                </div>
+            </div>
+            <div class="layui-form-item layui-hide">
+                <input type="button" lay-submit lay-filter="LAY-list-front-submit" id="LAY-list-front-submit" value="确认">
+            </div>
+          </div>
+        </div>
+    </div>
+
+    <script src="/layuiadmin/layui/layui.js"></script>
+    <script src="/other/oss/upload-min.js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
+    <script src="/other/mybjq/kindeditor-min.js"></script>
+    <script src="/other/mybjq/lang/zh_CN.js"></script>
+    <script>
+        
+                    
+        //编辑器
+        KindEditor.ready(function (K) {
+            
+        });
+
+        
+        var tree;
+        var element;
+        var upload;
+        layui.config({
+            base: '/layuiadmin/' //静态资源所在路径
+        }).extend({
+            index: 'lib/index' //主入口模块
+        }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'], function () {
+            var $ = layui.$
+                , form = layui.form
+                , layer = layui.layer
+                , layedit = layui.layedit
+                , laydate = layui.laydate
+                , croppers = layui.croppers
+                , transfer = layui.transfer
+                , util = layui.util;
+            tree = layui.tree;
+            element = layui.element;
+            upload = layui.upload;
+        
+            //Hash地址的定位
+            var layid = location.hash.replace(/^#test=/, '');
+            element.tabChange('test', layid);
+            element.on('tab(test)', function (elem) {
+                location.hash = 'test=' + $(this).attr('lay-id');
+            });
+    
+            //日期
+            
+
+            //上传文件
+            WebUploadJs('ExcelPathBtn', '@(Library.ConfigurationManager.AppSettings["Database"].ToString())/upload/v2', {width:0,height:0,quality:0},{max_file_size:1048576},  function (filename) {
+                $('#ExcelPathFile').html(filename);
+                $('#ExcelPath').val(filename);
+            });
+
+            //穿梭框
+            
+            
+
+            //TreeView,比如权限管理
+            
+
+            //省市区
+
+        });
+
+    </script>
+</body>
+</html>

+ 124 - 0
Areas/Admin/Views/MainServer/SysTools/AddBindData.cshtml

@@ -0,0 +1,124 @@
+@{
+    string RightInfo = ViewBag.RightInfo as string;
+    string right = ViewBag.right as string;
+    
+}
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>绑定数据</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
+    <script src="/admin/js/jquery-1.10.1.min.js"></script>
+    <script src="/admin/js/LAreaData2.js"></script>
+</head>
+<body>
+
+    <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
+        <form class="layui-form" id="confirmFrm">
+            <div class="layui-card">
+                <div class="layui-card-body">
+                    <div class="layui-tab" lay-filter="mytabbar">
+                        <ul class="layui-tab-title">
+                            <li class="layui-this" lay-id="1">基本信息</li>
+                        </ul>
+                        <div class="layui-tab-content mt20">
+                            <div class="layui-tab-item layui-show">
+                                <div class="layui-form-item">
+                                    <label class="layui-form-label">机具SN</label>
+                                    <div class="layui-input-inline">
+                                        <input class="layui-input" type="text" id="PosSn"
+                                            name="PosSn" maxlength="50" autocomplete="off" placeholder="请输入机具SN">
+                                    </div>
+                                </div>
+                            </div>
+
+                        </div>
+                    </div>
+                    <div class="layui-form-item ml10">
+                        <div class="layui-input-block">
+                            <button type="button" class="layui-btn" onclick="save()">提交</button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+
+    <script src="/layuiadmin/layui/layui.js"></script>
+    <script src="/other/oss/upload-min@(MySystem.OssHelper.Instance.OssStatus ? "-oss" : "").js"></script>
+    <script src="/other/mybjq/kindeditor-min.js"></script>
+    <script src="/other/mybjq/lang/zh_CN.js"></script>
+    <script>
+        function save() {
+            var loadindex = layer.load(1, {
+                shade: [0.5, '#000']
+            });
+            var userdata = $("#confirmFrm").serialize();
+            $.ajax({
+                type: "POST",
+                url: "/Admin/SysTools/AddBindDataDo?r=" + Math.random(1),
+                data: userdata,
+                dataType: "text",
+                success: function (data) {
+                    layer.close(loadindex);
+                    layer.msg("提交成功");
+                }
+            });
+        }
+        
+                    
+        //编辑器
+        KindEditor.ready(function (K) {
+            
+        });
+                
+        var tree;
+        var element;
+        var upload;
+        layui.config({
+            base: '/layuiadmin/' //静态资源所在路径
+        }).extend({
+            index: 'lib/index' //主入口模块
+        }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'], function () {
+            var $ = layui.$
+                , form = layui.form
+                , layer = layui.layer
+                , layedit = layui.layedit
+                , laydate = layui.laydate
+                , croppers = layui.croppers
+                , transfer = layui.transfer
+                , util = layui.util;
+            tree = layui.tree;
+            element = layui.element;
+            upload = layui.upload;
+        
+            //Hash地址的定位
+            var layid = location.hash.replace(/^#test=/, '');
+            element.tabChange('test', layid);
+            element.on('tab(test)', function (elem) {
+                location.hash = 'test=' + $(this).attr('lay-id');
+            });
+    
+            //日期
+            
+
+            //上传文件
+            
+
+            //穿梭框
+            
+
+            //TreeView,比如权限管理
+            
+
+            //省市区
+            
+        })
+
+    </script>
+</body>
+</html>

+ 131 - 0
Areas/Admin/Views/MainServer/SysTools/AddDepositData.cshtml

@@ -0,0 +1,131 @@
+@{
+    string RightInfo = ViewBag.RightInfo as string;
+    string right = ViewBag.right as string;
+    
+}
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>绑定数据</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
+    <script src="/admin/js/jquery-1.10.1.min.js"></script>
+    <script src="/admin/js/LAreaData2.js"></script>
+</head>
+<body>
+
+    <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
+        <form class="layui-form" id="confirmFrm">
+            <div class="layui-card">
+                <div class="layui-card-body">
+                    <div class="layui-tab" lay-filter="mytabbar">
+                        <ul class="layui-tab-title">
+                            <li class="layui-this" lay-id="1">基本信息</li>
+                        </ul>
+                        <div class="layui-tab-content mt20">
+                            <div class="layui-tab-item layui-show">
+                                <div class="layui-form-item">
+                                    <label class="layui-form-label">机具SN</label>
+                                    <div class="layui-input-inline">
+                                        <input class="layui-input" type="text" id="PosSn"
+                                            name="PosSn" maxlength="50" autocomplete="off" placeholder="请输入机具SN">
+                                    </div>
+                                </div>
+                                <div class="layui-form-item">
+                                    <label class="layui-form-label">金额</label>
+                                    <div class="layui-input-inline">
+                                        <input class="layui-input" type="text" id="Deposit"
+                                            name="Deposit" maxlength="50" autocomplete="off" placeholder="请输入金额">
+                                    </div>
+                                </div>
+                            </div>
+
+                        </div>
+                    </div>
+                    <div class="layui-form-item ml10">
+                        <div class="layui-input-block">
+                            <button type="button" class="layui-btn" onclick="save()">提交</button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+
+    <script src="/layuiadmin/layui/layui.js"></script>
+    <script src="/other/oss/upload-min@(MySystem.OssHelper.Instance.OssStatus ? "-oss" : "").js"></script>
+    <script src="/other/mybjq/kindeditor-min.js"></script>
+    <script src="/other/mybjq/lang/zh_CN.js"></script>
+    <script>
+        function save() {
+            var loadindex = layer.load(1, {
+                shade: [0.5, '#000']
+            });
+            var userdata = $("#confirmFrm").serialize();
+            $.ajax({
+                type: "POST",
+                url: "/Admin/SysTools/AddDepositDataDo?r=" + Math.random(1),
+                data: userdata,
+                dataType: "text",
+                success: function (data) {
+                    layer.close(loadindex);
+                    layer.msg("提交成功");
+                }
+            });
+        }
+        
+                    
+        //编辑器
+        KindEditor.ready(function (K) {
+            
+        });
+                
+        var tree;
+        var element;
+        var upload;
+        layui.config({
+            base: '/layuiadmin/' //静态资源所在路径
+        }).extend({
+            index: 'lib/index' //主入口模块
+        }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'], function () {
+            var $ = layui.$
+                , form = layui.form
+                , layer = layui.layer
+                , layedit = layui.layedit
+                , laydate = layui.laydate
+                , croppers = layui.croppers
+                , transfer = layui.transfer
+                , util = layui.util;
+            tree = layui.tree;
+            element = layui.element;
+            upload = layui.upload;
+        
+            //Hash地址的定位
+            var layid = location.hash.replace(/^#test=/, '');
+            element.tabChange('test', layid);
+            element.on('tab(test)', function (elem) {
+                location.hash = 'test=' + $(this).attr('lay-id');
+            });
+    
+            //日期
+            
+
+            //上传文件
+            
+
+            //穿梭框
+            
+
+            //TreeView,比如权限管理
+            
+
+            //省市区
+            
+        })
+
+    </script>
+</body>
+</html>

+ 131 - 0
Areas/Admin/Views/MainServer/SysTools/AddTradeData.cshtml

@@ -0,0 +1,131 @@
+@{
+    string RightInfo = ViewBag.RightInfo as string;
+    string right = ViewBag.right as string;
+    
+}
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>绑定数据</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
+    <script src="/admin/js/jquery-1.10.1.min.js"></script>
+    <script src="/admin/js/LAreaData2.js"></script>
+</head>
+<body>
+
+    <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
+        <form class="layui-form" id="confirmFrm">
+            <div class="layui-card">
+                <div class="layui-card-body">
+                    <div class="layui-tab" lay-filter="mytabbar">
+                        <ul class="layui-tab-title">
+                            <li class="layui-this" lay-id="1">基本信息</li>
+                        </ul>
+                        <div class="layui-tab-content mt20">
+                            <div class="layui-tab-item layui-show">
+                                <div class="layui-form-item">
+                                    <label class="layui-form-label">机具SN</label>
+                                    <div class="layui-input-inline">
+                                        <input class="layui-input" type="text" id="PosSn"
+                                            name="PosSn" maxlength="50" autocomplete="off" placeholder="请输入机具SN">
+                                    </div>
+                                </div>
+                                <div class="layui-form-item">
+                                    <label class="layui-form-label">金额</label>
+                                    <div class="layui-input-inline">
+                                        <input class="layui-input" type="text" id="Amount"
+                                            name="Amount" maxlength="50" autocomplete="off" placeholder="请输入金额">
+                                    </div>
+                                </div>
+                            </div>
+
+                        </div>
+                    </div>
+                    <div class="layui-form-item ml10">
+                        <div class="layui-input-block">
+                            <button type="button" class="layui-btn" onclick="save()">提交</button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </form>
+    </div>
+
+    <script src="/layuiadmin/layui/layui.js"></script>
+    <script src="/other/oss/upload-min@(MySystem.OssHelper.Instance.OssStatus ? "-oss" : "").js"></script>
+    <script src="/other/mybjq/kindeditor-min.js"></script>
+    <script src="/other/mybjq/lang/zh_CN.js"></script>
+    <script>
+        function save() {
+            var loadindex = layer.load(1, {
+                shade: [0.5, '#000']
+            });
+            var userdata = $("#confirmFrm").serialize();
+            $.ajax({
+                type: "POST",
+                url: "/Admin/SysTools/AddTradeDataDo?r=" + Math.random(1),
+                data: userdata,
+                dataType: "text",
+                success: function (data) {
+                    layer.close(loadindex);
+                    layer.msg("提交成功");
+                }
+            });
+        }
+        
+                    
+        //编辑器
+        KindEditor.ready(function (K) {
+            
+        });
+                
+        var tree;
+        var element;
+        var upload;
+        layui.config({
+            base: '/layuiadmin/' //静态资源所在路径
+        }).extend({
+            index: 'lib/index' //主入口模块
+        }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'], function () {
+            var $ = layui.$
+                , form = layui.form
+                , layer = layui.layer
+                , layedit = layui.layedit
+                , laydate = layui.laydate
+                , croppers = layui.croppers
+                , transfer = layui.transfer
+                , util = layui.util;
+            tree = layui.tree;
+            element = layui.element;
+            upload = layui.upload;
+        
+            //Hash地址的定位
+            var layid = location.hash.replace(/^#test=/, '');
+            element.tabChange('test', layid);
+            element.on('tab(test)', function (elem) {
+                location.hash = 'test=' + $(this).attr('lay-id');
+            });
+    
+            //日期
+            
+
+            //上传文件
+            
+
+            //穿梭框
+            
+
+            //TreeView,比如权限管理
+            
+
+            //省市区
+            
+        })
+
+    </script>
+</body>
+</html>

+ 10 - 1
Areas/Admin/Views/MainServer/SysTools/ChangePosFee.cshtml

@@ -56,6 +56,15 @@
                                         </select>
                                     </div>
                                 </div>
+                                <div class="layui-form-item">
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label">只修改显示</label>
+                                        <div class="layui-input-block">
+                                            <input type="checkbox" id="OnlyShow" name="OnlyShow" value="1"
+                                                lay-skin="switch" title="开关">
+                                        </div>
+                                    </div>
+                                </div>
                                 <div class="layui-form-item">
                                     <label class="layui-form-label">机具SN</label>
                                     <div class="layui-input-block">
@@ -88,7 +97,7 @@
                 layer.msg('请输入机具SN');
             }
             else {
-                var index = layer.confirm('确定要调整对应机具费吗?', function (index) {
+                var index = layer.confirm('确定要调整对应机具服务费吗?', function (index) {
                     var indexs = layer.load(1, {
                         shade: [0.5, '#000']
                     });

+ 144 - 0
Areas/Admin/Views/MainServer/Users/ImportByQueue.cshtml

@@ -0,0 +1,144 @@
+@{
+    string RightInfo = ViewBag.RightInfo as string;
+    string right = ViewBag.right as string;
+    string ExcelKind = ViewBag.ExcelKind as string;
+    
+}
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>导入数据</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
+    <script src="/admin/js/jquery-1.10.1.min.js"></script>
+    <script src="/admin/js/LAreaData2.js"></script>
+    <style>
+        .layui-form-label{
+            width: 135px !important;
+        }
+        .layui-form-item .layui-input-block{
+            margin-left: 165px !important;
+        }
+    </style>
+</head>
+<body>
+
+    <div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
+        <input type="hidden" name="Kind" value="@ExcelKind" />
+        
+        <div class="layui-card">
+          <div class="layui-card-body">
+            <div class="layui-tab" lay-filter="mytabbar">
+                <div class="layui-tab-content mt20">
+                    <div class="layui-tab-item layui-show">
+                        <div class="layui-form-item">
+                            <label class="layui-form-label">模板下载</label>
+                            <div class="layui-form-mid layui-word-aux" id="excelTemp">
+                                @if(ExcelKind == "1")
+                                {
+                                <a href="/users/批量修改提现结算金额模版.xlsx">点击下载批量修改提现结算金额模版</a>
+                                }
+                                @if(ExcelKind == "2")
+                                {
+                                <a href="/users/批量修改提现冻结金额模版.xlsx">点击下载批量修改提现冻结金额模版</a>
+                                }
+                                @if(ExcelKind == "3")
+                                {
+                                <a href="/users/提现风控模版.xlsx">点击下载提现风控模版</a>
+                                }
+                                @if(ExcelKind == "4")
+                                {
+                                <a href="/users/批量修改金额模版.xlsx">点击下载批量修改金额模版</a>
+                                }
+                            </div>
+                        </div>
+                        <div class="layui-form-item">
+                            <label class="layui-form-label">excel文件</label>
+                            <div class="layui-input-block">
+                                <div class="layui-upload">
+                                    <input type="hidden" id="ExcelPath" name="ExcelPath" value="">
+                                    <button class="layui-btn" type="button" id="ExcelPathBtn">选择</button>
+                                    <div class="layui-inline layui-word-aux"></div>
+                                </div>
+                                <div class="mt10" id="ExcelPathFile">
+                                </div>
+                            </div>
+                        </div>
+                        
+                    </div>
+
+                </div>
+            </div>
+            <div class="layui-form-item layui-hide">
+                <input type="button" lay-submit lay-filter="LAY-list-front-submit" id="LAY-list-front-submit" value="确认">
+            </div>
+          </div>
+        </div>
+    </div>
+
+    <script src="/layuiadmin/layui/layui.js"></script>
+    <script src="/other/oss/upload-min.js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
+    <script src="/other/mybjq/kindeditor-min.js"></script>
+    <script src="/other/mybjq/lang/zh_CN.js"></script>
+    <script>
+        
+                    
+        //编辑器
+        KindEditor.ready(function (K) {
+            
+        });
+
+        
+        var tree;
+        var element;
+        var upload;
+        layui.config({
+            base: '/layuiadmin/' //静态资源所在路径
+        }).extend({
+            index: 'lib/index' //主入口模块
+        }).use(['index', 'form', 'upload', 'layedit', 'laydate', 'element', 'croppers', 'transfer', 'tree', 'util'], function () {
+            var $ = layui.$
+                , form = layui.form
+                , layer = layui.layer
+                , layedit = layui.layedit
+                , laydate = layui.laydate
+                , croppers = layui.croppers
+                , transfer = layui.transfer
+                , util = layui.util;
+            tree = layui.tree;
+            element = layui.element;
+            upload = layui.upload;
+        
+            //Hash地址的定位
+            var layid = location.hash.replace(/^#test=/, '');
+            element.tabChange('test', layid);
+            element.on('tab(test)', function (elem) {
+                location.hash = 'test=' + $(this).attr('lay-id');
+            });
+    
+            //日期
+            
+
+            //上传文件
+            WebUploadJs('ExcelPathBtn', '@(Library.ConfigurationManager.AppSettings["Database"].ToString())/upload/v2', {width:0,height:0,quality:0},{max_file_size:1048576},  function (filename) {
+                $('#ExcelPathFile').html(filename);
+                $('#ExcelPath').val(filename);
+            });
+
+            //穿梭框
+            
+            
+
+            //TreeView,比如权限管理
+            
+
+            //省市区
+
+        });
+
+    </script>
+</body>
+</html>

+ 2 - 0
Areas/Admin/Views/OperateServer/SysAdminOperate/EditBalance.cshtml

@@ -45,6 +45,8 @@
                                 <option value="2">增加</option>
                             </select>
                         </div>
+                    </div>
+                        </div>
                     </div>
                     <div class="layui-form-item">
                         <label class="layui-form-label">*金额</label>

+ 9 - 1
SpModels/KssMerchant.cs

@@ -5,7 +5,15 @@ namespace MySystem.SpModels
 {
     public partial class KssMerchant
     {
-        public string MerNo { get; set; }
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
         public DateTime? UpdateTime { get; set; }
         public DateTime? CreateTime { get; set; }
         public string Remark { get; set; }

+ 42 - 0
SpModels/MerchantRecord.cs

@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.SpModels
+{
+    public partial class MerchantRecord
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string Areas { get; set; }
+        public string City { get; set; }
+        public string Province { get; set; }
+        public string LegalIdCard { get; set; }
+        public string LegalName { get; set; }
+        public string AgentNo { get; set; }
+        public string Field5 { get; set; }
+        public string Field4 { get; set; }
+        public string Field3 { get; set; }
+        public string Field2 { get; set; }
+        public string Field1 { get; set; }
+        public string ChannelSerial { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public string Remark { get; set; }
+        public string MerNewSnNo { get; set; }
+        public string ProductType { get; set; }
+        public string MerStatus { get; set; }
+        public string MerOperateType { get; set; }
+        public DateTime? MerOperateDate { get; set; }
+        public string MerSnNo { get; set; }
+        public string MerName { get; set; }
+        public string AgentName { get; set; }
+        public string MerNo { get; set; }
+    }
+}

+ 10 - 0
SpModels/OrderNos.cs

@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.SpModels
+{
+    public partial class OrderNos
+    {
+        public string OrderNo { get; set; }
+    }
+}

+ 11 - 0
SpModels/OrderNos2.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.SpModels
+{
+    public partial class OrderNos2
+    {
+        public int Id { get; set; }
+        public string OrderNo { get; set; }
+    }
+}

+ 52 - 0
SpModels/TradeRecordCheck.cs

@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.SpModels
+{
+    public partial class TradeRecordCheck
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string ChannelSerial { get; set; }
+        public string AgentNo { get; set; }
+        public string ProductType { get; set; }
+        public string Remark { get; set; }
+        public string SettleMethod { get; set; }
+        public decimal SettleFee { get; set; }
+        public string BankCardNo { get; set; }
+        public string ReceiptType { get; set; }
+        public string IsStoreCashier { get; set; }
+        public decimal DigAmt { get; set; }
+        public string DigAmtFlag { get; set; }
+        public string MerMobile { get; set; }
+        public string DeviceType { get; set; }
+        public string TradeSnNo { get; set; }
+        public string BankCardType { get; set; }
+        public string SerEntryMode { get; set; }
+        public string TradeType { get; set; }
+        public string TradeTime { get; set; }
+        public string TradeDate { get; set; }
+        public string ErrorMsg { get; set; }
+        public string ErrorCode { get; set; }
+        public string TradeStatus { get; set; }
+        public string DiscountRateFlag { get; set; }
+        public string BankAuthCode { get; set; }
+        public string TradeReferNo { get; set; }
+        public decimal TradeAmount { get; set; }
+        public string MerName { get; set; }
+        public string MerNo { get; set; }
+        public string TradeSerialNo { get; set; }
+        public string Field5 { get; set; }
+        public string Field4 { get; set; }
+        public string Field3 { get; set; }
+        public string Field2 { get; set; }
+        public string Field1 { get; set; }
+    }
+}

+ 394 - 8
SpModels/WebCMSEntities.cs

@@ -31,18 +31,22 @@ namespace MySystem.SpModels
         public virtual DbSet<KssReturnDeposit> KssReturnDeposit { get; set; }
         public virtual DbSet<KssStageRwd> KssStageRwd { get; set; }
         public virtual DbSet<KssTradeFirst> KssTradeFirst { get; set; }
+        public virtual DbSet<MerchantRecord> MerchantRecord { get; set; }
         public virtual DbSet<Merchants> Merchants { get; set; }
+        public virtual DbSet<OrderNos> OrderNos { get; set; }
+        public virtual DbSet<OrderNos2> OrderNos2 { get; set; }
         public virtual DbSet<ProfitRecord> ProfitRecord { get; set; }
         public virtual DbSet<RightDic> RightDic { get; set; }
         public virtual DbSet<SysLog> SysLog { get; set; }
         public virtual DbSet<TradeFluxRecord> TradeFluxRecord { get; set; }
         public virtual DbSet<TradeRecord> TradeRecord { get; set; }
+        public virtual DbSet<TradeRecordCheck> TradeRecordCheck { get; set; }
         public virtual DbSet<UnBindRecord> UnBindRecord { get; set; }
 
         protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
         {
             if (!optionsBuilder.IsConfigured)
-            {                
+            {
                 optionsBuilder.UseMySql(Library.ConfigurationManager.AppSettings["SpSqlConnStr"].ToString(), x => x.ServerVersion("5.7.17-mysql"));
             }
         }
@@ -1184,13 +1188,7 @@ namespace MySystem.SpModels
 
             modelBuilder.Entity<KssMerchant>(entity =>
             {
-                entity.HasKey(e => e.MerNo)
-                    .HasName("PRIMARY");
-
-                entity.Property(e => e.MerNo)
-                    .HasColumnType("varchar(32)")
-                    .HasCharSet("utf8")
-                    .HasCollation("utf8_general_ci");
+                entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.AgentName)
                     .HasColumnType("varchar(64)")
@@ -1202,6 +1200,8 @@ namespace MySystem.SpModels
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
                 entity.Property(e => e.CreateTime).HasColumnType("datetime");
 
                 entity.Property(e => e.MerAuditDate).HasColumnType("datetime");
@@ -1243,11 +1243,34 @@ namespace MySystem.SpModels
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
                 entity.Property(e => e.Remark)
                     .HasColumnType("varchar(64)")
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
                 entity.Property(e => e.UpdateTime).HasColumnType("datetime");
             });
 
@@ -1452,6 +1475,147 @@ namespace MySystem.SpModels
                 entity.Property(e => e.UpdateTime).HasColumnType("datetime");
             });
 
+            modelBuilder.Entity<MerchantRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AgentName)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AgentNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Areas)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ChannelSerial)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.City)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateTime).HasColumnType("datetime");
+
+                entity.Property(e => e.Field1)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field2)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field3)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field4)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field5)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.LegalIdCard)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.LegalName)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerNewSnNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerOperateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.MerOperateType)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerSnNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerStatus)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ProductType)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Province)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateTime).HasColumnType("datetime");
+            });
+
             modelBuilder.Entity<Merchants>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -1580,6 +1744,34 @@ namespace MySystem.SpModels
                 entity.Property(e => e.UpdateTime).HasColumnType("datetime");
             });
 
+            modelBuilder.Entity<OrderNos>(entity =>
+            {
+                entity.HasKey(e => e.OrderNo)
+                    .HasName("PRIMARY");
+
+                entity.HasIndex(e => e.OrderNo)
+                    .HasName("OrderNosIndex");
+
+                entity.Property(e => e.OrderNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("latin1")
+                    .HasCollation("latin1_swedish_ci");
+            });
+
+            modelBuilder.Entity<OrderNos2>(entity =>
+            {
+                entity.HasIndex(e => e.OrderNo)
+                    .HasName("OrderNosIndex");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.OrderNo)
+                    .IsRequired()
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("latin1")
+                    .HasCollation("latin1_swedish_ci");
+            });
+
             modelBuilder.Entity<ProfitRecord>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -2135,6 +2327,200 @@ namespace MySystem.SpModels
                 entity.Property(e => e.UpdateDate).HasColumnType("datetime");
             });
 
+            modelBuilder.Entity<TradeRecordCheck>(entity =>
+            {
+                entity.HasIndex(e => e.ChannelSerial)
+                    .HasName("TradeRecordCheckIndex");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AgentNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BankAuthCode)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BankCardNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BankCardType)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ChannelSerial)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.DeviceType)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.DigAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.DigAmtFlag)
+                    .HasColumnType("varchar(4)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.DiscountRateFlag)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ErrorCode)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ErrorMsg)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field1)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field2)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field3)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field4)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field5)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.IsStoreCashier)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerMobile)
+                    .HasColumnType("varchar(11)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ProductType)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.ReceiptType)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SerEntryMode)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SettleFee).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.SettleMethod)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.TradeDate)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeReferNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeSerialNo)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeSnNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeStatus)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeTime)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeType)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+            });
+
             modelBuilder.Entity<UnBindRecord>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");

+ 29 - 25
Startup.cs

@@ -104,7 +104,7 @@ namespace MySystem
                 Env = "Develop";
                 app.UseDeveloperExceptionPage();
             }
-            else 
+            else
             {
                 Env = "Production";
                 app.UseHsts();
@@ -132,33 +132,37 @@ namespace MySystem
                     name: "default",
                     pattern: "{controller=Home}/{action=Index}/{Id?}");
             });
-            
+
             initMainServer(Env);
             initBsServer();
             initCashServer();
             initSpServer();
             initOperateServer();
 
-            if(Env == "Develop")
-            {
-                SIMPosMerchantTradeService.Instance.Start(); //导入广电卡数据
-                GetRadioCardInfoService.Instance.Start(); //获取行销宝信息
-            }
-            if(Env == "Production")
-            {
-                ResetUserTradeService.Instance.Start();
-                ResetMerchantTradeService.Instance.Start();
-                SycnProfitServiceV3.Instance.Start();
-                SycnHelpProfitService.Instance.Start();
-                ExcelHelper.Instance.Start();
-                OpExcelHelper.Instance.Start();
-                SIMPosMerchantTradeService.Instance.Start(); //导入广电卡数据
-                GetRadioCardInfoService.Instance.Start(); //获取行销宝信息
-                SycnUserMachineCountHelper.Instance.Start(); //重置创客机具数量
-                SIMActCountService.Instance.Start(); //统计注销欠费卡张数
+            // if (Env == "Develop")
+            // {
+            //     SIMPosMerchantTradeService.Instance.Start(); //导入广电卡数据
+            //     // GetRadioCardInfoService.Instance.Start(); //获取行销宝信息
+            // }
+            // if (Env == "Production")
+            // {
+            ResetUserTradeService.Instance.Start();
+            ResetMerchantTradeService.Instance.Start();
+            SycnProfitServiceV3.Instance.Start();
+            SycnHelpProfitService.Instance.Start();
+            ExcelHelper.Instance.Start();
+            OpExcelHelper.Instance.Start();
+            SIMPosMerchantTradeService.Instance.Start(); //导入广电卡数据
+            GetRadioCardInfoService.Instance.Start(); //获取行销宝信息
+            SycnUserMachineCountHelper.Instance.Start(); //重置创客机具数量
+            SIMActCountService.Instance.Start(); //统计注销欠费卡张数
 
-                TestHelper.Instance.Start(); //生成兑换券
-            }
+            TestHelper.Instance.Start(); //生成兑换券
+
+            BatchEditUserAmountService.Instance.Start(); //创客信息相关数据导入
+            StoreHouseWithdrawalResultsService.Instance.Start(); //分仓临额提现结果导入
+            PreWithdrawalResultsService.Instance.Start(); //小分仓临额提现结果导入
+            // }
         }
 
 
@@ -172,10 +176,10 @@ namespace MySystem
         private void initMainServer(string Env)
         {
             string dbName = "KxsMainServer";
-            if(Env == "Production")
-            {
-                dbName = "KxsProfitServer";
-            }
+            // if (Env == "Production")
+            // {
+            //     dbName = "KxsProfitServer";
+            // }
             Dictionary<string, Dictionary<string, string>> tables = new Dictionary<string, Dictionary<string, string>>();
             Library.OtherMySqlConn.connstr = Configuration["Setting:SqlConnStr"];
             System.Data.DataTable tablecollection = Library.OtherMySqlConn.dtable("select DISTINCT TABLE_NAME from information_schema.columns where table_schema = '" + dbName + "'");

+ 6 - 6
appsettings.Development.json

@@ -19,15 +19,15 @@
     "OssHost": "http://oss.kexiaoshuang.com",
     "Database": "KxsMainServer",
     "SqlConnStr": "server=47.108.62.166;port=3306;user=root;password=HDlNs1ZpG5iR9D9I;database=KxsMainServer;charset=utf8;",
-    "ReadSqlConnStr": "server=rr-2vc53lrwpwm1ewscogo.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=liuyang;password=liu#yang@2023;database=KxsProfitServer;charset=utf8;",
-    "StatSqlConnStr": "server=47.108.62.166;port=3306;user=root;password=HDlNs1ZpG5iR9D9I;database=KxsMainServer;charset=utf8;ConnectionTimeout=600;DefaultCommandTimeout=600;",
-    "OpSqlConnStr": "server=47.108.62.166;port=3306;user=root;password=HDlNs1ZpG5iR9D9I;database=KxsOpServer;charset=utf8;",
+    "ReadSqlConnStr": "server=47.108.62.166;port=3306;user=root;password=HDlNs1ZpG5iR9D9I;database=KxsMainServer;charset=utf8;",
+    "StatSqlConnStr": "server=47.108.62.166;port=3306;user=root;password=HDlNs1ZpG5iR9D9I;database=KxsMainServer;charset=utf8;",
     "BsSqlConnStr": "server=47.108.62.166;port=3306;user=root;password=HDlNs1ZpG5iR9D9I;database=KxsBsServer;charset=utf8;",
-    "SpSqlConnStr": "server=47.108.62.166;port=3306;user=root;password=HDlNs1ZpG5iR9D9I;database=KxsSpServer;charset=utf8;",
-    "CashSqlConnStr": "server=47.108.62.166;port=3306;user=root;password=HDlNs1ZpG5iR9D9I;database=KxsCashServer;charset=utf8;",
+    "OpSqlConnStr": "server=47.108.62.166;port=3306;user=root;password=HDlNs1ZpG5iR9D9I;database=KxsOpServer;charset=utf8;",
+    "SpSqlConnStr": "server=47.108.62.166;port=3306;user=KxsSpServer;password=jJ9qKsvwWgQA9xWG;database=KxsSpServer;charset=utf8;",
+    "CashSqlConnStr": "server=47.108.62.166;port=3306;user=KxsCashServer;password=LNGvM18W6SaIGKBC;database=KxsCashServer;charset=utf8;",
     "RedisConnStr": "47.108.62.166:6379,password=klm@redis,DefaultDatabase=1,poolsize=500,preheat=50,asyncPipeline=true",
     "IOSAppVersion": "1.0.0",
-    "AndroidAppVersion": "1.0.0",
+    "AndroidAppVersion": "1.0.0", 
     "OSSKey": "",
     "OSSSecret": "",
     "OSSEndpoint": "",

BIN
wwwroot/.DS_Store


BIN
wwwroot/admin/images/ABackground-logo.png


BIN
wwwroot/layuiadmin/.DS_Store


+ 89 - 10
wwwroot/layuiadmin/modules_main/PreCardAmountRecord_Admin.js

@@ -10,7 +10,7 @@ function ConfirmImport() {
                 layer.msg("导入结果成功", { time: 2000 }, function () {
                     window.location.reload();
                 });
-            }  else if (data.indexOf("warning") == 0) {
+            } else if (data.indexOf("warning") == 0) {
                 var datalist = data.split('|');
                 layer.alert(datalist[0], { time: 20000 }, function () {
                     window.location.reload();
@@ -22,6 +22,39 @@ function ConfirmImport() {
     });
 }
 
+function CheckImport(table, key, loadindex, index) {
+    $.ajax({
+        url: "/Admin/PreAmountRecord/CheckImportV2?r=" + Math.random(1),
+        data: "key=" + key,
+        dataType: "json",
+        success: function (data) {
+            if (data.status == 1) {
+                layer.msg("成功操作" + data.data + "条", {
+                    time: 2000
+                }, function () {
+                    layer.close(index); //关闭弹层
+                    layer.close(loadindex);
+                    table.reload('LAY-list-manage'); //数据刷新
+                });
+            } else if (data.status == 2) {
+                layer.close(index); //关闭弹层
+                layer.close(loadindex);
+                var content = '';
+                for (var i = 0; i < data.errList.length; i++) {
+                    content += data.errList[i] + '<br/>'
+                }
+                layer.alert(content);
+            } else {
+                layer.msg(data.data, {
+                    time: 1000
+                }, function () {
+                    CheckImport(table, key, loadindex, index);
+                });
+            }
+        }
+    });
+}
+
 var excel;
 layui.config({
     base: '/layuiadmin/' //静态资源所在路径
@@ -321,17 +354,63 @@ layui.config({
             layer.full(perContent);
         }
         , ImportData: function () {
-            ExcelKind = 1;
-            layer.open({
-                type: 1,
-                title: '导入',
-                maxmin: false,
-                area: ['460px', '280px'],
-                content: $('#excelForm'),
-                cancel: function () {
+            // ExcelKind = 1;
+            // layer.open({
+            //     type: 1,
+            //     title: '导入',
+            //     maxmin: false,
+            //     area: ['460px', '280px'],
+            //     content: $('#excelForm'),
+            //     cancel: function () {
+            //     }
+            // });
+            // $("#excelTemp");
+
+            var perContent = layer.open({
+                type: 2,
+                title: '导入小分仓临额提现结果',
+                content: 'ImportByQueue?ExcelKind=1',
+                maxmin: true,
+                area: ['650px', '350px'],
+                btn: ['确定', '取消'],
+                yes: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index],
+                        submitID = 'LAY-list-front-submit',
+                        submit = layero.find('iframe').contents().find('#' + submitID);
+
+
+                    //监听提交
+                    iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
+                        var field = data.field; //获取提交的字段
+                        var userdata = "";
+                        for (var prop in field) {
+                            userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
+                        }
+                        //提交 Ajax 成功后,静态更新表格中的数据
+                        //$.ajax({});
+                        var loadindex = layer.load(1, {
+                            shade: [0.5, '#000']
+                        });
+                        $.ajax({
+                            type: "POST",
+                            url: "/Admin/PreAmountRecord/ImportByQueuePost?r=" + Math.random(1),
+                            data: userdata,
+                            dataType: "text",
+                            success: function (data) {
+                                if (data.indexOf("success") == 0) {
+                                    var datalist = data.split('|');
+                                    var key = datalist[1];
+                                    CheckImport(table, key, loadindex, index);
+                                } else {
+                                    layer.msg(data);
+                                }
+                            }
+                        });
+                    });
+
+                    submit.trigger('click');
                 }
             });
-            $("#excelTemp");
         }
         , ExportExcel: function () {
             var userdata = '';

+ 87 - 9
wwwroot/layuiadmin/modules_main/StoreHouseCardAmountRecord_Admin.js

@@ -22,6 +22,38 @@ function ConfirmImport() {
     });
 }
 
+function CheckImport(table, key, loadindex, index) {
+    $.ajax({
+        url: "/Admin/StoreHouseAmountRecord/CheckImportV2?r=" + Math.random(1),
+        data: "key=" + key,
+        dataType: "json",
+        success: function (data) {
+            if (data.status == 1) {
+                layer.msg("成功操作" + data.data + "条", {
+                    time: 2000
+                }, function () {
+                    layer.close(index); //关闭弹层
+                    layer.close(loadindex);
+                    table.reload('LAY-list-manage'); //数据刷新
+                });
+            } else if (data.status == 2) {
+                layer.close(index); //关闭弹层
+                layer.close(loadindex);
+                var content = '';
+                for (var i = 0; i < data.errList.length; i++) {
+                    content += data.errList[i] + '<br/>'
+                }
+                layer.alert(content);
+            } else {
+                layer.msg(data.data, {
+                    time: 1000
+                }, function () {
+                    CheckImport(table, key, loadindex, index);
+                });
+            }
+        }
+    });
+}
 var excel;
 layui.config({
     base: '/layuiadmin/' //静态资源所在路径
@@ -321,17 +353,63 @@ layui.config({
             layer.full(perContent);
         }
         , ImportData: function () {
-            ExcelKind = 1;
-            layer.open({
-                type: 1,
-                title: '导入',
-                maxmin: false,
-                area: ['460px', '280px'],
-                content: $('#excelForm'),
-                cancel: function () {
+            // ExcelKind = 1;
+            // layer.open({
+            //     type: 1,
+            //     title: '导入',
+            //     maxmin: false,
+            //     area: ['460px', '280px'],
+            //     content: $('#excelForm'),
+            //     cancel: function () {
+            //     }
+            // });
+            // $("#excelTemp");
+
+            var perContent = layer.open({
+                type: 2,
+                title: '导入银行卡临额提现结果',
+                content: 'ImportByQueue?ExcelKind=1',
+                maxmin: true,
+                area: ['650px', '350px'],
+                btn: ['确定', '取消'],
+                yes: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index],
+                        submitID = 'LAY-list-front-submit',
+                        submit = layero.find('iframe').contents().find('#' + submitID);
+
+
+                    //监听提交
+                    iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
+                        var field = data.field; //获取提交的字段
+                        var userdata = "";
+                        for (var prop in field) {
+                            userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
+                        }
+                        //提交 Ajax 成功后,静态更新表格中的数据
+                        //$.ajax({});
+                        var loadindex = layer.load(1, {
+                            shade: [0.5, '#000']
+                        });
+                        $.ajax({
+                            type: "POST",
+                            url: "/Admin/StoreHouseAmountRecord/ImportByQueuePost?r=" + Math.random(1),
+                            data: userdata,
+                            dataType: "text",
+                            success: function (data) {
+                                if (data.indexOf("success") == 0) {
+                                    var datalist = data.split('|');
+                                    var key = datalist[1];
+                                    CheckImport(table, key, loadindex, index);
+                                } else {
+                                    layer.msg(data);
+                                }
+                            }
+                        });
+                    });
+
+                    submit.trigger('click');
                 }
             });
-            $("#excelTemp");
         }
         , ExportExcel: function () {
             var userdata = '';

+ 253 - 36
wwwroot/layuiadmin/modules_main/Users_Admin.js

@@ -23,6 +23,39 @@ function ConfirmImport() {
 }
 
 
+function CheckImport(table, key, loadindex, index) {
+    $.ajax({
+        url: "/Admin/Users/CheckImportV2?r=" + Math.random(1),
+        data: "key=" + key,
+        dataType: "json",
+        success: function (data) {
+            if (data.status == 1) {
+                layer.msg("成功操作" + data.data + "条", {
+                    time: 2000
+                }, function () {
+                    layer.close(index); //关闭弹层
+                    layer.close(loadindex);
+                    table.reload('LAY-list-manage'); //数据刷新
+                });
+            } else if (data.status == 2) {
+                layer.close(index); //关闭弹层
+                layer.close(loadindex);
+                var content = '';
+                for (var i = 0; i < data.errList.length; i++) {
+                    content += data.errList[i] + '<br/>'
+                }
+                layer.alert(content);
+            } else {
+                layer.msg(data.data, {
+                    time: 1000
+                }, function () {
+                    CheckImport(table, key, loadindex, index);
+                });
+            }
+        }
+    });
+}
+
 layui.config({
     base: '/layuiadmin/' //静态资源所在路径
 }).extend({
@@ -70,6 +103,7 @@ layui.config({
         var files = e.target.files;
         excel.importExcel(files, {}, function (data) {
             ExcelData = data[0].Sheet1;
+            console.log(data);
         });
     });
 
@@ -894,57 +928,240 @@ layui.config({
             });
         }
         , ImportSettleAmount: function () {
-            ExcelKind = 1;
-            layer.open({
-                type: 1,
-                title: '导入',
-                maxmin: false,
-                area: ['460px', '280px'],
-                content: $('#excelForm'),
-                cancel: function () {
+            // ExcelKind = 1;
+            // layer.open({
+            //     type: 1,
+            //     title: '导入',
+            //     maxmin: false,
+            //     area: ['460px', '280px'],
+            //     content: $('#excelForm'),
+            //     cancel: function () {
+            //     }
+            // });
+            // $("#excelTemp").html('<a href="/users/批量修改提现结算金额模版.xlsx">点击下载批量修改提现结算金额模版</a>');
+            var perContent = layer.open({
+                type: 2,
+                title: '导入结算金额',
+                content: 'ImportByQueue?ExcelKind=1',
+                maxmin: true,
+                area: ['650px', '350px'],
+                btn: ['确定', '取消'],
+                yes: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index],
+                        submitID = 'LAY-list-front-submit',
+                        submit = layero.find('iframe').contents().find('#' + submitID);
+
+
+                    //监听提交
+                    iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
+                        var field = data.field; //获取提交的字段
+                        var userdata = "";
+                        for (var prop in field) {
+                            userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
+                        }
+                        //提交 Ajax 成功后,静态更新表格中的数据
+                        //$.ajax({});
+                        var loadindex = layer.load(1, {
+                            shade: [0.5, '#000']
+                        });
+                        $.ajax({
+                            type: "POST",
+                            url: "/Admin/Users/ImportByQueuePost?r=" + Math.random(1),
+                            data: userdata,
+                            dataType: "text",
+                            success: function (data) {
+                                if (data.indexOf("success") == 0) {
+                                    var datalist = data.split('|');
+                                    var key = datalist[1];
+                                    CheckImport(table, key, loadindex, index);
+                                } else {
+                                    layer.msg(data);
+                                }
+                            }
+                        });
+                    });
+
+                    submit.trigger('click');
                 }
             });
-            $("#excelTemp").html('<a href="/users/批量修改提现结算金额模版.xlsx">点击下载批量修改提现结算金额模版</a>');
         }
         , ImportFreezeAmt: function () {
-            ExcelKind = 2;
-            layer.open({
-                type: 1,
-                title: '导入',
-                maxmin: false,
-                area: ['460px', '280px'],
-                content: $('#excelForm'),
-                cancel: function () {
+            // ExcelKind = 2;
+            // layer.open({
+            //     type: 1,
+            //     title: '导入',
+            //     maxmin: false,
+            //     area: ['460px', '280px'],
+            //     content: $('#excelForm'),
+            //     cancel: function () {
+            //     }
+            // });
+            // $("#excelTemp").html('<a href="/users/批量修改提现冻结金额模版.xlsx">点击下载批量修改提现冻结金额模版</a>');
+
+            var perContent = layer.open({
+                type: 2,
+                title: '导入提现冻结金额',
+                content: 'ImportByQueue?ExcelKind=2',
+                maxmin: true,
+                area: ['650px', '350px'],
+                btn: ['确定', '取消'],
+                yes: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index],
+                        submitID = 'LAY-list-front-submit',
+                        submit = layero.find('iframe').contents().find('#' + submitID);
+
+
+                    //监听提交
+                    iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
+                        var field = data.field; //获取提交的字段
+                        var userdata = "";
+                        for (var prop in field) {
+                            userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
+                        }
+                        //提交 Ajax 成功后,静态更新表格中的数据
+                        //$.ajax({});
+                        var loadindex = layer.load(1, {
+                            shade: [0.5, '#000']
+                        });
+                        $.ajax({
+                            type: "POST",
+                            url: "/Admin/Users/ImportByQueuePost?r=" + Math.random(1),
+                            data: userdata,
+                            dataType: "text",
+                            success: function (data) {
+                                if (data.indexOf("success") == 0) {
+                                    var datalist = data.split('|');
+                                    var key = datalist[1];
+                                    CheckImport(table, key, loadindex, index);
+                                } else {
+                                    layer.msg(data);
+                                }
+                            }
+                        });
+                    });
+
+                    submit.trigger('click');
                 }
             });
-            $("#excelTemp").html('<a href="/users/批量修改提现冻结金额模版.xlsx">点击下载批量修改提现冻结金额模版</a>');
         }
         , ImportRisk: function () {
-            ExcelKind = 3;
-            layer.open({
-                type: 1,
-                title: '导入',
-                maxmin: false,
-                area: ['460px', '280px'],
-                content: $('#excelForm'),
-                cancel: function () {
+            // ExcelKind = 3;
+            // layer.open({
+            //     type: 1,
+            //     title: '导入',
+            //     maxmin: false,
+            //     area: ['460px', '280px'],
+            //     content: $('#excelForm'),
+            //     cancel: function () {
+            //     }
+            // });
+            // $("#excelTemp").html('<a href="/users/提现风控模版.xlsx">点击下载提现风控模版</a>');
+
+            var perContent = layer.open({
+                type: 2,
+                title: '导入风控数据',
+                content: 'ImportByQueue?ExcelKind=3',
+                maxmin: true,
+                area: ['650px', '350px'],
+                btn: ['确定', '取消'],
+                yes: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index],
+                        submitID = 'LAY-list-front-submit',
+                        submit = layero.find('iframe').contents().find('#' + submitID);
+
+
+                    //监听提交
+                    iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
+                        var field = data.field; //获取提交的字段
+                        var userdata = "";
+                        for (var prop in field) {
+                            userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
+                        }
+                        //提交 Ajax 成功后,静态更新表格中的数据
+                        //$.ajax({});
+                        var loadindex = layer.load(1, {
+                            shade: [0.5, '#000']
+                        });
+                        $.ajax({
+                            type: "POST",
+                            url: "/Admin/Users/ImportByQueuePost?r=" + Math.random(1),
+                            data: userdata,
+                            dataType: "text",
+                            success: function (data) {
+                                if (data.indexOf("success") == 0) {
+                                    var datalist = data.split('|');
+                                    var key = datalist[1];
+                                    CheckImport(table, key, loadindex, index);
+                                } else {
+                                    layer.msg(data);
+                                }
+                            }
+                        });
+                    });
+
+                    submit.trigger('click');
                 }
             });
-            $("#excelTemp").html('<a href="/users/提现风控模版.xlsx">点击下载提现风控模版</a>');
         }
         //new function 2022-05-24 
         , ImportEditAmt: function () {
-            ExcelKind = 4;
-            layer.open({
-                type: 1,
-                title: '导入',
-                maxmin: false,
-                area: ['460px', '280px'],
-                content: $('#excelForm'),
-                cancel: function () {
+            // ExcelKind = 4;
+            // layer.open({
+            //     type: 1,
+            //     title: '导入',
+            //     maxmin: false,
+            //     area: ['460px', '280px'],
+            //     content: $('#excelForm'),
+            //     cancel: function () {
+            //     }
+            // });
+            // $("#excelTemp").html('<a href="/users/批量修改金额模版.xlsx">点击下载批量修改金额模版</a>');
+
+            var perContent = layer.open({
+                type: 2,
+                title: '导入修改金额数据',
+                content: 'ImportByQueue?ExcelKind=4',
+                maxmin: true,
+                area: ['650px', '350px'],
+                btn: ['确定', '取消'],
+                yes: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index],
+                        submitID = 'LAY-list-front-submit',
+                        submit = layero.find('iframe').contents().find('#' + submitID);
+
+
+                    //监听提交
+                    iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
+                        var field = data.field; //获取提交的字段
+                        var userdata = "";
+                        for (var prop in field) {
+                            userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
+                        }
+                        //提交 Ajax 成功后,静态更新表格中的数据
+                        //$.ajax({});
+                        var loadindex = layer.load(1, {
+                            shade: [0.5, '#000']
+                        });
+                        $.ajax({
+                            type: "POST",
+                            url: "/Admin/Users/ImportByQueuePost?r=" + Math.random(1),
+                            data: userdata,
+                            dataType: "text",
+                            success: function (data) {
+                                if (data.indexOf("success") == 0) {
+                                    var datalist = data.split('|');
+                                    var key = datalist[1];
+                                    CheckImport(table, key, loadindex, index);
+                                } else {
+                                    layer.msg(data);
+                                }
+                            }
+                        });
+                    });
+
+                    submit.trigger('click');
                 }
             });
-            $("#excelTemp").html('<a href="/users/批量修改金额模版.xlsx">点击下载批量修改金额模版</a>');
         }
         , ExportExcel: function () {
             var userdata = '';

+ 9 - 9
wwwroot/layuiadmin/modules_operate/SysAdminOperate_Admin.js

@@ -91,7 +91,6 @@ layui.config({
         }
     });
 
-
     //excel导入
     excel = layui.excel;
     $('#ExcelFile').change(function (e) {
@@ -252,9 +251,6 @@ layui.config({
                 area: ['550px', '550px'],
                 btn: ['确定', '取消'],
                 yes: function (index, layero) {
-                    loadindex = layer.load(1, {
-                        shade: [0.5, '#000']
-                    });
                     var iframeWindow = window['layui-layer-iframe' + index],
                         submitID = 'LAY-list-front-submit',
                         submit = layero.find('iframe').contents().find('#' + submitID);
@@ -271,6 +267,10 @@ layui.config({
                             //提交 Ajax 成功后,静态更新表格中的数据
                             //$.ajax({});
 
+                            var loadindex = layer.load(1, {
+                                shade: [0.5, '#000']
+                            });
+
                             $.ajax({
                                 type: "POST",
                                 url: "/Admin/SysAdminOperate/EditAmt?r=" + Math.random(1),
@@ -279,6 +279,7 @@ layui.config({
                                 success: function (data) {
                                     clickflag = 0;
                                     layer.close(index); //关闭弹层
+                                    layer.close(loadindex); //关闭弹层
                                     if (data == "success") {
                                         layer.msg("保存成功", {
                                             time: 1500
@@ -286,7 +287,6 @@ layui.config({
                                             table.reload('LAY-list-manage'); //数据刷新
                                         });
                                     } else {
-                                        layer.close(loadindex); //关闭弹层
                                         layer.msg(data);
                                     }
                                 }
@@ -310,9 +310,6 @@ layui.config({
                 area: ['550px', '550px'],
                 btn: ['确定', '取消'],
                 yes: function (index, layero) {
-                    loadindex = layer.load(1, {
-                        shade: [0.5, '#000']
-                    });
                     var iframeWindow = window['layui-layer-iframe' + index],
                         submitID = 'LAY-list-front-submit',
                         submit = layero.find('iframe').contents().find('#' + submitID);
@@ -328,6 +325,9 @@ layui.config({
                             }
                             //提交 Ajax 成功后,静态更新表格中的数据
                             //$.ajax({});
+                            var loadindex = layer.load(1, {
+                                shade: [0.5, '#000']
+                            });
 
                             $.ajax({
                                 type: "POST",
@@ -337,6 +337,7 @@ layui.config({
                                 success: function (data) {
                                     clickflag = 0;
                                     layer.close(index); //关闭弹层
+                                    layer.close(loadindex); //关闭弹层
                                     if (data == "success") {
                                         layer.msg("保存成功", {
                                             time: 1500
@@ -344,7 +345,6 @@ layui.config({
                                             table.reload('LAY-list-manage'); //数据刷新
                                         });
                                     } else {
-                                        layer.close(loadindex); //关闭弹层
                                         layer.msg(data);
                                     }
                                 }

+ 0 - 12
wwwroot/other/mybjq/asp.net/README.txt

@@ -1,12 +0,0 @@
-KindEditor ASP.NET
-
-本ASP.NET程序是演示程序,建议不要直接在实际项目中使用。
-如果您确定直接使用本程序,使用之前请仔细确认相关安全设置。
- 
-使用方法:
-
-1. 解压zip文件,将所有文件复制到IIS的wwwroot/kindeditor目录下。
-
-2. 将kindeditor/asp.net/bin目录下的dll文件复制到wwwroot/bin目录下。
-
-3. 打开浏览器,输入http://localhost:[P0RT]/kindeditor/asp.net/demo.aspx。

BIN
wwwroot/other/mybjq/asp.net/bin/LitJSON.dll


+ 0 - 1
wwwroot/other/mybjq/asp.net/file_manager_json.ashx

@@ -1 +0,0 @@
-<%@ WebHandler Language="C#" CodeBehind="file_manager_json.ashx.cs" Class="RongBeiWeb.kindeditor.asp.net.file_manager_json" %>

+ 0 - 227
wwwroot/other/mybjq/asp.net/file_manager_json.ashx.cs

@@ -1,227 +0,0 @@
-using System;
-using System.Collections;
-using System.Web;
-using System.IO;
-using System.Text.RegularExpressions;
-using LitJson;
-using System.Collections.Generic;
-
-namespace RongBeiWeb.kindeditor.asp.net
-{
-    /// <summary>
-    /// file_manager_json 的摘要说明
-    /// </summary>
-    public class file_manager_json : IHttpHandler
-    {
-
-        public void ProcessRequest(HttpContext context)
-        {
-            String aspxUrl = context.Request.Path.Substring(0, context.Request.Path.LastIndexOf("/") + 1);
-
-            //根目录路径,相对路径
-            String rootPath = "../attached/";
-            //根目录URL,可以指定绝对路径,比如 http://www.yoursite.com/attached/
-            String rootUrl = aspxUrl + "../attached/";
-            //图片扩展名
-            String fileTypes = "gif,jpg,jpeg,png,bmp";
-
-            String currentPath = "";
-            String currentUrl = "";
-            String currentDirPath = "";
-            String moveupDirPath = "";
-
-            String dirPath = context.Server.MapPath(rootPath);
-            String dirName = context.Request.QueryString["dir"];
-            if (!String.IsNullOrEmpty(dirName))
-            {
-                if (Array.IndexOf("image,flash,media,file".Split(','), dirName) == -1)
-                {
-                    context.Response.Write("Invalid Directory name.");
-                    context.Response.End();
-                }
-                dirPath += dirName + "/";
-                rootUrl += dirName + "/";
-                if (!Directory.Exists(dirPath))
-                {
-                    Directory.CreateDirectory(dirPath);
-                }
-            }
-
-            //根据path参数,设置各路径和URL
-            String path = context.Request.QueryString["path"];
-            path = String.IsNullOrEmpty(path) ? "" : path;
-            if (path == "")
-            {
-                currentPath = dirPath;
-                currentUrl = rootUrl;
-                currentDirPath = "";
-                moveupDirPath = "";
-            }
-            else
-            {
-                currentPath = dirPath + path;
-                currentUrl = rootUrl + path;
-                currentDirPath = path;
-                moveupDirPath = Regex.Replace(currentDirPath, @"(.*?)[^\/]+\/$", "$1");
-            }
-
-            //排序形式,name or size or type
-            String order = context.Request.QueryString["order"];
-            order = String.IsNullOrEmpty(order) ? "" : order.ToLower();
-
-            //不允许使用..移动到上一级目录
-            if (Regex.IsMatch(path, @"\.\."))
-            {
-                context.Response.Write("Access is not allowed.");
-                context.Response.End();
-            }
-            //最后一个字符不是/
-            if (path != "" && !path.EndsWith("/"))
-            {
-                context.Response.Write("Parameter is not valid.");
-                context.Response.End();
-            }
-            //目录不存在或不是目录
-            if (!Directory.Exists(currentPath))
-            {
-                context.Response.Write("Directory does not exist.");
-                context.Response.End();
-            }
-
-            //遍历目录取得文件信息
-            string[] dirList = Directory.GetDirectories(currentPath);
-            string[] fileList = Directory.GetFiles(currentPath);
-
-            switch (order)
-            {
-                case "size":
-                    Array.Sort(dirList, new NameSorter());
-                    Array.Sort(fileList, new SizeSorter());
-                    break;
-                case "type":
-                    Array.Sort(dirList, new NameSorter());
-                    Array.Sort(fileList, new TypeSorter());
-                    break;
-                case "name":
-                default:
-                    Array.Sort(dirList, new NameSorter());
-                    Array.Sort(fileList, new NameSorter());
-                    break;
-            }
-
-            Hashtable result = new Hashtable();
-            result["moveup_dir_path"] = moveupDirPath;
-            result["current_dir_path"] = currentDirPath;
-            result["current_url"] = currentUrl;
-            result["total_count"] = dirList.Length + fileList.Length;
-            List<Hashtable> dirFileList = new List<Hashtable>();
-            result["file_list"] = dirFileList;
-            for (int i = 0; i < dirList.Length; i++)
-            {
-                DirectoryInfo dir = new DirectoryInfo(dirList[i]);
-                Hashtable hash = new Hashtable();
-                hash["is_dir"] = true;
-                hash["has_file"] = (dir.GetFileSystemInfos().Length > 0);
-                hash["filesize"] = 0;
-                hash["is_photo"] = false;
-                hash["filetype"] = "";
-                hash["filename"] = dir.Name;
-                hash["datetime"] = dir.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
-                dirFileList.Add(hash);
-            }
-            for (int i = 0; i < fileList.Length; i++)
-            {
-                FileInfo file = new FileInfo(fileList[i]);
-                Hashtable hash = new Hashtable();
-                hash["is_dir"] = false;
-                hash["has_file"] = false;
-                hash["filesize"] = file.Length;
-                hash["is_photo"] = (Array.IndexOf(fileTypes.Split(','), file.Extension.Substring(1).ToLower()) >= 0);
-                hash["filetype"] = file.Extension.Substring(1);
-                hash["filename"] = file.Name;
-                hash["datetime"] = file.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
-                dirFileList.Add(hash);
-            }
-            context.Response.AddHeader("Content-Type", "application/json; charset=UTF-8");
-            context.Response.Write(JsonMapper.ToJson(result));
-            context.Response.End();
-        }
-
-        public class NameSorter : IComparer
-        {
-            public int Compare(object x, object y)
-            {
-                if (x == null && y == null)
-                {
-                    return 0;
-                }
-                if (x == null)
-                {
-                    return -1;
-                }
-                if (y == null)
-                {
-                    return 1;
-                }
-                FileInfo xInfo = new FileInfo(x.ToString());
-                FileInfo yInfo = new FileInfo(y.ToString());
-
-                return xInfo.FullName.CompareTo(yInfo.FullName);
-            }
-        }
-
-        public class SizeSorter : IComparer
-        {
-            public int Compare(object x, object y)
-            {
-                if (x == null && y == null)
-                {
-                    return 0;
-                }
-                if (x == null)
-                {
-                    return -1;
-                }
-                if (y == null)
-                {
-                    return 1;
-                }
-                FileInfo xInfo = new FileInfo(x.ToString());
-                FileInfo yInfo = new FileInfo(y.ToString());
-
-                return xInfo.Length.CompareTo(yInfo.Length);
-            }
-        }
-
-        public class TypeSorter : IComparer
-        {
-            public int Compare(object x, object y)
-            {
-                if (x == null && y == null)
-                {
-                    return 0;
-                }
-                if (x == null)
-                {
-                    return -1;
-                }
-                if (y == null)
-                {
-                    return 1;
-                }
-                FileInfo xInfo = new FileInfo(x.ToString());
-                FileInfo yInfo = new FileInfo(y.ToString());
-
-                return xInfo.Extension.CompareTo(yInfo.Extension);
-            }
-        }
-
-        public bool IsReusable
-        {
-            get
-            {
-                return false;
-            }
-        }
-    }
-}

+ 0 - 227
wwwroot/other/mybjq/asp.net/file_manager_json1.ashx

@@ -1,227 +0,0 @@
-<%@ webhandler Language="C#" class="FileManager" %>
-
-/**
- * KindEditor ASP.NET
- *
- * 本ASP.NET程序是演示程序,建议不要直接在实际项目中使用。
- * 如果您确定直接使用本程序,使用之前请仔细确认相关安全设置。
- *
- */
-
-using System;
-using System.Collections;
-using System.Web;
-using System.IO;
-using System.Text.RegularExpressions;
-using LitJson;
-using System.Collections.Generic;
-
-public class FileManager : IHttpHandler
-{
-	public void ProcessRequest(HttpContext context)
-	{
-		String aspxUrl = context.Request.Path.Substring(0, context.Request.Path.LastIndexOf("/") + 1);
-
-		//根目录路径,相对路径
-		String rootPath = "../attached/";
-		//根目录URL,可以指定绝对路径,比如 http://www.yoursite.com/attached/
-		String rootUrl = aspxUrl + "../attached/";
-		//图片扩展名
-		String fileTypes = "gif,jpg,jpeg,png,bmp";
-
-		String currentPath = "";
-		String currentUrl = "";
-		String currentDirPath = "";
-		String moveupDirPath = "";
-
-		String dirPath = context.Server.MapPath(rootPath);
-		String dirName = context.Request.QueryString["dir"];
-		if (!String.IsNullOrEmpty(dirName)) {
-			if (Array.IndexOf("image,flash,media,file".Split(','), dirName) == -1) {
-				context.Response.Write("Invalid Directory name.");
-				context.Response.End();
-			}
-			dirPath += dirName + "/";
-			rootUrl += dirName + "/";
-			if (!Directory.Exists(dirPath)) {
-				Directory.CreateDirectory(dirPath);
-			}
-		}
-
-		//根据path参数,设置各路径和URL
-		String path = context.Request.QueryString["path"];
-		path = String.IsNullOrEmpty(path) ? "" : path;
-		if (path == "")
-		{
-			currentPath = dirPath;
-			currentUrl = rootUrl;
-			currentDirPath = "";
-			moveupDirPath = "";
-		}
-		else
-		{
-			currentPath = dirPath + path;
-			currentUrl = rootUrl + path;
-			currentDirPath = path;
-			moveupDirPath = Regex.Replace(currentDirPath, @"(.*?)[^\/]+\/$", "$1");
-		}
-
-		//排序形式,name or size or type
-		String order = context.Request.QueryString["order"];
-		order = String.IsNullOrEmpty(order) ? "" : order.ToLower();
-
-		//不允许使用..移动到上一级目录
-		if (Regex.IsMatch(path, @"\.\."))
-		{
-			context.Response.Write("Access is not allowed.");
-			context.Response.End();
-		}
-		//最后一个字符不是/
-		if (path != "" && !path.EndsWith("/"))
-		{
-			context.Response.Write("Parameter is not valid.");
-			context.Response.End();
-		}
-		//目录不存在或不是目录
-		if (!Directory.Exists(currentPath))
-		{
-			context.Response.Write("Directory does not exist.");
-			context.Response.End();
-		}
-
-		//遍历目录取得文件信息
-		string[] dirList = Directory.GetDirectories(currentPath);
-		string[] fileList = Directory.GetFiles(currentPath);
-
-		switch (order)
-		{
-			case "size":
-				Array.Sort(dirList, new NameSorter());
-				Array.Sort(fileList, new SizeSorter());
-				break;
-			case "type":
-				Array.Sort(dirList, new NameSorter());
-				Array.Sort(fileList, new TypeSorter());
-				break;
-			case "name":
-			default:
-				Array.Sort(dirList, new NameSorter());
-				Array.Sort(fileList, new NameSorter());
-				break;
-		}
-
-		Hashtable result = new Hashtable();
-		result["moveup_dir_path"] = moveupDirPath;
-		result["current_dir_path"] = currentDirPath;
-		result["current_url"] = currentUrl;
-		result["total_count"] = dirList.Length + fileList.Length;
-		List<Hashtable> dirFileList = new List<Hashtable>();
-		result["file_list"] = dirFileList;
-		for (int i = 0; i < dirList.Length; i++)
-		{
-			DirectoryInfo dir = new DirectoryInfo(dirList[i]);
-			Hashtable hash = new Hashtable();
-			hash["is_dir"] = true;
-			hash["has_file"] = (dir.GetFileSystemInfos().Length > 0);
-			hash["filesize"] = 0;
-			hash["is_photo"] = false;
-			hash["filetype"] = "";
-			hash["filename"] = dir.Name;
-			hash["datetime"] = dir.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
-			dirFileList.Add(hash);
-		}
-		for (int i = 0; i < fileList.Length; i++)
-		{
-			FileInfo file = new FileInfo(fileList[i]);
-			Hashtable hash = new Hashtable();
-			hash["is_dir"] = false;
-			hash["has_file"] = false;
-			hash["filesize"] = file.Length;
-			hash["is_photo"] = (Array.IndexOf(fileTypes.Split(','), file.Extension.Substring(1).ToLower()) >= 0);
-			hash["filetype"] = file.Extension.Substring(1);
-			hash["filename"] = file.Name;
-			hash["datetime"] = file.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
-			dirFileList.Add(hash);
-		}
-		context.Response.AddHeader("Content-Type", "application/json; charset=UTF-8");
-		context.Response.Write(JsonMapper.ToJson(result));
-		context.Response.End();
-	}
-
-	public class NameSorter : IComparer
-	{
-		public int Compare(object x, object y)
-		{
-			if (x == null && y == null)
-			{
-				return 0;
-			}
-			if (x == null)
-			{
-				return -1;
-			}
-			if (y == null)
-			{
-				return 1;
-			}
-			FileInfo xInfo = new FileInfo(x.ToString());
-			FileInfo yInfo = new FileInfo(y.ToString());
-
-			return xInfo.FullName.CompareTo(yInfo.FullName);
-		}
-	}
-
-	public class SizeSorter : IComparer
-	{
-		public int Compare(object x, object y)
-		{
-			if (x == null && y == null)
-			{
-				return 0;
-			}
-			if (x == null)
-			{
-				return -1;
-			}
-			if (y == null)
-			{
-				return 1;
-			}
-			FileInfo xInfo = new FileInfo(x.ToString());
-			FileInfo yInfo = new FileInfo(y.ToString());
-
-			return xInfo.Length.CompareTo(yInfo.Length);
-		}
-	}
-
-	public class TypeSorter : IComparer
-	{
-		public int Compare(object x, object y)
-		{
-			if (x == null && y == null)
-			{
-				return 0;
-			}
-			if (x == null)
-			{
-				return -1;
-			}
-			if (y == null)
-			{
-				return 1;
-			}
-			FileInfo xInfo = new FileInfo(x.ToString());
-			FileInfo yInfo = new FileInfo(y.ToString());
-
-			return xInfo.Extension.CompareTo(yInfo.Extension);
-		}
-	}
-
-	public bool IsReusable
-	{
-		get
-		{
-			return true;
-		}
-	}
-}

+ 0 - 1
wwwroot/other/mybjq/asp.net/upload_json.ashx

@@ -1 +0,0 @@
-<%@ WebHandler Language="C#" CodeBehind="upload_json.ashx.cs" Class="MySystem.mybjq.asp.net.upload_json" %>

+ 0 - 136
wwwroot/other/mybjq/asp.net/upload_json.ashx.cs

@@ -1,136 +0,0 @@
-using System;
-using System.Collections;
-using System.Web;
-using System.IO;
-using System.Globalization;
-using Library;
-using LitJson;
-
-namespace MySystem.mybjq.asp.net
-{
-    /// <summary>
-    /// upload_json 的摘要说明
-    /// </summary>
-    public class upload_json : IHttpHandler
-    {
-        private HttpContext context;
-
-        public void ProcessRequest(HttpContext context)
-        {
-            String aspxUrl = context.Request.Path.Substring(0, context.Request.Path.LastIndexOf("/") + 1);
-
-            //文件保存目录路径
-            String savePath = "/up/";
-
-            //文件保存目录URL
-            String saveUrl = "/up/";
-
-            //定义允许上传的文件扩展名
-            Hashtable extTable = new Hashtable();
-            extTable.Add("image", "gif,jpg,jpeg,png,bmp");
-            extTable.Add("flash", "swf,flv");
-            extTable.Add("media", "swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb,mp4");
-            extTable.Add("file", "doc,docx,xls,xlsx,ppt,htm,html,txt,zip,rar,gz,bz2");
-
-            //最大文件大小
-            long maxSize = 1073741824000;
-            this.context = context;
-
-            HttpPostedFile imgFile = context.Request.Files["imgFile"];
-            if (imgFile == null)
-            {
-                showError("请选择文件。");
-            }
-
-            String dirPath = context.Server.MapPath(savePath);
-            if (!Directory.Exists(dirPath))
-            {
-                //showError("上传目录不存在。");
-                Directory.CreateDirectory(dirPath);
-            }
-
-            String dirName = context.Request.QueryString["dir"];
-            if (String.IsNullOrEmpty(dirName))
-            {
-                dirName = "image";
-            }
-            if (!extTable.ContainsKey(dirName))
-            {
-                showError("目录名不正确。");
-            }
-
-            String fileName = imgFile.FileName;
-            String fileExt = Path.GetExtension(fileName).ToLower();
-
-            if (imgFile.InputStream == null || imgFile.InputStream.Length > maxSize)
-            {
-                showError("上传文件大小超过限制。");
-            }
-
-            if (String.IsNullOrEmpty(fileExt) || Array.IndexOf(((String)extTable[dirName]).Split(','), fileExt.Substring(1).ToLower()) == -1)
-            {
-                showError("上传文件扩展名是不允许的扩展名。\n只允许" + ((String)extTable[dirName]) + "格式。");
-            }
-
-            //创建文件夹
-            dirPath += dirName + "/";
-            saveUrl += dirName + "/";
-            if (!Directory.Exists(dirPath))
-            {
-                Directory.CreateDirectory(dirPath);
-            }
-            String ymd = DateTime.Now.ToString("yyyyMMdd", DateTimeFormatInfo.InvariantInfo);
-            dirPath += ymd + "/";
-            saveUrl += ymd + "/";
-            if (!Directory.Exists(dirPath))
-            {
-                Directory.CreateDirectory(dirPath);
-            }
-            String newFileName = DateTime.Now.ToString("yyyyMMddHHmmss_ffff", DateTimeFormatInfo.InvariantInfo) + fileExt;
-            String filePath = dirPath + newFileName;
-            imgFile.SaveAs(filePath);
-            String fileUrl = saveUrl + newFileName;
-            if (dirName != "media")
-            {
-                if (!function.check_pic(filePath))
-                {
-                    File.Delete(filePath);
-                    context.Response.End();
-                }
-                if (function.getImgRule(filePath)["width"] > 2000)
-                {
-                    String newFileName_sl = DateTime.Now.ToString("yyyyMMddHHmmss_ffff", DateTimeFormatInfo.InvariantInfo) + "_sl" + fileExt;
-                    function.imgcut(2000, filePath, dirPath + newFileName_sl);
-                    File.Delete(filePath);
-                    fileUrl = saveUrl + newFileName_sl;
-                }
-            }
-
-            Hashtable hash = new Hashtable();
-            hash["error"] = 0;
-            hash["url"] = MySystem.OssHelper.Instance.SourceHost + fileUrl;
-            MySystem.OssHelper.Instance.ScanQueue(fileUrl, "");
-            context.Response.AddHeader("Content-Type", "text/html; charset=UTF-8");
-            context.Response.Write(JsonMapper.ToJson(hash));
-            context.Response.End();
-        }
-
-        private void showError(string message)
-        {
-            Hashtable hash = new Hashtable();
-            hash["error"] = 1;
-            hash["message"] = message;
-            context.Response.AddHeader("Content-Type", "text/html; charset=UTF-8");
-            context.Response.Write(JsonMapper.ToJson(hash));
-            context.Response.End();
-        }
-
-        public bool IsReusable
-        {
-            get
-            {
-                return false;
-            }
-        }
-    }
-}

+ 0 - 139
wwwroot/other/mybjq/asp.net/upload_json1.ashx

@@ -1,139 +0,0 @@
-<%@ webhandler Language="C#" class="Upload" %>
-
-/**
- * KindEditor ASP.NET
- *
- * 本ASP.NET程序是演示程序,建议不要直接在实际项目中使用。
- * 如果您确定直接使用本程序,使用之前请仔细确认相关安全设置。
- *
- */
-
-using System;
-using System.Collections;
-using System.Web;
-using System.IO;
-using System.Globalization;
-using LitJson;
-
-public class Upload : IHttpHandler
-{
-	private HttpContext context;
-
-    public void ProcessRequest(HttpContext context)
-    {
-        String aspxUrl = context.Request.Path.Substring(0, context.Request.Path.LastIndexOf("/") + 1);
-
-        //文件保存目录路径
-        String savePath = "/up/v2/";
-
-        //文件保存目录URL
-        String saveUrl = "/up/v2/";
-
-        //定义允许上传的文件扩展名
-        Hashtable extTable = new Hashtable();
-        extTable.Add("image", "gif,jpg,jpeg,png,bmp");
-        extTable.Add("flash", "swf,flv");
-        extTable.Add("media", "swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb,mp4");
-        extTable.Add("file", "doc,docx,xls,xlsx,ppt,htm,html,txt,zip,rar,gz,bz2");
-
-        //最大文件大小
-        long maxSize = 1073741824000;
-        this.context = context;
-
-        HttpPostedFile imgFile = context.Request.Files["imgFile"];
-        if (imgFile == null)
-        {
-            showError("请选择文件。");
-        }
-
-        String dirPath = context.Server.MapPath(savePath);
-        if (!Directory.Exists(dirPath))
-        {
-            //showError("上传目录不存在。");
-            Directory.CreateDirectory(dirPath);
-        }
-
-        String dirName = context.Request.QueryString["dir"];
-        if (String.IsNullOrEmpty(dirName))
-        {
-            dirName = "image";
-        }
-        if (!extTable.ContainsKey(dirName))
-        {
-            showError("目录名不正确。");
-        }
-
-        String fileName = imgFile.FileName;
-        String fileExt = Path.GetExtension(fileName).ToLower();
-
-        if (imgFile.InputStream == null || imgFile.InputStream.Length > maxSize)
-        {
-            showError("上传文件大小超过限制。");
-        }
-
-        if (String.IsNullOrEmpty(fileExt) || Array.IndexOf(((String)extTable[dirName]).Split(','), fileExt.Substring(1).ToLower()) == -1)
-        {
-            showError("上传文件扩展名是不允许的扩展名。\n只允许" + ((String)extTable[dirName]) + "格式。");
-        }
-
-        //创建文件夹
-        dirPath += dirName + "/";
-        saveUrl += dirName + "/";
-        if (!Directory.Exists(dirPath))
-        {
-            Directory.CreateDirectory(dirPath);
-        }
-        String ymd = DateTime.Now.ToString("yyyyMMdd", DateTimeFormatInfo.InvariantInfo);
-        dirPath += ymd + "/";
-        saveUrl += ymd + "/";
-        if (!Directory.Exists(dirPath))
-        {
-            Directory.CreateDirectory(dirPath);
-        }
-        String newFileName = DateTime.Now.ToString("yyyyMMddHHmmss_ffff", DateTimeFormatInfo.InvariantInfo) + fileExt;
-        String filePath = dirPath + newFileName;
-        imgFile.SaveAs(filePath);
-        String fileUrl = saveUrl + newFileName;
-        if (dirName != "media")
-        {
-            if (!Library.function.check_pic(filePath))
-            {
-                File.Delete(filePath);
-                context.Response.End();
-            }
-            if (Library.function.getImgRule(filePath)["width"] > 1000)
-            {
-                String newFileName_sl = DateTime.Now.ToString("yyyyMMddHHmmss_ffff", DateTimeFormatInfo.InvariantInfo) + "_sl" + fileExt;
-                Library.function.imgcut(1000, filePath, dirPath + newFileName_sl);
-                File.Delete(filePath);
-                fileUrl = saveUrl + newFileName_sl;
-            }
-        }
-
-        Hashtable hash = new Hashtable();
-        hash["error"] = 0;
-        hash["url"] = MySystem.OssHelper.Instance.SourceHost + fileUrl;
-        MySystem.OssHelper.Instance.ScanQueue(fileUrl, "");
-        context.Response.AddHeader("Content-Type", "text/html; charset=UTF-8");
-        context.Response.Write(JsonMapper.ToJson(hash));
-        context.Response.End();
-    }
-
-	private void showError(string message)
-	{
-		Hashtable hash = new Hashtable();
-		hash["error"] = 1;
-		hash["message"] = message;
-		context.Response.AddHeader("Content-Type", "text/html; charset=UTF-8");
-		context.Response.Write(JsonMapper.ToJson(hash));
-		context.Response.End();
-	}
-
-	public bool IsReusable
-	{
-		get
-		{
-			return true;
-		}
-	}
-}

Разница между файлами не показана из-за своего большого размера
+ 8 - 0
wwwroot/other/oss/upload-min-oss.js


Разница между файлами не показана из-за своего большого размера
+ 3 - 0
wwwroot/other/oss/upload-min-oss.jsold


Некоторые файлы не были показаны из-за большого количества измененных файлов