Преглед изворни кода

分仓申请发货品牌错误提示
机具驳回调整
sn变动轨迹搜索选项添加

DuGuYang пре 3 година
родитељ
комит
e6bb915c86

+ 1 - 0
Areas/Admin/Controllers/MainServer/StoreChangeHistoryController.cs

@@ -125,6 +125,7 @@ namespace MySystem.Areas.Admin.Controllers
                 if (TransType == 1) dic["TransType"] = "调拨";
                 if (TransType == 2) dic["TransType"] = "出货";
                 if (TransType == 3) dic["TransType"] = "退货";
+                if (TransType == 4) dic["TransType"] = "驳回";
                 if (TransType == 0) dic["TransType"] = "采购";
                 //SN机具类型
                 int SnType = int.Parse(dic["SnType"].ToString());

+ 157 - 191
Areas/Admin/Controllers/MainServer/StoreHouseController.cs

@@ -673,6 +673,7 @@ namespace MySystem.Areas.Admin.Controllers
             if (ExcelKind == 1)
             {
                 string error = "";
+                decimal amount = 0;
                 List<string> PosSnList = new List<string>();
                 for (int i = 1; i < list.Count; i++)
                 {
@@ -709,206 +710,171 @@ namespace MySystem.Areas.Admin.Controllers
                     else
                     {
                         PosSnList.Add(PosSn);
-                    }
-
-                }
-                if (!string.IsNullOrEmpty(error))
-                {
-                    return "Warning|" + error;
-                }
-                for (int i = 1; i < list.Count; i++)
-                {
-                    JsonData dr = list[i];
-                    string itemJson = dr.ToJson();
-                    string PosSn = itemJson.Contains("\"A\"") ? dr["A"].ToString() : "";
-                    string BrandId = itemJson.Contains("\"B\"") ? dr["B"].ToString() : "";
-                    string MakerCode = itemJson.Contains("\"C\"") ? dr["C"].ToString() : "";
-                    string StoreNo = itemJson.Contains("\"D\"") ? dr["D"].ToString() : "";
-                    string No = itemJson.Contains("\"E\"") ? dr["E"].ToString() : "";
-                    string Remark = itemJson.Contains("\"F\"") ? dr["F"].ToString() : "";
-                    decimal amount = 0;
-                    UserForMakerCode userForMakerCode = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode);
-                    var pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == PosSn);
-                    StoreForCode storeForCode = db.StoreForCode.FirstOrDefault(m => m.Code == StoreNo);
-                    var fromStore = db.StoreHouse.FirstOrDefault(m => m.Id == pos.StoreId && m.BrandId == BrandId) ?? new StoreHouse();
-                    var toStore = db.StoreHouse.FirstOrDefault(m => m.Id == storeForCode.StoreId && m.BrandId == BrandId) ?? new StoreHouse();
-                    var user = db.Users.FirstOrDefault(m => m.Id == toStore.UserId) ?? new Users();
-                    var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == toStore.UserId) ?? new UserAccount();
-                    var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == Convert.ToInt32(BrandId)) ?? new KqProducts();
-                    if (brandInfo.Name.Contains("电签"))
-                    {
-                        amount = 200;
-                    }
-                    if (brandInfo.Name.Contains("大POS"))
-                    {
-                        amount = 300;
-                    }
-                    userAccount.ValidAmount -= amount;
-                    string text = string.Format("导入机具驳回仓库,UserId: '" + user.Id + "',BeforeChangeAmount:'" + userAccount.ValidAmount + "',AfterChangeAmount:'" + userAccount.ValidAmount + amount + "',ChangeAmount:'" + amount + "',Time'" + DateTime.Now + "'");
-                    function.WriteLog(text, "机具驳回仓库");//机具驳回仓库日志
-                    db.SaveChanges();
-                    MachineForSnNo machineForSnNo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == PosSn) ?? new MachineForSnNo();
-                    var posInfo = db.PosMachinesTwo.FirstOrDefault(m => m.Id == machineForSnNo.SnId && m.BrandId == Convert.ToInt32(BrandId) && m.BindingState == 0 && m.BuyUserId == userForMakerCode.UserId);
-                    if (posInfo != null)
-                    {
-                        if (fromStore.Id != toStore.Id)
+                        var fromStore = db.StoreHouse.FirstOrDefault(m => m.Id == pos.StoreId && m.BrandId == BrandId) ?? new StoreHouse();
+                        var toStore = db.StoreHouse.FirstOrDefault(m => m.Id == storeForCode.StoreId && m.BrandId == BrandId) ?? new StoreHouse();
+                        var user = db.Users.FirstOrDefault(m => m.Id == toStore.UserId) ?? new Users();
+                        var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == toStore.UserId) ?? new UserAccount();
+                        var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == Convert.ToInt32(BrandId)) ?? new KqProducts();
+                        if (brandInfo.Name.Contains("电签"))
                         {
-                            var changeNo = "JJBH" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
-                            StoreStockChange stockchange = db.StoreStockChange.Add(new StoreStockChange()
-                            {
-                                CreateDate = DateTime.Now,
-                                StoreId = fromStore.Id, //出货仓库
-                                ToStoreId = toStore.Id, //发货仓库
-                                BrandId = Convert.ToInt32(BrandId), //产品类型
-                                ProductName = RelationClass.GetKqProductBrandInfo(Convert.ToInt32(BrandId)), //产品名称
-                                ChangeNo = changeNo, //变更记录单号
-                                BizBatchNo = No, //业务批次号
-                                TransType = 4, //交易类型
-                                SnNo = PosSn, //SN编号
-                                StockOpDirect = 1, //库存操作方向
-                                SnStatus = 1, //SN状态
-                                DeviceVendor = posInfo.DeviceName, //设备厂商
-                                DeviceModel = posInfo.DeviceKind, //设备型号
-                                DeviceType = posInfo.DeviceType, //设备类型                    
-                                SourceStoreId = posInfo.SourceStoreId, //源仓库编号
-                                BrandType = posInfo.DeviceType, //品牌类型
-                            }).Entity;
-                            db.SaveChanges();
-
-                            db.StoreChangeHistory.Add(new StoreChangeHistory()
-                            {
-                                CreateDate = DateTime.Now,
-                                UserId = user.Id, //创客
-                                StoreId = fromStore.Id, //出货仓库
-                                ToStoreId = toStore.Id, //发货仓库
-                                BrandId = Convert.ToInt32(BrandId), //产品类型
-                                ChangeRecordNo = changeNo, //变更记录单号
-                                SeoTitle = "机具驳回仓库",
-                                BizBatchNo = No, //业务批次号
-                                TransType = 4,//驳回
-                                SnNo = PosSn, //SN编号
-                            });
-                            db.SaveChanges();
-
-                            StoreBalance fbalance = db.StoreBalance.Add(new StoreBalance()
-                            {
-                                CreateDate = DateTime.Now,
-                                StoreId = fromStore.Id, //仓库
-                                BrandId = Convert.ToInt32(BrandId), //产品类型
-                                OpStoreNum = 1, //操作库存数
-                                OpSymbol = "-", //操作符
-                                BeforeTotalNum = fromStore.TotalNum, //操作前总库存数
-                                AfterTotalNum = fromStore.TotalNum - 1, //操作后总库存数
-                                BeforeLaveNum = fromStore.LaveNum, //操作前剩余库存数
-                                AfterLaveNum = fromStore.LaveNum - 1, //操作后剩余库存数
-                                BeforeOutNum = fromStore.OutNum, //操作前出库数
-                                AfterOutNum = fromStore.OutNum - 1, //操作后出库数
-                            }).Entity;
-                            db.SaveChanges();
-
-                            StoreBalance tbalance = db.StoreBalance.Add(new StoreBalance()
-                            {
-                                CreateDate = DateTime.Now,
-                                StoreId = toStore.Id, //仓库
-                                BrandId = Convert.ToInt32(BrandId), //产品类型
-                                OpStoreNum = 1, //操作库存数
-                                OpSymbol = "+", //操作符
-                                BeforeTotalNum = toStore.TotalNum, //操作前总库存数
-                                AfterTotalNum = toStore.TotalNum + 1, //操作后总库存数
-                                BeforeLaveNum = toStore.LaveNum, //操作前剩余库存数
-                                AfterLaveNum = toStore.LaveNum + 1, //操作后剩余库存数
-                                BeforeOutNum = toStore.OutNum, //操作前出库数
-                                AfterOutNum = toStore.OutNum, //操作后出库数
-                            }).Entity;
-                            db.SaveChanges();
-
-                            posInfo.StoreId = toStore.Id;
-                            posInfo.BuyUserId = 0;
-                            toStore.TotalNum += 1;
-                            toStore.LaveNum += 1;
-                            fromStore.TotalNum -= 1;
-                            fromStore.LaveNum -= 1;
-                            db.SaveChanges();
+                            amount = 200;
                         }
-                        else
+                        if (brandInfo.Name.Contains("大POS"))
                         {
-                            var changeNo = "JJBH" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
-                            StoreStockChange stockchange = db.StoreStockChange.Add(new StoreStockChange()
-                            {
-                                CreateDate = DateTime.Now,
-                                StoreId = fromStore.Id, //出货仓库
-                                ToStoreId = toStore.Id, //发货仓库
-                                BrandId = Convert.ToInt32(BrandId), //产品类型
-                                ProductName = RelationClass.GetKqProductBrandInfo(Convert.ToInt32(BrandId)), //产品名称
-                                ChangeNo = changeNo, //变更记录单号
-                                BizBatchNo = No, //业务批次号
-                                TransType = 4, //交易类型
-                                SnNo = PosSn, //SN编号
-                                StockOpDirect = 1, //库存操作方向
-                                SnStatus = 1, //SN状态
-                                DeviceVendor = posInfo.DeviceName, //设备厂商
-                                DeviceModel = posInfo.DeviceKind, //设备型号
-                                DeviceType = posInfo.DeviceType, //设备类型                    
-                                SourceStoreId = posInfo.SourceStoreId, //源仓库编号
-                                BrandType = posInfo.DeviceType, //品牌类型
-                            }).Entity;
-                            db.SaveChanges();
-
-                            db.StoreChangeHistory.Add(new StoreChangeHistory()
-                            {
-                                CreateDate = DateTime.Now,
-                                UserId = user.Id, //创客
-                                StoreId = fromStore.Id, //出货仓库
-                                ToStoreId = toStore.Id, //发货仓库
-                                BrandId = Convert.ToInt32(BrandId), //产品类型
-                                ChangeRecordNo = changeNo, //变更记录单号
-                                SeoTitle = "机具驳回仓库",
-                                BizBatchNo = No, //业务批次号
-                                SnNo = PosSn, //SN编号
-                                TransType = 4,//驳回
-                            });
-                            db.SaveChanges();
-
-                            StoreBalance fbalance = db.StoreBalance.Add(new StoreBalance()
+                            amount = 300;
+                        }
+                        userAccount.ValidAmount -= amount;
+                        db.SaveChanges();
+                        if (posInfo != null)
+                        {
+                            if (fromStore.Id != toStore.Id)
                             {
-                                CreateDate = DateTime.Now,
-                                StoreId = fromStore.Id, //仓库
-                                BrandId = Convert.ToInt32(BrandId), //产品类型
-                                OpStoreNum = 1, //操作库存数
-                                OpSymbol = "-", //操作符
-                                BeforeTotalNum = fromStore.TotalNum, //操作前总库存数
-                                AfterTotalNum = fromStore.TotalNum - 1, //操作后总库存数
-                                BeforeLaveNum = fromStore.LaveNum, //操作前剩余库存数
-                                AfterLaveNum = fromStore.LaveNum - 1, //操作后剩余库存数
-                                BeforeOutNum = fromStore.OutNum, //操作前出库数
-                                AfterOutNum = fromStore.OutNum - 1, //操作后出库数
-                            }).Entity;
-                            db.SaveChanges();
-
-                            StoreBalance tbalance = db.StoreBalance.Add(new StoreBalance()
+                                var changeNo = "JJBH" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
+                                StoreStockChange stockchange = db.StoreStockChange.Add(new StoreStockChange()
+                                {
+                                    CreateDate = DateTime.Now,
+                                    StoreId = fromStore.Id, //出货仓库
+                                    ToStoreId = toStore.Id, //发货仓库
+                                    BrandId = Convert.ToInt32(BrandId), //产品类型
+                                    ProductName = RelationClass.GetKqProductBrandInfo(Convert.ToInt32(BrandId)), //产品名称
+                                    ChangeNo = changeNo, //变更记录单号
+                                    BizBatchNo = No, //业务批次号
+                                    TransType = 4, //交易类型
+                                    SnNo = PosSn, //SN编号
+                                    StockOpDirect = 1, //库存操作方向
+                                    SnStatus = 1, //SN状态
+                                    DeviceVendor = posInfo.DeviceName, //设备厂商
+                                    DeviceModel = posInfo.DeviceKind, //设备型号
+                                    DeviceType = posInfo.DeviceType, //设备类型                    
+                                    SourceStoreId = posInfo.SourceStoreId, //源仓库编号
+                                    BrandType = posInfo.DeviceType, //品牌类型
+                                }).Entity;
+                                db.SaveChanges();
+
+                                db.StoreChangeHistory.Add(new StoreChangeHistory()
+                                {
+                                    CreateDate = DateTime.Now,
+                                    UserId = user.Id, //创客
+                                    StoreId = fromStore.Id, //出货仓库
+                                    ToStoreId = toStore.Id, //发货仓库
+                                    BrandId = Convert.ToInt32(BrandId), //产品类型
+                                    ChangeRecordNo = changeNo, //变更记录单号
+                                    SeoTitle = "机具驳回仓库",
+                                    BizBatchNo = No, //业务批次号
+                                    TransType = 4,//驳回
+                                    SnNo = PosSn, //SN编号
+                                });
+                                db.SaveChanges();
+
+                                StoreBalance fbalance = db.StoreBalance.Add(new StoreBalance()
+                                {
+                                    CreateDate = DateTime.Now,
+                                    StoreId = fromStore.Id, //仓库
+                                    BrandId = Convert.ToInt32(BrandId), //产品类型
+                                    OpStoreNum = 1, //操作库存数
+                                    OpSymbol = "-", //操作符
+                                    BeforeTotalNum = fromStore.TotalNum, //操作前总库存数
+                                    AfterTotalNum = fromStore.TotalNum - 1, //操作后总库存数
+                                    BeforeLaveNum = fromStore.LaveNum, //操作前剩余库存数
+                                    AfterLaveNum = fromStore.LaveNum - 1, //操作后剩余库存数
+                                    BeforeOutNum = fromStore.OutNum, //操作前出库数
+                                    AfterOutNum = fromStore.OutNum - 1, //操作后出库数
+                                }).Entity;
+                                db.SaveChanges();
+
+                                StoreBalance tbalance = db.StoreBalance.Add(new StoreBalance()
+                                {
+                                    CreateDate = DateTime.Now,
+                                    StoreId = toStore.Id, //仓库
+                                    BrandId = Convert.ToInt32(BrandId), //产品类型
+                                    OpStoreNum = 1, //操作库存数
+                                    OpSymbol = "+", //操作符
+                                    BeforeTotalNum = toStore.TotalNum, //操作前总库存数
+                                    AfterTotalNum = toStore.TotalNum + 1, //操作后总库存数
+                                    BeforeLaveNum = toStore.LaveNum, //操作前剩余库存数
+                                    AfterLaveNum = toStore.LaveNum + 1, //操作后剩余库存数
+                                    BeforeOutNum = toStore.OutNum, //操作前出库数
+                                    AfterOutNum = toStore.OutNum, //操作后出库数
+                                }).Entity;
+                                db.SaveChanges();
+
+                                posInfo.StoreId = toStore.Id;
+                                posInfo.BuyUserId = 0;
+                                toStore.TotalNum += 1;
+                                toStore.LaveNum += 1;
+                                fromStore.TotalNum -= 1;
+                                fromStore.LaveNum -= 1;
+                                db.SaveChanges();
+                            }
+                            else
                             {
-                                CreateDate = DateTime.Now,
-                                StoreId = toStore.Id, //仓库
-                                BrandId = Convert.ToInt32(BrandId), //产品类型
-                                OpStoreNum = 1, //操作库存数
-                                OpSymbol = "+", //操作符
-                                BeforeTotalNum = toStore.TotalNum, //操作前总库存数
-                                AfterTotalNum = toStore.TotalNum + 1, //操作后总库存数
-                                BeforeLaveNum = toStore.LaveNum, //操作前剩余库存数
-                                AfterLaveNum = toStore.LaveNum + 1, //操作后剩余库存数
-                                BeforeOutNum = toStore.OutNum, //操作前出库数
-                                AfterOutNum = toStore.OutNum, //操作后出库数
-                            }).Entity;
+                                var changeNo = "JJBH" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
+                                StoreStockChange stockchange = db.StoreStockChange.Add(new StoreStockChange()
+                                {
+                                    CreateDate = DateTime.Now,
+                                    StoreId = fromStore.Id, //出货仓库
+                                    ToStoreId = toStore.Id, //发货仓库
+                                    BrandId = Convert.ToInt32(BrandId), //产品类型
+                                    ProductName = RelationClass.GetKqProductBrandInfo(Convert.ToInt32(BrandId)), //产品名称
+                                    ChangeNo = changeNo, //变更记录单号
+                                    BizBatchNo = No, //业务批次号
+                                    TransType = 4, //交易类型
+                                    SnNo = PosSn, //SN编号
+                                    StockOpDirect = 1, //库存操作方向
+                                    SnStatus = 1, //SN状态
+                                    DeviceVendor = posInfo.DeviceName, //设备厂商
+                                    DeviceModel = posInfo.DeviceKind, //设备型号
+                                    DeviceType = posInfo.DeviceType, //设备类型                    
+                                    SourceStoreId = posInfo.SourceStoreId, //源仓库编号
+                                    BrandType = posInfo.DeviceType, //品牌类型
+                                }).Entity;
+                                db.SaveChanges();
+
+                                db.StoreChangeHistory.Add(new StoreChangeHistory()
+                                {
+                                    CreateDate = DateTime.Now,
+                                    UserId = user.Id, //创客
+                                    StoreId = fromStore.Id, //出货仓库
+                                    ToStoreId = toStore.Id, //发货仓库
+                                    BrandId = Convert.ToInt32(BrandId), //产品类型
+                                    ChangeRecordNo = changeNo, //变更记录单号
+                                    SeoTitle = "机具驳回仓库",
+                                    BizBatchNo = No, //业务批次号
+                                    SnNo = PosSn, //SN编号
+                                    TransType = 4,//驳回
+                                });
+                                db.SaveChanges();
+
+                                StoreBalance balance = db.StoreBalance.Add(new StoreBalance()
+                                {
+                                    CreateDate = DateTime.Now,
+                                    StoreId = fromStore.Id, //仓库
+                                    BrandId = Convert.ToInt32(BrandId), //产品类型
+                                    OpStoreNum = 1, //操作库存数
+                                    OpSymbol = "-", //操作符
+                                    BeforeTotalNum = fromStore.TotalNum, //操作前总库存数
+                                    AfterTotalNum = fromStore.TotalNum - 1, //操作后总库存数
+                                    BeforeLaveNum = fromStore.LaveNum, //操作前剩余库存数
+                                    AfterLaveNum = fromStore.LaveNum - 1, //操作后剩余库存数
+                                    BeforeOutNum = fromStore.OutNum, //操作前出库数
+                                    AfterOutNum = fromStore.OutNum - 1, //操作后出库数
+                                }).Entity;
+                                db.SaveChanges();
+
+                                posInfo.StoreId = toStore.Id;
+                                posInfo.BuyUserId = 0;
+                                toStore.LaveNum += 1;
+                                db.SaveChanges();
+                            }
                             db.SaveChanges();
 
-                            posInfo.StoreId = toStore.Id;
-                            posInfo.BuyUserId = 0;
-                            toStore.LaveNum += 1;
-                            db.SaveChanges();
                         }
-                        db.SaveChanges();
-
                     }
+
+                }
+                if (!string.IsNullOrEmpty(error))
+                {
+                    return "Warning|" + error;
                 }
             }
             AddSysLog("0", "MachinesRejectStore", "Import");

+ 9 - 0
Areas/Admin/Controllers/MainServer/StoreMachineApplyController.cs

@@ -495,6 +495,15 @@ namespace MySystem.Areas.Admin.Controllers
                 string SnNo = itemJson.Contains("\"A\"") ? dr["A"].ToString() : "";
                 string Brand = itemJson.Contains("\"B\"") ? dr["B"].ToString() : "";
                 BrandId = Convert.ToInt32(Brand);
+                MachineForSnNo posInfo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == SnNo) ?? new MachineForSnNo();
+                var pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posInfo.SnId) ?? new PosMachinesTwo();
+                if (pos.Id > 0)
+                {
+                    if (pos.BrandId != BrandId)
+                    {
+                        error += "以下操作失败" + SnNo + ',' + "该机具品牌填写错误" + '\n';
+                    }
+                }
 
                 if (BrandId == 1) FromStoreId = 7;
                 if (BrandId == 2) FromStoreId = 721;

+ 18 - 0
Models/TradeDaySummary.cs

@@ -62,5 +62,23 @@ namespace MySystem.Models
         public int UserId { get; set; }
         public int PayType { get; set; }
         public int VipFlag { get; set; }
+        public decimal ProfitNonDirectNonQrDebitTradeAmt { get; set; }
+        public decimal ProfitDirectNonQrDebitTradeAmt { get; set; }
+        public decimal ProfitNonDirectQrDebitTradeAmt { get; set; }
+        public decimal ProfitDirectQrDebitTradeAmt { get; set; }
+        public decimal ProfitNonDirectDebitCapNum { get; set; }
+        public decimal ProfitNonDirectDebitCapTradeAmt { get; set; }
+        public decimal ProfitNonDirectDebitTradeAmt { get; set; }
+        public decimal ProfitDirectDebitCapNum { get; set; }
+        public decimal ProfitDirectDebitCapTradeAmt { get; set; }
+        public decimal ProfitDirectDebitTradeAmt { get; set; }
+        public decimal ProfitNonDirectNonQrCreditTradeAmt { get; set; }
+        public decimal ProfitDirectNonQrCreditTradeAmt { get; set; }
+        public decimal ProfitNonDirectQrCreditTradeAmt { get; set; }
+        public decimal ProfitDirectQrCreditTradeAmt { get; set; }
+        public decimal ProfitNonDirectCreditTradeAmt { get; set; }
+        public decimal ProfitDirectCreditTradeAmt { get; set; }
+        public decimal ProfitNonDirectTradeAmt { get; set; }
+        public decimal ProfitDirectTradeAmt { get; set; }
     }
 }

+ 490 - 0
Models/WebCMSEntities.cs

@@ -85,6 +85,7 @@ namespace MySystem.Models
         public virtual DbSet<MerchantCol> MerchantCol { get; set; }
         public virtual DbSet<MerchantComment> MerchantComment { get; set; }
         public virtual DbSet<MerchantDepositReturns> MerchantDepositReturns { get; set; }
+        public virtual DbSet<MerchantDepositSet> MerchantDepositSet { get; set; }
         public virtual DbSet<MerchantForCode> MerchantForCode { get; set; }
         public virtual DbSet<MerchantForMobile> MerchantForMobile { get; set; }
         public virtual DbSet<MerchantForName> MerchantForName { get; set; }
@@ -94,6 +95,7 @@ namespace MySystem.Models
         public virtual DbSet<MerchantRebateDetail> MerchantRebateDetail { get; set; }
         public virtual DbSet<Merchants> Merchants { get; set; }
         public virtual DbSet<MobileCodeCheck> MobileCodeCheck { get; set; }
+        public virtual DbSet<MsgAlert> MsgAlert { get; set; }
         public virtual DbSet<MsgBlackList> MsgBlackList { get; set; }
         public virtual DbSet<MsgPersonal> MsgPersonal { get; set; }
         public virtual DbSet<MsgPlacard> MsgPlacard { get; set; }
@@ -165,8 +167,13 @@ namespace MySystem.Models
         public virtual DbSet<RecommendTradeSummary> RecommendTradeSummary { get; set; }
         public virtual DbSet<RightDic> RightDic { get; set; }
         public virtual DbSet<SchoolMakerStudy> SchoolMakerStudy { get; set; }
+        public virtual DbSet<SchoolMaterials> SchoolMaterials { get; set; }
         public virtual DbSet<SchoolMorningMeet> SchoolMorningMeet { get; set; }
         public virtual DbSet<SchoolMorningMeetLog> SchoolMorningMeetLog { get; set; }
+        public virtual DbSet<SchoolSignInData> SchoolSignInData { get; set; }
+        public virtual DbSet<SchoolSignInRecord> SchoolSignInRecord { get; set; }
+        public virtual DbSet<SchoolSignInTask> SchoolSignInTask { get; set; }
+        public virtual DbSet<SchoolSignInTaskRecord> SchoolSignInTaskRecord { get; set; }
         public virtual DbSet<ServiceCenter> ServiceCenter { get; set; }
         public virtual DbSet<SetMerchantTypeRecord> SetMerchantTypeRecord { get; set; }
         public virtual DbSet<SmallStoreHouse> SmallStoreHouse { get; set; }
@@ -5542,6 +5549,55 @@ namespace MySystem.Models
                 entity.Property(e => e.UserId).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<MerchantDepositSet>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.DepositAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.MerNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.ReturnNote)
+                    .HasColumnType("mediumtext")
+                    .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.SnNo)
+                    .HasColumnType("varchar(50)")
+                    .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<MerchantForCode>(entity =>
             {
                 entity.HasKey(e => e.Code)
@@ -6051,6 +6107,119 @@ namespace MySystem.Models
                     .HasCollation("utf8_general_ci");
             });
 
+            modelBuilder.Entity<MsgAlert>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AlertFlag)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.BgPic)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BtnText)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Content)
+                    .HasColumnType("longtext")
+                    .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.EffectEndDate).HasColumnType("datetime");
+
+                entity.Property(e => e.EffectStartDate).HasColumnType("datetime");
+
+                entity.Property(e => e.ExtendColumn)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.IsTop)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.IsWeekend)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.MsgType).HasColumnType("int(11)");
+
+                entity.Property(e => e.PushFlag).HasColumnType("int(11)");
+
+                entity.Property(e => e.PushParam)
+                    .HasColumnType("varchar(255)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PushTime).HasColumnType("datetime");
+
+                entity.Property(e => e.PushType).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.Summary)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TimeByDay).HasColumnType("int(11)");
+
+                entity.Property(e => e.Title)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.Url)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UrlParam)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<MsgBlackList>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -11389,6 +11558,80 @@ namespace MySystem.Models
                     .HasCollation("utf8_general_ci");
             });
 
+            modelBuilder.Entity<SchoolMaterials>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.Contents)
+                    .HasColumnType("longtext")
+                    .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.MakerCode)
+                    .HasColumnType("varchar(20)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Pic)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.TextDetail)
+                    .HasColumnType("mediumtext")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.Url)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UrlParam)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<SchoolMorningMeet>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -11480,6 +11723,217 @@ namespace MySystem.Models
                 entity.Property(e => e.UserId).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<SchoolSignInData>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ContinueDays).HasColumnType("int(11)");
+
+                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.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.RingFlag)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                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.TotalDays).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.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<SchoolSignInRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                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.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.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<SchoolSignInTask>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                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.Details)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ListPic)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Recommend)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                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.TaskName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.Url)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UrlParam)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<SchoolSignInTaskRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                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.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.TaskId).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<ServiceCenter>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -13508,6 +13962,42 @@ namespace MySystem.Models
 
                 entity.Property(e => e.PayType).HasColumnType("int(11)");
 
+                entity.Property(e => e.ProfitDirectCreditTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitDirectDebitCapNum).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitDirectDebitCapTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitDirectDebitTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitDirectNonQrCreditTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitDirectNonQrDebitTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitDirectQrCreditTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitDirectQrDebitTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitDirectTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitNonDirectCreditTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitNonDirectDebitCapNum).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitNonDirectDebitCapTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitNonDirectDebitTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitNonDirectNonQrCreditTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitNonDirectNonQrDebitTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitNonDirectQrCreditTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitNonDirectQrDebitTradeAmt).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ProfitNonDirectTradeAmt).HasColumnType("decimal(18,2)");
+
                 entity.Property(e => e.QueryCount).HasColumnType("int(11)");
 
                 entity.Property(e => e.SeoDescription)