Procházet zdrojové kódy

助利宝分润展示到账逻辑

lichunlei před 3 roky
rodič
revize
94ce0c587b
29 změnil soubory, kde provedl 2220 přidání a 8 odebrání
  1. 143 0
      AppStart/Helper/SycnHelpProfitService.cs
  2. 3 5
      AppStart/Helper/SycnProfitServiceV2.cs
  3. 13 0
      AppStart/RelationClass.cs
  4. 398 0
      Areas/Admin/Controllers/MainServer/HelpProfitRewardController.cs
  5. 203 0
      Areas/Admin/Views/MainServer/HelpProfitReward/Add.cshtml
  6. 205 0
      Areas/Admin/Views/MainServer/HelpProfitReward/Edit.cshtml
  7. 137 0
      Areas/Admin/Views/MainServer/HelpProfitReward/Index.cshtml
  8. 47 0
      Models/BrokenMachineChange.cs
  9. 34 0
      Models/BrokenMachineChangeDetail.cs
  10. 33 0
      Models/HelpProfitReward.cs
  11. 44 0
      Models/HelpProfitRewardDetail.cs
  12. 20 0
      Models/SchoolMorningMeetLog.cs
  13. 445 0
      Models/WebCMSEntities.cs
  14. 3 2
      Startup.cs
  15. binární
      bin/Debug/netcoreapp3.0/MySystem.dll
  16. binární
      bin/Debug/netcoreapp3.0/MySystem.pdb
  17. binární
      bin/release/netcoreapp3.0/MySystem.Views.dll
  18. binární
      bin/release/netcoreapp3.0/MySystem.Views.pdb
  19. binární
      bin/release/netcoreapp3.0/MySystem.dll
  20. binární
      bin/release/netcoreapp3.0/MySystem.pdb
  21. binární
      obj/Debug/netcoreapp3.0/MySystem.dll
  22. binární
      obj/Debug/netcoreapp3.0/MySystem.pdb
  23. 1 1
      obj/release/netcoreapp3.0/MySystem.RazorCoreGenerate.cache
  24. binární
      obj/release/netcoreapp3.0/MySystem.Views.dll
  25. binární
      obj/release/netcoreapp3.0/MySystem.Views.pdb
  26. 3 0
      obj/release/netcoreapp3.0/MySystem.csproj.FileListAbsolute.txt
  27. binární
      obj/release/netcoreapp3.0/MySystem.dll
  28. binární
      obj/release/netcoreapp3.0/MySystem.pdb
  29. 488 0
      wwwroot/layuiadmin/modules_main/HelpProfitReward_Admin.js

+ 143 - 0
AppStart/Helper/SycnHelpProfitService.cs

@@ -0,0 +1,143 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Threading;
+using MySystem.Models;
+using Library;
+
+namespace MySystem
+{
+    public class SycnHelpProfitService
+    {
+        public readonly static SycnHelpProfitService Instance = new SycnHelpProfitService();
+        private SycnHelpProfitService()
+        { }
+
+        public void Start()
+        {
+            Thread th = new Thread(doSomething);
+            th.IsBackground = true;
+            th.Start();
+        }
+
+        public void doSomething()
+        {
+            while (true)
+            {
+                string content = RedisDbconn.Instance.RPop<string>("SycnHelpProfitQueue");
+                if (!string.IsNullOrEmpty(content))
+                {
+                    try
+                    {
+                        function.WriteLog(DateTime.Now.ToString() + "\r\n\r\n", "同步助利宝分润数据");
+                        string[] data = content.Split(new string[] { "#cut#" }, StringSplitOptions.None);
+                        string date = data[0];
+                        int OpType = int.Parse(data[1]);
+                        string SysUserName = data[2];
+                        if (OpType == 0)
+                        {
+                            DoHelpProfit(date, SysUserName);
+                        }
+                        else if (OpType == 1)
+                        {
+                            DoHelpProfit2(date, SysUserName);
+                        }
+                        function.WriteLog(DateTime.Now.ToString() + "\r\n\r\n", "同步助利宝分润数据");
+                    }
+                    catch (Exception ex)
+                    {
+                        function.WriteLog(DateTime.Now.ToString() + ":" + ex.ToString(), "同步助利宝分润数据异常");
+                    }
+                }
+                else
+                {
+                    Thread.Sleep(60000);
+                }
+            }
+        }
+
+
+        #region 助力宝分润展示
+
+        public void DoHelpProfit(string month, string sysUserName)
+        {
+            OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+            OtherMySqlConn.dtable("update HelpProfitReward set Status=1 where Status=0 and TradeMonth='" + month + "'");
+        }
+
+        #endregion
+
+        #region 助力宝分润到账
+
+        public void DoHelpProfit2(string month, string sysUserName)
+        {
+            WebCMSEntities db = new WebCMSEntities();
+            OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+            
+            DataTable dt = OtherMySqlConn.dtable("select UserId,RewardType,sum(CreditRewardAmount),sum(CreditTradeAmt) from HelpProfitReward where Status=1 and TradeMonth='" + month + "' GROUP BY UserId,RewardType");
+            function.WriteLog("数量:" + dt.Rows.Count, "同步助力宝分润数据");
+            int index = 0;
+            foreach (DataRow dr in dt.Rows)
+            {
+                index += 1;
+                int UserId = int.Parse(dr["UserId"].ToString());
+                int RewardType = int.Parse(dr["RewardType"].ToString());
+                decimal ProfitMoney = decimal.Parse(dr[2].ToString());
+                decimal TradeAmt = decimal.Parse(dr[3].ToString());
+                var tran = db.Database.BeginTransaction();
+                try
+                {
+                    Users user = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
+                    UserAccount account = db.UserAccount.FirstOrDefault(m => m.Id == UserId);
+                    if (account == null)
+                    {
+                        account = db.UserAccount.Add(new UserAccount()
+                        {
+                            Id = UserId,
+                            UserId = UserId,
+                        }).Entity;
+                        db.SaveChanges();
+                    }
+                    decimal BeforeTotalAmount = account.TotalAmount; //变更前总金额
+                    decimal BeforeFreezeAmount = account.FreezeAmount; //变更前冻结金额
+                    decimal BeforeBalanceAmount = account.BalanceAmount; //变更前余额
+                    account.BalanceAmount += ProfitMoney;
+                    account.TotalAmount += ProfitMoney;
+                    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 = UserId, //创客
+                        ProductType = 101,
+                        ChangeType = RewardType, //变动类型
+                        ChangeAmount = ProfitMoney, //变更金额
+                        BeforeTotalAmount = BeforeTotalAmount, //变更前总金额
+                        AfterTotalAmount = AfterTotalAmount, //变更后总金额
+                        BeforeFreezeAmount = BeforeFreezeAmount, //变更前冻结金额
+                        AfterFreezeAmount = AfterFreezeAmount, //变更后冻结金额
+                        BeforeBalanceAmount = BeforeBalanceAmount, //变更前余额
+                        AfterBalanceAmount = AfterBalanceAmount, //变更后余额
+                        Remark = user.RealName.Substring(0, 1) + "**:" + DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") + "交易" + TradeAmt.ToString("f2"),
+                    }).Entity;
+                    db.SaveChanges();
+                    tran.Commit();
+                }
+                catch (Exception ex)
+                {
+                    function.WriteLog(DateTime.Now.ToString() + "\n" + UserId + "," + ProfitMoney + "\n" + ex.ToString(), "同步助利宝分润异常");
+                    tran.Rollback();
+                }
+                function.WriteLog(index.ToString(), "同步补贴数据");
+            }
+            OtherMySqlConn.dtable("update HelpProfitReward set Status=2 where Status=1 and TradeMonth='" + month + "'");
+                
+            db.Dispose();
+        }
+
+        #endregion
+    }
+}

+ 3 - 5
AppStart/Helper/SycnProfitServiceV2.cs

@@ -40,13 +40,11 @@ namespace MySystem
                         {
                             DoTradeProfit(BrandId, date, SysUserName);
                             DoSubsidyProfit(BrandId, date);
-                            DoHelpProfit(date);
                         }
                         else if (OpType == 1)
                         {
                             DoTradeProfit2(BrandId, date, SysUserName);
                             DoSubsidyProfit2(BrandId, date);
-                            DoHelpProfit2(date);
                         }
                         function.WriteLog(DateTime.Now.ToString() + "\r\n\r\n", "同步分润数据");
                     }
@@ -277,7 +275,7 @@ namespace MySystem
 
         #region 助力宝分润展示
 
-        private void DoHelpProfit(string month)
+        public void DoHelpProfit(string month)
         {
             OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
             OtherMySqlConn.dtable("update HelpProfitReward set Status=1 where Status=0 and TradeMonth='" + month + "'");
@@ -287,7 +285,7 @@ namespace MySystem
 
         #region 助力宝分润到账
 
-        private void DoHelpProfit2(string month)
+        public void DoHelpProfit2(string month)
         {
             WebCMSEntities db = new WebCMSEntities();
             OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
@@ -330,7 +328,7 @@ namespace MySystem
                         UpdateDate = DateTime.Now,
                         UserId = UserId, //创客
                         ProductType = 101,
-                        ChangeType = 111, //变动类型
+                        ChangeType = RewardType, //变动类型
                         ChangeAmount = ProfitMoney, //变更金额
                         BeforeTotalAmount = BeforeTotalAmount, //变更前总金额
                         AfterTotalAmount = AfterTotalAmount, //变更后总金额

+ 13 - 0
AppStart/RelationClass.cs

@@ -499,5 +499,18 @@ namespace MySystem
             return "";
         }
 
+        public static string GetKqProductsInfo(int key)
+        {
+            using (WebCMSEntities db = new WebCMSEntities())
+            {
+                KqProducts item = db.KqProducts.FirstOrDefault(m => m.Id == key);
+                if (item != null)
+                {
+                    return item.Name;
+                }
+            }
+            return "";
+        }
+
     }
 }

+ 398 - 0
Areas/Admin/Controllers/MainServer/HelpProfitRewardController.cs

@@ -0,0 +1,398 @@
+/*
+ * 助利宝分润
+ */
+
+using System;
+using System.Web;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Http;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;
+using MySystem.Models;
+using Library;
+using LitJson;
+using MySystemLib;
+
+namespace MySystem.Areas.Admin.Controllers
+{
+    [Area("Admin")]
+    [Route("Admin/[controller]/[action]")]
+    public class HelpProfitRewardController : BaseController
+    {
+        public HelpProfitRewardController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
+        {
+            OtherMySqlConn.connstr = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+        }
+
+        #region 助利宝分润列表
+
+        /// <summary>
+        /// 根据条件查询助利宝分润列表
+        /// </summary>
+        /// <returns></returns>
+        public IActionResult Index(HelpProfitReward data, string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+
+            return View();
+        }
+
+        #endregion
+
+        #region 根据条件查询助利宝分润列表
+
+        /// <summary>
+        /// 助利宝分润列表
+        /// </summary>
+        /// <returns></returns>
+        public JsonResult IndexData(HelpProfitReward data, string BrandIdSelect, string CheckStatusSelect, int page = 1, int limit = 30)
+        {
+
+            Dictionary<string, string> Fields = new Dictionary<string, string>();
+
+            Fields.Add("CreateDate", "3"); //时间
+            Fields.Add("TradeDate", "3"); //达标日期
+
+
+            string condition = " and Status>-1";
+            //品牌
+            if (!string.IsNullOrEmpty(BrandIdSelect))
+            {
+                condition += " and BrandId=" + BrandIdSelect;
+            }
+            //验证和同步账户状态
+            if (!string.IsNullOrEmpty(CheckStatusSelect))
+            {
+                condition += " and CheckStatus=" + CheckStatusSelect;
+            }
+
+
+            Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("HelpProfitReward", Fields, "Id desc", "0", page, limit, condition);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            foreach (Dictionary<string, object> dic in diclist)
+            {
+                //创客
+                int UserId = int.Parse(function.CheckInt(dic["UserId"].ToString()));
+                Users userid_Users = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
+                dic["UserIdMakerCode"] = userid_Users.MakerCode;
+                dic["UserIdRealName"] = userid_Users.RealName;
+                dic.Remove("UserId");
+                //品牌
+                dic["BrandId"] = RelationClass.GetKqProductsInfo(int.Parse(dic["BrandId"].ToString()));
+                //奖励类型
+                int RewardType = int.Parse(dic["RewardType"].ToString());
+                if (RewardType == 1) dic["RewardType"] = "分润";
+                if (RewardType == 112) dic["RewardType"] = "推荐奖励";
+                if (RewardType == 0) dic["RewardType"] = "";
+                //验证和同步账户状态
+                int CheckStatus = int.Parse(dic["CheckStatus"].ToString());
+                if (CheckStatus == 0) dic["CheckStatus"] = "初始";
+                if (CheckStatus == 1) dic["CheckStatus"] = "已验证和同步";
+
+            }
+            return Json(obj);
+        }
+
+        #endregion
+
+        #region 增加助利宝分润
+
+        /// <summary>
+        /// 增加或修改助利宝分润信息
+        /// </summary>
+        /// <returns></returns>
+        public IActionResult Add(string right)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+
+            return View();
+        }
+
+        #endregion
+
+        #region 增加助利宝分润
+
+        /// <summary>
+        /// 增加或修改助利宝分润信息
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        public string Add(HelpProfitReward data)
+        {
+            Dictionary<string, object> Fields = new Dictionary<string, object>();
+
+
+            Fields.Add("SeoTitle", data.SeoTitle);
+            Fields.Add("SeoKeyword", data.SeoKeyword);
+            Fields.Add("SeoDescription", data.SeoDescription);
+            int Id = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Add("HelpProfitReward", Fields, 0);
+            AddSysLog(data.Id.ToString(), "HelpProfitReward", "add");
+            db.SaveChanges();
+
+            return "success";
+        }
+
+        #endregion
+
+        #region 修改助利宝分润
+
+        /// <summary>
+        /// 增加或修改助利宝分润信息
+        /// </summary>
+        /// <returns></returns>
+        public IActionResult Edit(string right, int Id = 0)
+        {
+            ViewBag.RightInfo = RightInfo;
+            ViewBag.right = right;
+
+
+            HelpProfitReward editData = db.HelpProfitReward.FirstOrDefault(m => m.Id == Id) ?? new HelpProfitReward();
+            ViewBag.data = editData;
+            return View();
+        }
+
+        #endregion
+
+        #region 修改助利宝分润
+
+        /// <summary>
+        /// 增加或修改助利宝分润信息
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        public string Edit(HelpProfitReward data)
+        {
+            Dictionary<string, object> Fields = new Dictionary<string, object>();
+
+
+            Fields.Add("SeoTitle", data.SeoTitle);
+            Fields.Add("SeoKeyword", data.SeoKeyword);
+            Fields.Add("SeoDescription", data.SeoDescription);
+            new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("HelpProfitReward", Fields, data.Id);
+            AddSysLog(data.Id.ToString(), "HelpProfitReward", "update");
+            db.SaveChanges();
+
+            return "success";
+        }
+
+        #endregion
+
+        #region 删除助利宝分润信息
+
+        /// <summary>
+        /// 删除助利宝分润信息
+        /// </summary>
+        /// <returns></returns>
+        public string Delete(string Id)
+        {
+            string[] idlist = Id.Split(new char[] { ',' });
+            AddSysLog(Id, "HelpProfitReward", "del");
+            foreach (string subid in idlist)
+            {
+                int id = int.Parse(subid);
+                Dictionary<string, object> Fields = new Dictionary<string, object>();
+                Fields.Add("Status", -1);
+                new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("HelpProfitReward", Fields, id);
+            }
+            db.SaveChanges();
+
+            return "success";
+        }
+
+        #endregion
+
+        #region 开启
+
+        /// <summary>
+        /// 开启
+        /// </summary>
+        /// <returns></returns>
+        public string Open(string Id)
+        {
+            string[] idlist = Id.Split(new char[] { ',' });
+            AddSysLog(Id, "HelpProfitReward", "open");
+            foreach (string subid in idlist)
+            {
+                int id = int.Parse(subid);
+                Dictionary<string, object> Fields = new Dictionary<string, object>();
+                Fields.Add("Status", 1);
+                new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("HelpProfitReward", Fields, id);
+            }
+            db.SaveChanges();
+            return "success";
+        }
+
+        #endregion
+
+        #region 关闭
+
+        /// <summary>
+        /// 关闭
+        /// </summary>
+        /// <returns></returns>
+        public string Close(string Id)
+        {
+            string[] idlist = Id.Split(new char[] { ',' });
+            AddSysLog(Id, "HelpProfitReward", "close");
+            foreach (string subid in idlist)
+            {
+                int id = int.Parse(subid);
+                Dictionary<string, object> Fields = new Dictionary<string, object>();
+                Fields.Add("Status", 0);
+                new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("HelpProfitReward", Fields, id);
+            }
+            db.SaveChanges();
+            return "success";
+        }
+
+        #endregion
+
+        #region 排序
+        /// <summary>
+        /// 排序
+        /// </summary>
+        /// <param name="Id"></param>
+        public string Sort(int Id, int Sort)
+        {
+            new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Sort("HelpProfitReward", Sort, Id);
+
+            AddSysLog(Id.ToString(), "HelpProfitReward", "sort");
+            return "success";
+        }
+        #endregion
+
+        #region 导入数据
+        /// <summary>
+        /// 导入数据
+        /// </summary>
+        /// <param name="ExcelData"></param>
+        public string Import(string ExcelData)
+        {
+            ExcelData = HttpUtility.UrlDecode(ExcelData);
+            JsonData list = JsonMapper.ToObject(ExcelData);
+            for (int i = 1; i < list.Count; i++)
+            {
+                JsonData dr = list[i];
+
+                db.HelpProfitReward.Add(new HelpProfitReward()
+                {
+                    CreateDate = DateTime.Now,
+                    UpdateDate = DateTime.Now,
+
+                });
+                db.SaveChanges();
+            }
+            AddSysLog("0", "HelpProfitReward", "Import");
+            return "success";
+        }
+        #endregion
+
+        #region 导出Excel
+
+        /// <summary>
+        /// 导出Excel
+        /// </summary>
+        /// <returns></returns>
+        public JsonResult ExportExcel(HelpProfitReward data, string BrandIdSelect, string CheckStatusSelect)
+        {
+            Dictionary<string, string> Fields = new Dictionary<string, string>();
+            Fields.Add("CreateDate", "3"); //时间
+            Fields.Add("TradeDate", "3"); //达标日期
+
+
+            string condition = " and Status>-1";
+            //品牌
+            if (!string.IsNullOrEmpty(BrandIdSelect))
+            {
+                condition += " and BrandId=" + BrandIdSelect;
+            }
+            //验证和同步账户状态
+            if (!string.IsNullOrEmpty(CheckStatusSelect))
+            {
+                condition += " and CheckStatus=" + CheckStatusSelect;
+            }
+
+
+            Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("HelpProfitReward", Fields, "Id desc", "0", 1, 20000, condition, "TradeDate,UserId,BrandId,RewardType,CreditTradeAmt,DebitTradeAmt,CreditRewardAmount,DebitRewardAmount,RewardMerCount,CheckStatus", false);
+            List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
+            foreach (Dictionary<string, object> dic in diclist)
+            {
+                //创客
+                int UserId = int.Parse(function.CheckInt(dic["UserId"].ToString()));
+                Users userid_Users = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
+                dic["UserIdMakerCode"] = userid_Users.MakerCode;
+                dic["UserIdRealName"] = userid_Users.RealName;
+                dic.Remove("UserId");
+                //品牌
+                dic["BrandId"] = RelationClass.GetKqProductsInfo(int.Parse(dic["BrandId"].ToString()));
+                //奖励类型
+                int RewardType = int.Parse(dic["RewardType"].ToString());
+                if (RewardType == 1) dic["RewardType"] = "分润";
+                if (RewardType == 112) dic["RewardType"] = "推荐奖励";
+                if (RewardType == 0) dic["RewardType"] = "";
+                //验证和同步账户状态
+                int CheckStatus = int.Parse(dic["CheckStatus"].ToString());
+                if (CheckStatus == 0) dic["CheckStatus"] = "初始";
+                if (CheckStatus == 1) dic["CheckStatus"] = "已验证和同步";
+
+            }
+
+            Dictionary<string, object> result = new Dictionary<string, object>();
+            result.Add("Status", "1");
+            result.Add("Info", "Excel报表-" + DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss") + ".xlsx");
+            result.Add("Obj", diclist);
+            Dictionary<string, object> ReturnFields = new Dictionary<string, object>();
+            ReturnFields.Add("TradeDate", "达标日期");
+            ReturnFields.Add("UserIdMakerCode", "创客创客编号");
+            ReturnFields.Add("UserIdRealName", "创客真实姓名");
+            ReturnFields.Add("BrandId", "品牌");
+            ReturnFields.Add("RewardType", "奖励类型");
+            ReturnFields.Add("CreditTradeAmt", "贷记卡交易总金额");
+            ReturnFields.Add("DebitTradeAmt", "借记卡交易总金额");
+            ReturnFields.Add("CreditRewardAmount", "贷记卡交易奖励金额");
+            ReturnFields.Add("DebitRewardAmount", "借记记卡交易奖励金额");
+            ReturnFields.Add("RewardMerCount", "达标商户数");
+            ReturnFields.Add("CheckStatus", "验证和同步账户状态");
+
+            result.Add("Fields", ReturnFields);
+            AddSysLog("0", "HelpProfitReward", "ExportExcel");
+            return Json(result);
+        }
+
+        #endregion
+
+
+
+
+        #region 同步到余额
+
+        public string SycnData(int OpType = 0)
+        {
+            string date = DateTime.Now.AddMonths(-1).ToString("yyyyMM");
+            string OpTypeString = "";
+            if(OpType > 0)
+            {
+                OpTypeString += "-" + OpType;
+            }
+            string check = function.ReadInstance("/HelpBalance/" + date + OpTypeString + ".txt");
+            if (string.IsNullOrEmpty(check))
+            {
+                function.WritePage("/HelpBalance/", date + OpTypeString + ".txt", DateTime.Now.ToString());
+                RedisDbconn.Instance.AddList("SycnHelpProfitQueue", date + "#cut#" + OpType + "#cut#" + SysUserName);
+                return "success";
+            }
+            return date + "分润已同步,请勿重复操作";
+        }
+
+        #endregion
+
+    }
+}

+ 203 - 0
Areas/Admin/Views/MainServer/HelpProfitReward/Add.cshtml

@@ -0,0 +1,203 @@
+@{
+    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">
+        
+        <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>
+
+                </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@(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>
+        
+                    
+        //编辑器
+        KindEditor.ready(function (K) {
+            
+        });
+
+        var ids = "";
+        function getChildren(obj) {
+            $.each(obj, function (index, value) {
+                var id = obj[index].id;
+                ids += id + ",";
+                var children = obj[index].children;
+                if (children) {
+                    getChildren(children);
+                }
+            });
+        }
+
+        function AreasProvinceInit(tagId, areasVal, form) {
+            for (var i = 0; i < provs_data.length; i++) {
+                var sel = "";
+                if (areasVal.indexOf(provs_data[i].text) > -1) {
+                    sel = " selected=selected";
+                }
+                $("#" + tagId + "Province").append('<option value="' + provs_data[i].value + '"' + sel + '>' + provs_data[i].text + '</option>');
+            }
+            form.render();
+        }
+
+        function AreasProvinceSelected(tagId, areasVal, form, value) {
+            $("#" + tagId + "City").html('<option value="">市</option>');
+            var list = citys_data[value];
+            for (var i = 0; i < list.length; i++) {
+                var sel = "";
+                if (areasVal.indexOf(list[i].text) > -1) {
+                    sel = " selected=selected";
+                }
+                $("#" + tagId + "City").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text + '</option>');
+            }
+            $("#" + tagId + "Area").html('<option value="">县/区</option>');
+            form.render();
+            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
+        }
+
+        function AreasCitySelected(tagId, areasVal, form, value) {
+            $("#" + tagId + "Area").html('<option value="">县/区</option>');
+            var list = dists_data[value];
+            for (var i = 0; i < list.length; i++) {
+                var sel = "";
+                if (areasVal.indexOf(list[i].text) > -1) {
+                    sel = " selected=selected";
+                }
+                $("#" + tagId + "Area").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text + '</option>');
+            }
+            form.render();
+            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
+        }
+
+        function AreasAreaSelected(tagId, form) {
+            form.render();
+            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
+        }
+        function movePrev(obj, tagId) {
+            $(obj).parent().prev().insertAfter($(obj).parent());
+            checkPics(tagId);
+        }
+        function moveNext(obj, tagId) {
+            $(obj).parent().next().insertBefore($(obj).parent());
+            checkPics(tagId);
+        }
+        function deletePic(obj, tagId) {
+            $(obj).parent().remove();
+            checkPics(tagId);
+        }
+        function checkPics(tagId) {
+            var pics = "";
+            var texts = "";
+            $("#" + tagId + "Image div img").each(function (i) {
+                pics += $(this).attr("src").replace(osshost, '') + "|";
+            });
+            $("#" + tagId + "Image div input").each(function (i) {
+                texts += $(this).val() + "|";
+            });
+            if (pics == "") {
+                $("#" + tagId).val("");
+            } else {
+                pics = pics.substring(0, pics.length - 1);
+                texts = texts.substring(0, pics.length - 1);
+                $("#" + tagId).val(pics + "#cut#" + texts);
+            }
+        }
+        function checkBox(tagId) {
+            var text = "";
+            $("input[type=checkbox][name=" + tagId + "List]:checked").each(function (i) {
+                text += $(this).val() + ",";
+            });
+            $("#" + tagId).val(text);
+        }
+        function showBigPic(picpath) {
+            parent.layer.open({
+                type: 1,
+                title: false,
+                closeBtn: 0,
+                shadeClose: true,
+                area: ['auto', 'auto'],
+                content: '<img src="' + picpath + '" style="max-width:800px; max-height:800px;" />'
+            });
+        }
+
+        
+        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>

+ 205 - 0
Areas/Admin/Views/MainServer/HelpProfitReward/Edit.cshtml

@@ -0,0 +1,205 @@
+@using MySystem.Models;
+@{HelpProfitReward editData = ViewBag.data as HelpProfitReward;}
+@{
+    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">
+        <input type="hidden" name="Id" value="@editData.Id" />
+        
+        <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>
+
+                </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@(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>
+        
+        
+        //编辑器
+        KindEditor.ready(function (K) {
+            
+        });
+
+        var ids = "";
+        function getChildren(obj) {
+            $.each(obj, function (index, value) {
+                var id = obj[index].id;
+                ids += id + ",";
+                var children = obj[index].children;
+                if (children) {
+                    getChildren(children);
+                }
+            });
+        }
+
+        function AreasProvinceInit(tagId, areasVal, form) {
+            for (var i = 0; i < provs_data.length; i++) {
+                var sel = "";
+                if (areasVal.indexOf(provs_data[i].text) > -1) {
+                    sel = " selected=selected";
+                }
+                $("#" + tagId + "Province").append('<option value="' + provs_data[i].value + '"' + sel + '>' + provs_data[i].text + '</option>');
+            }
+            form.render();
+        }
+
+        function AreasProvinceSelected(tagId, areasVal, form, value) {
+            $("#" + tagId + "City").html('<option value="">市</option>');
+            var list = citys_data[value];
+            for (var i = 0; i < list.length; i++) {
+                var sel = "";
+                if (areasVal.indexOf(list[i].text) > -1) {
+                    sel = " selected=selected";
+                }
+                $("#" + tagId + "City").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text + '</option>');
+            }
+            $("#" + tagId + "Area").html('<option value="">县/区</option>');
+            form.render();
+            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
+        }
+
+        function AreasCitySelected(tagId, areasVal, form, value) {
+            $("#" + tagId + "Area").html('<option value="">县/区</option>');
+            var list = dists_data[value];
+            for (var i = 0; i < list.length; i++) {
+                var sel = "";
+                if (areasVal.indexOf(list[i].text) > -1) {
+                    sel = " selected=selected";
+                }
+                $("#" + tagId + "Area").append('<option value="' + list[i].value + '"' + sel + '>' + list[i].text + '</option>');
+            }
+            form.render();
+            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
+        }
+
+        function AreasAreaSelected(tagId, form) {
+            form.render();
+            $("#" + tagId + "").val($("#" + tagId + "Province option:selected").text() + "," + $("#" + tagId + "City option:selected").text() + "," + $("#" + tagId + "Area option:selected").text());
+        }
+        function movePrev(obj, tagId) {
+            $(obj).parent().prev().insertAfter($(obj).parent());
+            checkPics(tagId);
+        }
+        function moveNext(obj, tagId) {
+            $(obj).parent().next().insertBefore($(obj).parent());
+            checkPics(tagId);
+        }
+        function deletePic(obj, tagId) {
+            $(obj).parent().remove();
+            checkPics(tagId);
+        }
+        function checkPics(tagId) {
+            var pics = "";
+            var texts = "";
+            $("#" + tagId + "Image div img").each(function (i) {
+                pics += $(this).attr("src").replace(osshost, '') + "|";
+            });
+            $("#" + tagId + "Image div input").each(function (i) {
+                texts += $(this).val() + "|";
+            });
+            if (pics == "") {
+                $("#" + tagId).val("");
+            } else {
+                pics = pics.substring(0, pics.length - 1);
+                texts = texts.substring(0, pics.length - 1);
+                $("#" + tagId).val(pics + "#cut#" + texts);
+            }
+        }
+        function checkBox(tagId) {
+            var text = "";
+            $("input[type=checkbox][name=" + tagId + "List]:checked").each(function (i) {
+                text += $(this).val() + ",";
+            });
+            $("#" + tagId).val(text);
+        }
+        function showBigPic(picpath) {
+            parent.layer.open({
+                type: 1,
+                title: false,
+                closeBtn: 0,
+                shadeClose: true,
+                area: ['auto', 'auto'],
+                content: '<img src="' + picpath + '" style="max-width:800px; max-height:800px;" />'
+            });
+        }
+
+        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>

+ 137 - 0
Areas/Admin/Views/MainServer/HelpProfitReward/Index.cshtml

@@ -0,0 +1,137 @@
+@{
+    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">
+    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
+    <script src="/admin/js/jquery-1.10.1.min.js"></script>
+    <style>
+        .layui-input-inline{
+            width: 175px !important;
+        }
+        .layui-form-label{
+            width: 85px !important;
+        }
+        .layui-inline{
+            margin-right: 0px !important;
+        }
+        .w100{
+            width: 100px !important;
+        }
+        .ml50{
+            margin-left: 50px !important;
+        }
+    </style>
+</head>
+<body>
+    <div class="layui-fluid">
+        <div class="layui-card">
+            <div class="layui-form layui-card-header layuiadmin-card-header-auto">
+                <div class="layui-form-item">
+                    <div class="layui-inline">
+                        <label class="layui-form-label">创建时间</label>
+                        <div class="layui-input-inline">
+                            <input class="layui-input" type="text" readonly name="CreateDateData" id="CreateDate" placeholder=""
+                                autocomplete="off">
+                        </div>
+                    </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">达标日期</label>
+                        <div class="layui-input-inline">
+                            <input class="layui-input" type="text" readonly name="TradeDateData" id="TradeDate" placeholder=""
+                                autocomplete="off">
+                        </div>
+                    </div>
+                    @{
+                        Dictionary<string, string> KqProductsDic = new MySystem.DictionaryClass().getKqProductsDic();
+                    }
+                    <div class="layui-inline">
+                        <label class="layui-form-label">品牌</label>
+                        <div class="layui-input-inline">
+                            <select id="BrandIdSelect" name="BrandIdSelect" lay-search="">
+                                <option value="">全部...</option>
+                                @foreach (string key in KqProductsDic.Keys)
+                                {
+                                    <option value="@key">@KqProductsDic[key]</option>
+                                }
+                            </select>
+                        </div>
+                    </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">验证和同步账户状态</label>
+                        <div class="layui-input-inline">
+                            <select id="CheckStatusSelect" name="CheckStatusSelect" lay-search="">
+                                <option value="">全部...</option>
+                                <option value="0">初始</option>
+                                <option value="1">已验证和同步</option>
+                            </select>
+                        </div>
+                    </div>
+
+                    <div class="layui-inline ml50">
+                        <button class="layui-btn" lay-submit lay-filter="LAY-list-front-search">
+                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>查询
+                        </button>
+                        <button class="layui-btn" lay-submit lay-filter="LAY-list-front-searchall">
+                            <i class="layui-icon layui-icon-list layuiadmin-button-btn"></i>全部
+                        </button>
+                    </div>
+                </div>
+            </div>
+
+            <div class="layui-card-body">
+                <div style="padding-bottom: 10px;">
+                    @if (RightInfo.Contains("," + right + "_sycn,"))
+                    {
+                    <button class="layui-btn" data-type="SycnData"><i class="layui-icon layui-icon-link layuiadmin-button-btn"></i>同步(展示)</button>
+                    <button class="layui-btn" data-type="SycnCash"><i class="layui-icon layui-icon-link layuiadmin-button-btn"></i>同步(到余额)</button>
+                    }
+                </div>
+                
+                <table id="LAY-list-manage" lay-filter="LAY-list-manage"></table>
+                <script type="text/html" id="table-list-tools">
+                </script>
+            </div>
+        </div>
+    </div>
+    <div id="excelForm" style="display:none; padding:20px;">
+        <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">
+                </div>
+            </div>
+            <div class="layui-form-item">
+                <label class="layui-form-label">excel文件</label>
+                <div class="layui-form-mid layui-word-aux">
+                    <div class="layui-upload">
+                        <input type="file" id="ExcelFile" name="ExcelFile" value="">
+                    </div>
+                    <div class="mt10" id="ExcelFileList">
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="layui-form-item ml10">
+            <div class="layui-input-block">
+                <button type="button" class="layui-btn" onclick="ConfirmImport()">立即导入</button>
+            </div>
+        </div>
+    </div>
+
+    <script src="/layuiadmin/layui/layui.js"></script>
+    <script src="/layuiadmin/modules_main/HelpProfitReward_Admin.js?r=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
+    <script>
+        
+    </script>
+</body>
+</html>

+ 47 - 0
Models/BrokenMachineChange.cs

@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class BrokenMachineChange
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public string OutStoreManagerMobile { get; set; }
+        public string OutStoreManager { get; set; }
+        public string OutStoreAddress { get; set; }
+        public string OutStoreAreas { get; set; }
+        public string OutStoreName { get; set; }
+        public int OutStoreId { get; set; }
+        public string OutProductName { get; set; }
+        public int OutProductType { get; set; }
+        public int BackStoreUserId { get; set; }
+        public string Remark { get; set; }
+        public string BackStoreName { get; set; }
+        public int BackStoreId { get; set; }
+        public string ChangeSnExpand { get; set; }
+        public string OrderExpand { get; set; }
+        public DateTime? CompleteTime { get; set; }
+        public string AuditRemark { get; set; }
+        public int AuditResult { get; set; }
+        public DateTime? AuditTime { get; set; }
+        public string AuditBy { get; set; }
+        public DateTime? ChangeTime { get; set; }
+        public int ChangeDeviceNum { get; set; }
+        public string ChangeDeviceName { get; set; }
+        public string BackProductName { get; set; }
+        public int BackProductType { get; set; }
+        public int UserId { get; set; }
+        public string ChangeNo { get; set; }
+    }
+}

+ 34 - 0
Models/BrokenMachineChangeDetail.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class BrokenMachineChangeDetail
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int BackSnType { get; set; }
+        public string Remark { get; set; }
+        public int OutSnType { get; set; }
+        public string OutSnNo { get; set; }
+        public string OutProductName { get; set; }
+        public int OutProductType { get; set; }
+        public int BackDeviceStatus { get; set; }
+        public string BackSnNo { get; set; }
+        public int UserId { get; set; }
+        public string BackProductName { get; set; }
+        public int BackProductType { get; set; }
+        public int ChangeId { get; set; }
+        public string ChangeNo { get; set; }
+    }
+}

+ 33 - 0
Models/HelpProfitReward.cs

@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class HelpProfitReward
+    {
+        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 int TopUserId { get; set; }
+        public int CheckStatus { get; set; }
+        public int RewardMerCount { get; set; }
+        public string Remark { get; set; }
+        public string RewardDesc { get; set; }
+        public string OpenRewardNo { get; set; }
+        public decimal DebitRewardAmount { get; set; }
+        public decimal CreditRewardAmount { get; set; }
+        public decimal DebitTradeAmt { get; set; }
+        public decimal CreditTradeAmt { get; set; }
+        public int RewardType { get; set; }
+        public int BrandId { get; set; }
+        public int UserId { get; set; }
+        public DateTime? TradeDate { get; set; }
+        public string TradeMonth { get; set; }
+    }
+}

+ 44 - 0
Models/HelpProfitRewardDetail.cs

@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class HelpProfitRewardDetail
+    {
+        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 int TopUserId { get; set; }
+        public int CheckStatus { get; set; }
+        public string OpenDetailRec { get; set; }
+        public string Remark { get; set; }
+        public string RewardDesc { get; set; }
+        public string OpenRewardNo { get; set; }
+        public decimal DebitRewardAmount { get; set; }
+        public decimal CreditRewardAmount { get; set; }
+        public decimal DebitTradeAmt { get; set; }
+        public decimal CreditTradeAmt { get; set; }
+        public string RewardTips { get; set; }
+        public int RewardType { get; set; }
+        public int MerBuddyType { get; set; }
+        public int SnStoreId { get; set; }
+        public DateTime? StandardDate { get; set; }
+        public int SnApplyUserId { get; set; }
+        public int SnType { get; set; }
+        public string MerNo { get; set; }
+        public string SnNo { get; set; }
+        public int DirectUserId { get; set; }
+        public int MerchantId { get; set; }
+        public string ProductName { get; set; }
+        public int BrandId { get; set; }
+        public int UserId { get; set; }
+        public DateTime? TradeDate { get; set; }
+        public string TradeMonth { get; set; }
+    }
+}

+ 20 - 0
Models/SchoolMorningMeetLog.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class SchoolMorningMeetLog
+    {
+        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 int UserId { get; set; }
+        public int MeetId { get; set; }
+    }
+}

+ 445 - 0
Models/WebCMSEntities.cs

@@ -30,6 +30,8 @@ namespace MySystem.Models
         public virtual DbSet<AppVideoList> AppVideoList { get; set; }
         public virtual DbSet<BackEndOpRecord> BackEndOpRecord { get; set; }
         public virtual DbSet<BankInfo> BankInfo { get; set; }
+        public virtual DbSet<BrokenMachineChange> BrokenMachineChange { get; set; }
+        public virtual DbSet<BrokenMachineChangeDetail> BrokenMachineChangeDetail { get; set; }
         public virtual DbSet<BusinessActSummary> BusinessActSummary { get; set; }
         public virtual DbSet<BusinessPartner> BusinessPartner { get; set; }
         public virtual DbSet<BusinessPartnerMerchant> BusinessPartnerMerchant { get; set; }
@@ -56,6 +58,8 @@ namespace MySystem.Models
         public virtual DbSet<HelpProfitMerTradeSummay> HelpProfitMerTradeSummay { get; set; }
         public virtual DbSet<HelpProfitMerchantForUser> HelpProfitMerchantForUser { get; set; }
         public virtual DbSet<HelpProfitRebateDetail> HelpProfitRebateDetail { get; set; }
+        public virtual DbSet<HelpProfitReward> HelpProfitReward { get; set; }
+        public virtual DbSet<HelpProfitRewardDetail> HelpProfitRewardDetail { get; set; }
         public virtual DbSet<IndexIconList> IndexIconList { get; set; }
         public virtual DbSet<KqProductBrand> KqProductBrand { get; set; }
         public virtual DbSet<KqProductOrgs> KqProductOrgs { get; set; }
@@ -161,6 +165,7 @@ namespace MySystem.Models
         public virtual DbSet<RightDic> RightDic { get; set; }
         public virtual DbSet<SchoolMakerStudy> SchoolMakerStudy { get; set; }
         public virtual DbSet<SchoolMorningMeet> SchoolMorningMeet { get; set; }
+        public virtual DbSet<SchoolMorningMeetLog> SchoolMorningMeetLog { get; set; }
         public virtual DbSet<ServiceCenter> ServiceCenter { get; set; }
         public virtual DbSet<SetMerchantTypeRecord> SetMerchantTypeRecord { get; set; }
         public virtual DbSet<SmallStoreHouse> SmallStoreHouse { get; set; }
@@ -1318,6 +1323,231 @@ namespace MySystem.Models
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<BrokenMachineChange>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AuditBy)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AuditRemark)
+                    .HasColumnType("varchar(128)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AuditResult).HasColumnType("int(11)");
+
+                entity.Property(e => e.AuditTime).HasColumnType("datetime");
+
+                entity.Property(e => e.BackProductName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BackProductType).HasColumnType("int(11)");
+
+                entity.Property(e => e.BackStoreId).HasColumnType("int(11)");
+
+                entity.Property(e => e.BackStoreName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BackStoreUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChangeDeviceName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ChangeDeviceNum).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChangeNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ChangeSnExpand)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ChangeTime).HasColumnType("datetime");
+
+                entity.Property(e => e.CompleteTime).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OrderExpand)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OutProductName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OutProductType).HasColumnType("int(11)");
+
+                entity.Property(e => e.OutStoreAddress)
+                    .HasColumnType("varchar(128)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OutStoreAreas)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OutStoreId).HasColumnType("int(11)");
+
+                entity.Property(e => e.OutStoreManager)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OutStoreManagerMobile)
+                    .HasColumnType("varchar(11)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OutStoreName)
+                    .HasColumnType("varchar(32)")
+                    .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.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<BrokenMachineChangeDetail>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BackDeviceStatus).HasColumnType("int(11)");
+
+                entity.Property(e => e.BackProductName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BackProductType).HasColumnType("int(11)");
+
+                entity.Property(e => e.BackSnNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BackSnType).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChangeId).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChangeNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OutProductName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OutProductType).HasColumnType("int(11)");
+
+                entity.Property(e => e.OutSnNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OutSnType).HasColumnType("int(11)");
+
+                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.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<BusinessActSummary>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -3026,6 +3256,187 @@ namespace MySystem.Models
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<HelpProfitReward>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CheckStatus).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreditRewardAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.CreditTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.DebitRewardAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.DebitTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.OpenRewardNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(128)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.RewardDesc)
+                    .HasColumnType("varchar(128)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.RewardMerCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.RewardType).HasColumnType("int(11)");
+
+                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.TopUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeDate).HasColumnType("datetime");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<HelpProfitRewardDetail>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CheckStatus).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreditRewardAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.CreditTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.DebitRewardAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.DebitTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.DirectUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerBuddyType).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerchantId).HasColumnType("int(11)");
+
+                entity.Property(e => e.OpenDetailRec)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OpenRewardNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ProductName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(128)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.RewardDesc)
+                    .HasColumnType("varchar(128)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.RewardTips)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.RewardType).HasColumnType("int(11)");
+
+                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.SnApplyUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.SnNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SnStoreId).HasColumnType("int(11)");
+
+                entity.Property(e => e.SnType).HasColumnType("int(11)");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.StandardDate).HasColumnType("datetime");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TopUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.TradeDate).HasColumnType("datetime");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<IndexIconList>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -10962,6 +11373,40 @@ namespace MySystem.Models
                     .HasCollation("utf8_general_ci");
             });
 
+            modelBuilder.Entity<SchoolMorningMeetLog>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.MeetId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                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.UserId).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<ServiceCenter>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");

+ 3 - 2
Startup.cs

@@ -136,6 +136,7 @@ namespace MySystem
             ResetUserTradeService.Instance.Start();
             ResetMerchantTradeService.Instance.Start();
             SycnProfitServiceV2.Instance.Start();
+            SycnHelpProfitService.Instance.Start();
             ExcelHelper.Instance.Start();
             TestHelper.Instance.Start();
         }
@@ -152,11 +153,11 @@ namespace MySystem
         {
             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 = 'KxsMainServer'");
+            System.Data.DataTable tablecollection = Library.OtherMySqlConn.dtable("select DISTINCT TABLE_NAME from information_schema.columns where table_schema = 'KxsMainServer2'");
             foreach (System.Data.DataRow subtable in tablecollection.Rows)
             {
                 Dictionary<string, string> Columns = new Dictionary<string, string>();
-                System.Data.DataTable columncollection = Library.OtherMySqlConn.dtable("select COLUMN_NAME,DATA_TYPE from information_schema.columns where table_schema = 'KxsMainServer' and TABLE_NAME='" + subtable["TABLE_NAME"].ToString() + "'");
+                System.Data.DataTable columncollection = Library.OtherMySqlConn.dtable("select COLUMN_NAME,DATA_TYPE from information_schema.columns where table_schema = 'KxsMainServer2' and TABLE_NAME='" + subtable["TABLE_NAME"].ToString() + "'");
                 foreach (System.Data.DataRow column in columncollection.Rows)
                 {
                     string datatype = column["DATA_TYPE"].ToString();

binární
bin/Debug/netcoreapp3.0/MySystem.dll


binární
bin/Debug/netcoreapp3.0/MySystem.pdb


binární
bin/release/netcoreapp3.0/MySystem.Views.dll


binární
bin/release/netcoreapp3.0/MySystem.Views.pdb


binární
bin/release/netcoreapp3.0/MySystem.dll


binární
bin/release/netcoreapp3.0/MySystem.pdb


binární
obj/Debug/netcoreapp3.0/MySystem.dll


binární
obj/Debug/netcoreapp3.0/MySystem.pdb


+ 1 - 1
obj/release/netcoreapp3.0/MySystem.RazorCoreGenerate.cache

@@ -1 +1 @@
-335242f1e6916e5ed10a6a869889926171466480
+c674269f60b191fdf7c5783d2a63f31a857f0165

binární
obj/release/netcoreapp3.0/MySystem.Views.dll


binární
obj/release/netcoreapp3.0/MySystem.Views.pdb


+ 3 - 0
obj/release/netcoreapp3.0/MySystem.csproj.FileListAbsolute.txt

@@ -597,3 +597,6 @@
 /Users/Shared/Previously Relocated Items/Security/MyDisk/我的/项目/myprogram_vs2019/KeXiaoShuang/BsServerSub/obj/release/netcoreapp3.0/Razor/Areas/Admin/Views/MainServer/SchoolMorningMeet/Add.cshtml.g.cs
 /Users/Shared/Previously Relocated Items/Security/MyDisk/我的/项目/myprogram_vs2019/KeXiaoShuang/BsServerSub/obj/release/netcoreapp3.0/Razor/Areas/Admin/Views/MainServer/SchoolMorningMeet/Edit.cshtml.g.cs
 /Users/Shared/Previously Relocated Items/Security/MyDisk/我的/项目/myprogram_vs2019/KeXiaoShuang/BsServerSub/obj/release/netcoreapp3.0/Razor/Areas/Admin/Views/MainServer/SchoolMorningMeet/Index.cshtml.g.cs
+/Users/Shared/Previously Relocated Items/Security/MyDisk/我的/项目/myprogram_vs2019/KeXiaoShuang/BsServerSub/obj/release/netcoreapp3.0/Razor/Areas/Admin/Views/MainServer/HelpProfitReward/Add.cshtml.g.cs
+/Users/Shared/Previously Relocated Items/Security/MyDisk/我的/项目/myprogram_vs2019/KeXiaoShuang/BsServerSub/obj/release/netcoreapp3.0/Razor/Areas/Admin/Views/MainServer/HelpProfitReward/Edit.cshtml.g.cs
+/Users/Shared/Previously Relocated Items/Security/MyDisk/我的/项目/myprogram_vs2019/KeXiaoShuang/BsServerSub/obj/release/netcoreapp3.0/Razor/Areas/Admin/Views/MainServer/HelpProfitReward/Index.cshtml.g.cs

binární
obj/release/netcoreapp3.0/MySystem.dll


binární
obj/release/netcoreapp3.0/MySystem.pdb


+ 488 - 0
wwwroot/layuiadmin/modules_main/HelpProfitReward_Admin.js

@@ -0,0 +1,488 @@
+var ExcelData,ExcelKind;
+function ConfirmImport() {
+    $.ajax({
+        type: "POST",
+        url: "/Admin/HelpProfitReward/Import?r=" + Math.random(1),
+        data: "ExcelData=" + encodeURIComponent(JSON.stringify(ExcelData)),
+        dataType: "text",
+        success: function (data) {
+            if (data == "success") {
+                layer.msg("导入成功", { time: 2000 }, function () {
+                    window.location.reload();
+                });
+            } else {
+                layer.msg(data);
+            }
+        }
+    });
+}
+
+var excel;
+layui.config({
+    base: '/layuiadmin/' //静态资源所在路径
+}).extend({
+    myexcel: 'layui/lay/modules/excel',
+    index: 'lib/index' //主入口模块
+}).use(['index', 'table', 'excel', 'laydate'], function () {
+    var $ = layui.$
+        , form = layui.form
+        , table = layui.table;
+
+    //- 筛选条件-日期
+    var laydate = layui.laydate;
+    var layCreateDate = laydate.render({
+elem: '#CreateDate',
+type: 'datetime',
+range: true,
+trigger: 'click',
+change: function (value, date, endDate) {
+var op = true;
+if (date.year == endDate.year && endDate.month - date.month <= 1) {
+if (endDate.month - date.month == 1 && endDate.date > date.date) {
+op = false;
+layCreateDate.hint('日期范围请不要超过1个月');
+setTimeout(function () {
+$(".laydate-btns-confirm").addClass("laydate-disabled");
+}, 1);
+}
+} else {
+op = false;
+layCreateDate.hint('日期范围请不要超过1个月');
+setTimeout(function () {
+$(".laydate-btns-confirm").addClass("laydate-disabled");
+}, 1);
+}
+if (op) {
+$('#CreateDate').val(value);
+}
+}
+});
+var layTradeDate = laydate.render({
+elem: '#TradeDate',
+trigger: 'click',
+type: 'datetime',
+range: true,
+change: function (value, date, endDate) {
+var op = true;
+if (date.year == endDate.year && endDate.month - date.month <= 1) {
+if (endDate.month - date.month == 1 && endDate.date > date.date) {
+op = false;
+layTradeDate.hint('日期范围请不要超过1个月');
+setTimeout(function () {
+$(".laydate-btns-confirm").addClass("laydate-disabled");
+}, 1);
+}
+} else {
+op = false;
+layTradeDate.hint('日期范围请不要超过1个月');
+setTimeout(function () {
+$(".laydate-btns-confirm").addClass("laydate-disabled");
+}, 1);
+}
+if (op) {
+$('#TradeDate').val(value);
+}
+}
+});
+
+
+    //excel导入
+    excel = layui.excel;        
+    $('#ExcelFile').change(function (e) {
+        var files = e.target.files;
+        excel.importExcel(files, { }, function (data) {
+            ExcelData = data[0].sheet1;
+        });
+    });
+
+    //监听单元格编辑
+    table.on('edit(LAY-list-manage)', function(obj){
+        var value = obj.value //得到修改后的值
+        ,data = obj.data //得到所在行所有键值
+        ,field = obj.field; //得到字段
+        if(field == "Sort"){
+            $.ajax({
+                type: "POST",
+                url: "/Admin/HelpProfitReward/Sort?r=" + Math.random(1),
+                data: "Id=" + data.Id + "&Sort=" + value,
+                dataType: "text",
+                success: function (data) {
+                }
+            });
+        }
+    });
+    
+    //列表数据
+    table.render({
+        elem: '#LAY-list-manage'
+        , url: '/Admin/HelpProfitReward/IndexData' //模拟接口
+        , cols: [[
+            { type: 'checkbox', fixed: 'left' }
+    		, {field:'Id', fixed: 'left', title:'ID', width:80, sort: true, unresize: true}
+            ,{field:'TradeMonth', width: 200, title:'交易月', sort: true}
+,{field:'CreateDate', width: 200, title:'创建时间', sort: true}
+,{field:'UserId', width: 200, title:'创客', sort: true}
+,{field:'UserIdMakerCode', width: 200, title:'创客创客编号', sort: true}
+,{field:'UserIdRealName', width: 200, title:'创客真实姓名', sort: true}
+,{field:'BrandId', width: 200, title:'品牌', sort: true}
+,{field:'RewardType', width: 200, title:'奖励类型', sort: true}
+,{field:'CreditTradeAmt', width: 200, title:'贷记卡交易总金额', sort: true}
+,{field:'CreditRewardAmount', width: 200, title:'贷记卡交易奖励金额', sort: true}
+,{field:'OpenRewardNo', width: 200, title:'开机奖励单号', sort: true}
+,{field:'RewardDesc', width: 200, title:'奖励描述', sort: true}
+,{field:'Remark', width: 200, title:'备注', sort: true}
+,{field:'CheckStatus', width: 200, title:'验证和同步账户状态', sort: true}
+
+            , {field:'Sort', fixed: 'right', title:'排序', width:80, edit: 'text'}
+            , { title: '操作', align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
+        ]]
+        , where: {
+            
+        }
+        , page: true
+        , limit: 30
+        , height: 'full-220'
+        , text: '对不起,加载出现异常!'
+        , done: function (res, curr, count) {
+            $(".layui-none").text("无数据");
+        }
+    });
+
+    //监听工具条
+    table.on('tool(LAY-list-manage)', function (obj) {
+        var data = obj.data;
+        if (obj.event === 'del') {
+            var index = layer.confirm('确定要删除吗?删除后不能恢复!', function (index) {
+                $.ajax({
+                    type: "POST",
+                    url: "/Admin/HelpProfitReward/Delete?r=" + Math.random(1),
+                    data: "Id=" + data.Id,
+                    dataType: "text",
+                    success: function (data) {
+                        if (data == "success") {                            
+                            obj.del();
+                            layer.close(index);
+                        } else {
+                            parent.layer.msg(data);
+                        }
+                    }
+                });
+            });
+        } else if (obj.event === 'edit') {
+            var tr = $(obj.tr);
+            var perContent = layer.open({
+                type: 2
+                , title: '助利宝分润-编辑'
+                , content: 'Edit?Id=' + data.Id + ''
+                , maxmin: true
+                , area: ['500px', '450px']
+                , btn: ['确定', '取消']
+                , yes: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index]
+                        , submitID = 'LAY-list-front-submit'
+                        , submit = layero.find('iframe').contents().find('#' + submitID);
+
+                    setTimeout(function () { 
+                        layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
+                            var errObj = $(this).find('.layui-form-danger');
+                            if (errObj.length > 0) {
+                                iframeWindow.element.tabChange('mytabbar', String(i + 1));
+                                submit.click();
+                            }
+                        });                        
+                    }, 300);
+
+                    
+                    
+                    
+                    
+
+                    //监听提交
+                    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({});
+                        
+                        $.ajax({
+                            type: "POST",
+                            url: "/Admin/HelpProfitReward/Edit?r=" + Math.random(1),
+                            data: userdata,
+                            dataType: "text",
+                            success: function (data) {
+                                layer.close(index); //关闭弹层
+                                if (data == "success") {
+                                    table.reload('LAY-list-manage'); //数据刷新
+                                } else {
+                                    layer.msg(data);
+                                }
+                            }
+                        });
+                    });
+
+                    submit.trigger('click');
+                }
+                , success: function (layero, index) {
+
+                }
+            });
+            layer.full(perContent);
+        }
+    });
+
+
+    //监听搜索
+    form.on('submit(LAY-list-front-search)', function (data) {
+        var field = data.field;
+
+        //执行重载
+        table.reload('LAY-list-manage', {
+            where: field,
+            page: {
+                curr: 1
+            }
+        });
+    });
+    form.on('submit(LAY-list-front-searchall)', function (data) {
+        table.reload('LAY-list-manage', {
+            where: null,
+            page: {
+                curr: 1
+            }
+        });
+    });
+
+    //事件
+    var active = {
+        batchdel: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage')
+                , data = checkStatus.data; //得到选中的数据
+            if (data.length < 1) {
+                parent.layer.msg("请选择要删除的项");
+            } else {
+                var ids = "";
+                $.each(data, function (index, value) {
+                    ids += data[index].Id + ",";
+                });
+                ids = ids.substring(0, ids.length - 1);
+                var index = layer.confirm('确定要删除吗?删除后不能恢复!', function (index) {
+                    $.ajax({
+                        type: "POST",
+                        url: "/Admin/HelpProfitReward/Delete?r=" + Math.random(1),
+                        data: "Id=" + ids,
+                        dataType: "text",
+                        success: function (data) {
+                            layer.close(index);
+                            if (data == "success") {
+                                table.reload('LAY-list-manage');
+                            } else {
+                                layer.msg(data);
+                            }
+                        }
+                    });
+                });
+            }
+        }
+        , add: function () {
+            var perContent = layer.open({
+                type: 2
+                , title: '助利宝分润-添加'
+                , content: 'Add'
+                , maxmin: true
+                , area: ['500px', '450px']
+                , btn: ['确定', '取消']
+                , yes: function (index, layero) {
+                    var iframeWindow = window['layui-layer-iframe' + index]
+                        , submitID = 'LAY-list-front-submit'
+                        , submit = layero.find('iframe').contents().find('#' + submitID);
+
+                    setTimeout(function () { 
+                        layero.find('iframe').contents().find('.layui-tab-item').each(function (i) {
+                            var errObj = $(this).find('.layui-form-danger');
+                            if (errObj.length > 0) {
+                                iframeWindow.element.tabChange('mytabbar', String(i + 1));
+                                submit.click();
+                            }
+                        });                        
+                    }, 300);
+
+                    
+                    
+                    
+                    
+
+                    //监听提交
+                    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({});
+                        
+                        $.ajax({
+                            type: "POST",
+                            url: "/Admin/HelpProfitReward/Add?r=" + Math.random(1),
+                            data: userdata,
+                            dataType: "text",
+                            success: function (data) {
+                                layer.close(index); //关闭弹层
+                                if (data == "success") {
+                                    table.reload('LAY-list-manage'); //数据刷新
+                                } else {
+                                    layer.msg(data);
+                                }
+                            }
+                        });
+                    });
+
+                    submit.trigger('click');
+                }
+            });
+            layer.full(perContent);
+        }
+        , ImportData: function () {
+            ExcelKind = 1;
+            layer.open({
+                type: 1,
+                title: '导入',
+                maxmin: false,
+                area: ['460px', '280px'],
+                content: $('#excelForm'),
+                cancel: function () {
+                }
+            });
+            $("#excelTemp").html('<a href="/excelfile/模板文件.xlsx">点击下载模板文件</a>');
+        }
+        , ExportExcel: function () {
+            var userdata = '';
+            $(".layuiadmin-card-header-auto input").each(function (i) {
+                userdata += $(this).attr('name') + '=' + encodeURIComponent($(this).val()) + '&';
+            });
+            $(".layuiadmin-card-header-auto select").each(function (i) {
+                userdata += $(this).attr('name') + '=' + encodeURIComponent($(this).val()) + '&';
+            });
+            $.ajax({
+                type: "GET",
+                url: "/Admin/HelpProfitReward/ExportExcel?r=" + Math.random(1),
+                data: userdata,
+                dataType: "json",
+                success: function (data) {
+                    data.Obj.unshift(data.Fields);
+                    excel.exportExcel(data.Obj, data.Info, 'xlsx');
+                }
+            });
+        }
+        , Open: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage')
+                , data = checkStatus.data; //得到选中的数据
+            if(data.length < 1){
+                parent.layer.msg("请选择要开启的项");
+            }else{
+                var ids = "";
+                $.each(data, function (index, value) {
+                    ids += data[index].Id + ",";
+                });
+                ids = ids.substring(0, ids.length - 1);
+                var index = layer.confirm('确定要开启吗?', function (index) {
+                    $.ajax({
+                        type: "POST",
+                        url: "/Admin/HelpProfitReward/Open?r=" + Math.random(1),
+                        data: "Id=" + ids,
+                        dataType: "text",
+                        success: function (data) {
+                            layer.close(index);
+                            if (data == "success") {
+                                table.reload('LAY-list-manage');
+                            } else {
+                                layer.msg(data);
+                            }
+                        }
+                    });
+                });
+            }
+        }
+        , Close: function () {
+            var checkStatus = table.checkStatus('LAY-list-manage')
+                , data = checkStatus.data; //得到选中的数据
+            if(data.length < 1){
+                parent.layer.msg("请选择要关闭的项");
+            }else{
+                var ids = "";
+                $.each(data, function (index, value) {
+                    ids += data[index].Id + ",";
+                });
+                ids = ids.substring(0, ids.length - 1);
+                var index = layer.confirm('确定要关闭吗?', function (index) {
+                    $.ajax({
+                        type: "POST",
+                        url: "/Admin/HelpProfitReward/Close?r=" + Math.random(1),
+                        data: "Id=" + ids,
+                        dataType: "text",
+                        success: function (data) {
+                            layer.close(index);
+                            if (data == "success") {
+                                table.reload('LAY-list-manage');
+                            } else {
+                                layer.msg(data);
+                            }
+                        }
+                    });
+                });
+            }
+        }
+        , SycnData: function () {
+            var index = layer.confirm('确定要同步到APP展示吗?操作后无法撤回', function (index) {
+                layer.close(index);
+                var loadindex = layer.load(1, {
+                    shade: [0.5, '#000']
+                });
+                $.ajax({
+                    type: "POST",
+                    url: "/Admin/HelpProfitReward/SycnData?r=" + Math.random(1),
+                    data: "",
+                    dataType: "text",
+                    success: function (data) {
+                        layer.close(loadindex);
+                        if (data == "success") {
+                            layer.msg('同步成功');
+                        } else {
+                            layer.msg(data);
+                        }
+                    }
+                });
+            });
+        }
+        , SycnCash: function () {
+            var index = layer.confirm('确定要同步到余额吗?操作后无法撤回', function (index) {
+                layer.close(index);
+                var loadindex = layer.load(1, {
+                    shade: [0.5, '#000']
+                });
+                $.ajax({
+                    type: "POST",
+                    url: "/Admin/HelpProfitReward/SycnData?r=" + Math.random(1),
+                    data: "OpType=1",
+                    dataType: "text",
+                    success: function (data) {
+                        layer.close(loadindex);
+                        if (data == "success") {
+                            layer.msg('同步成功');
+                        } else {
+                            layer.msg(data);
+                        }
+                    }
+                });
+            });
+        }
+    };
+
+    $('.layui-btn').on('click', function () {
+        var type = $(this).data('type');
+        active[type] ? active[type].call(this) : '';
+    });
+});