Bläddra i källkod

整理盒易付商户入库流程

lcl 2 år sedan
förälder
incheckning
baca3c69ad

+ 1 - 1
AppStart/Helper/StatService.cs

@@ -1413,7 +1413,7 @@ namespace MySystem
                                 }
                             }
                         }
-                        else if(trade.ProductType == "10") //联动
+                        else if(trade.ProductType == "10" || trade.ProductType == "12") //10联动、12盒易付
                         {
                             if (trade.DigAmt > 0)
                             {

+ 9 - 1
AppStart/Helper/SycnSpServer/SycnSpMerchantService.cs

@@ -37,7 +37,6 @@ namespace MySystem
                         var tran = db.Database.BeginTransaction();
                         try
                         {
-                            // PxcModels.MachineForMerNo posFor = db.MachineForMerNo.FirstOrDefault(m => m.MerNo == Mer.MerNo) ?? new PxcModels.MachineForMerNo();
                             PxcModels.PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == Mer.SnNo) ?? new PxcModels.PosMachinesTwo();
                             if (pos.BindingState == 1 && Mer.Field2 != "解绑")
                             {
@@ -48,6 +47,15 @@ namespace MySystem
                                     TopUserId = int.Parse(user.ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
                                 }
                                 int BrandId = pos.BrandId;
+                                if (BrandId == 12)
+                                {
+                                    MerchantRecord merinfo = spdb.MerchantRecord.FirstOrDefault(m => m.MerNo == Mer.MerNo);
+                                    if(merinfo != null)
+                                    {
+                                        Mer.MerIdcardNo = merinfo.LegalIdCard;
+                                        Mer.MerName = merinfo.MerName;
+                                    }
+                                }
 
                                 PxcModels.PosMerchantInfo add = db.PosMerchantInfo.FirstOrDefault(m => m.KqMerNo == Mer.MerNo);
                                 if (add == null)

+ 20 - 0
AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

@@ -76,6 +76,26 @@ namespace MySystem
                                 spdb.SaveChanges();
                             }
                         }
+                        else if (trade.TradeType == "40" && trade.ProductType == "12") //盒易付押金获取
+                        {
+                            if (trade.TradeAmount == 99 || trade.TradeAmount == 199 || trade.TradeAmount == 299)
+                            {
+                                op = false;
+                                PxcModels.MachineForSnNo posFor = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == trade.TradeSnNo) ?? new PxcModels.MachineForSnNo();
+                                PxcModels.PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posFor.SnId);
+                                if (pos != null)
+                                {
+                                    pos.SeoKeyword = trade.TradeAmount.ToString("f2");
+                                    db.SaveChanges();
+                                }
+                                TradeRecord edit = spdb.TradeRecord.FirstOrDefault(m => m.Id == trade.Id);
+                                if (edit != null)
+                                {
+                                    edit.Status = 2;
+                                }
+                                spdb.SaveChanges();
+                            }
+                        }
                         if (trade.DiscountRateFlag == "True")
                         {
                             op = false;

+ 9 - 1
SpModels/KssMerchant.cs

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

+ 42 - 0
SpModels/MerchantRecord.cs

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

+ 3 - 0
SpModels/TradeFluxRecord.cs

@@ -40,5 +40,8 @@ namespace MySystem.SpModels
         public string MerName { get; set; }
         public string TradeSerialNo { get; set; }
         public string MerNo { get; set; }
+        public string Field3 { get; set; }
+        public string Field2 { get; set; }
+        public string Field1 { get; set; }
     }
 }

+ 194 - 9
SpModels/WebCMSEntities.cs

@@ -31,6 +31,7 @@ namespace MySystem.SpModels
         public virtual DbSet<KssReturnDeposit> KssReturnDeposit { get; set; }
         public virtual DbSet<KssStageRwd> KssStageRwd { get; set; }
         public virtual DbSet<KssTradeFirst> KssTradeFirst { get; set; }
+        public virtual DbSet<MerchantRecord> MerchantRecord { get; set; }
         public virtual DbSet<Merchants> Merchants { get; set; }
         public virtual DbSet<ProfitRecord> ProfitRecord { get; set; }
         public virtual DbSet<RightDic> RightDic { get; set; }
@@ -185,6 +186,9 @@ namespace MySystem.SpModels
 
             modelBuilder.Entity<BindRecord>(entity =>
             {
+                entity.HasIndex(e => new { e.MerSnNo, e.MerNo })
+                    .HasName("BindRecordIndex");
+
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.AgentName)
@@ -1184,13 +1188,7 @@ namespace MySystem.SpModels
 
             modelBuilder.Entity<KssMerchant>(entity =>
             {
-                entity.HasKey(e => e.MerNo)
-                    .HasName("PRIMARY");
-
-                entity.Property(e => e.MerNo)
-                    .HasColumnType("varchar(32)")
-                    .HasCharSet("utf8")
-                    .HasCollation("utf8_general_ci");
+                entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.AgentName)
                     .HasColumnType("varchar(64)")
@@ -1202,6 +1200,8 @@ namespace MySystem.SpModels
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
                 entity.Property(e => e.CreateTime).HasColumnType("datetime");
 
                 entity.Property(e => e.MerAuditDate).HasColumnType("datetime");
@@ -1243,11 +1243,34 @@ namespace MySystem.SpModels
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
                 entity.Property(e => e.Remark)
                     .HasColumnType("varchar(64)")
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
                 entity.Property(e => e.UpdateTime).HasColumnType("datetime");
             });
 
@@ -1452,8 +1475,152 @@ namespace MySystem.SpModels
                 entity.Property(e => e.UpdateTime).HasColumnType("datetime");
             });
 
+            modelBuilder.Entity<MerchantRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AgentName)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AgentNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Areas)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ChannelSerial)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.City)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateTime).HasColumnType("datetime");
+
+                entity.Property(e => e.Field1)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field2)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field3)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field4)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field5)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.LegalIdCard)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.LegalName)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerNewSnNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerOperateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.MerOperateType)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerSnNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerStatus)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ProductType)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Province)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateTime).HasColumnType("datetime");
+            });
+
             modelBuilder.Entity<Merchants>(entity =>
             {
+                entity.HasIndex(e => e.MerNo)
+                    .HasName("MerchantsIndex");
+
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.AgentName)
@@ -1831,6 +1998,21 @@ namespace MySystem.SpModels
 
                 entity.Property(e => e.FeeAmount).HasColumnType("decimal(18,2)");
 
+                entity.Property(e => e.Field1)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field2)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field3)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.InputModel)
                     .HasColumnType("varchar(32)")
                     .HasCharSet("utf8")
@@ -1859,7 +2041,7 @@ namespace MySystem.SpModels
                 entity.Property(e => e.QueryCount).HasColumnType("int(11)");
 
                 entity.Property(e => e.SeoDescription)
-                    .HasColumnType("varchar(500)")
+                    .HasColumnType("varchar(2000)")
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
@@ -1907,7 +2089,7 @@ namespace MySystem.SpModels
                     .HasCollation("utf8_general_ci");
 
                 entity.Property(e => e.TradeSerialNo)
-                    .HasColumnType("varchar(32)")
+                    .HasColumnType("varchar(50)")
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
@@ -1931,6 +2113,9 @@ namespace MySystem.SpModels
 
             modelBuilder.Entity<TradeRecord>(entity =>
             {
+                entity.HasIndex(e => new { e.TradeSnNo, e.ProductType, e.MerNo })
+                    .HasName("TradeRecordIndex");
+
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.AgentNo)