Quellcode durchsuchen

新增新产品标识

zhuyiyi vor 4 Monaten
Ursprung
Commit
1e56c323bd
4 geänderte Dateien mit 69 neuen und 6 gelöschten Zeilen
  1. 10 4
      BizCom/Dao/CeErpTradeCell.cs
  2. 9 1
      SiteCore/Handler/sync.order.cs
  3. 49 0
      SiteCore/taobao/tmcHelper.cs
  4. 1 1
      Web/js/view.render.js

+ 10 - 4
BizCom/Dao/CeErpTradeCell.cs

@@ -1065,7 +1065,7 @@ namespace BizCom
         {
         {
             get { return _vipCustomer; }
             get { return _vipCustomer; }
             set { _vipCustomer = value; }
             set { _vipCustomer = value; }
-        }       
+        }
         private string _supplierOrderSn;
         private string _supplierOrderSn;
         /// <summary>
         /// <summary>
         /// 车间订单号
         /// 车间订单号
@@ -1076,7 +1076,13 @@ namespace BizCom
             get { return _supplierOrderSn; }
             get { return _supplierOrderSn; }
             set { _supplierOrderSn = value; }
             set { _supplierOrderSn = value; }
         }
         }
-
+        private int _newProduct = 0;                                                                             
+        [Property]
+        public int NewProduct
+        {
+            set { _newProduct = value; }
+            get { return _newProduct; }
+        }
         public static CeErpTradeCell GetByTid(string tid)
         public static CeErpTradeCell GetByTid(string tid)
         {
         {
             return FindFirst(Expression.Sql(string.Format("this_.tid='{0}'", tid)));
             return FindFirst(Expression.Sql(string.Format("this_.tid='{0}'", tid)));
@@ -1176,8 +1182,8 @@ namespace BizCom
                 //CeErpTradeCell ceErpTradeCell = FindFirst(Expression.Sql(string.Format("ptid='{0}'", needCtid)));
                 //CeErpTradeCell ceErpTradeCell = FindFirst(Expression.Sql(string.Format("ptid='{0}'", needCtid)));
                 //if (ceErpTradeCell != null)
                 //if (ceErpTradeCell != null)
                 //{
                 //{
-                    sql.AppendFormat("insert into S_BuChaJia(ctid,addtime) values('{0}',getdate()); ", ctid);
-                    ExecuteNonQuery(sql.ToString());
+                sql.AppendFormat("insert into S_BuChaJia(ctid,addtime) values('{0}',getdate()); ", ctid);
+                ExecuteNonQuery(sql.ToString());
                 //}
                 //}
                 //}
                 //}
             }
             }

+ 9 - 1
SiteCore/Handler/sync.order.cs

@@ -1996,6 +1996,14 @@ namespace SiteCore.Handler
                 entitycell.ShopId = shopId;
                 entitycell.ShopId = shopId;
                 entitycell.UpdateTime = DateTime.Now;
                 entitycell.UpdateTime = DateTime.Now;
                 entitycell.payment = Convert.ToDouble(GetPostString("payment"));
                 entitycell.payment = Convert.ToDouble(GetPostString("payment"));
+                if (entitycell.ProductId > 0)
+                {
+                    CeErpProduct ceErpProduct = CeErpProduct.GetById(entitycell.ProductId);
+                    if (ceErpProduct.CreateTime != null && DateTime.Compare(ceErpProduct.CreateTime, DateTime.Now.AddDays(-90)) > 0)
+                    {
+                        entitycell.NewProduct = 1;
+                    }
+                }
                 if (entity.buyer_nick == "现货手提袋" || memo.IndexOf("现货手提袋") != -1)
                 if (entity.buyer_nick == "现货手提袋" || memo.IndexOf("现货手提袋") != -1)
                 {
                 {
                     entitycell.IsXianHuo = 1;
                     entitycell.IsXianHuo = 1;
@@ -2025,7 +2033,7 @@ namespace SiteCore.Handler
                     ceWithdraw.providerid = "-1";
                     ceWithdraw.providerid = "-1";
                     ceWithdraw.status = -1;
                     ceWithdraw.status = -1;
                     ceWithdraw.creationtime = DateTime.Now;
                     ceWithdraw.creationtime = DateTime.Now;
-                    ceWithdraw.userid = 742;
+                    ceWithdraw.userid = 4634;
 
 
                     ceWithdraw.Create();
                     ceWithdraw.Create();
 
 

+ 49 - 0
SiteCore/taobao/tmcHelper.cs

@@ -1524,6 +1524,7 @@ namespace SiteCore
                     entity.DesignUserId = 0;
                     entity.DesignUserId = 0;
                     entity.WaitDesignTime = null;
                     entity.WaitDesignTime = null;
                 }
                 }
+
                 if (ishaveBu)
                 if (ishaveBu)
                 {
                 {
                     entity.Update();
                     entity.Update();
@@ -2043,6 +2044,14 @@ namespace SiteCore
                 entity.DesignUserId = 0;
                 entity.DesignUserId = 0;
                 entity.WaitDesignTime = null;
                 entity.WaitDesignTime = null;
             }
             }
+            if (entity.ProductId > 0)
+            {
+                CeErpProduct ceErpProduct = CeErpProduct.GetById(entity.ProductId);
+                if (ceErpProduct.CreateTime != null && DateTime.Compare(ceErpProduct.CreateTime, DateTime.Now.AddDays(-90)) > 0)
+                {
+                    entity.NewProduct = 1;
+                }
+            }
             if (isNull)
             if (isNull)
             {
             {
                 father.create_time = DateTime.Now;
                 father.create_time = DateTime.Now;
@@ -2218,6 +2227,14 @@ namespace SiteCore
                 entity.DesignUserId = 0;
                 entity.DesignUserId = 0;
                 entity.WaitDesignTime = null;
                 entity.WaitDesignTime = null;
             }
             }
+            if (entity.ProductId > 0)
+            {
+                CeErpProduct ceErpProduct = CeErpProduct.GetById(entity.ProductId);
+                if (ceErpProduct.CreateTime != null && DateTime.Compare(ceErpProduct.CreateTime, DateTime.Now.AddDays(-90)) > 0)
+                {
+                    entity.NewProduct = 1;
+                }
+            }
             if (isNull)
             if (isNull)
             {
             {
                 father.create_time = DateTime.Now;
                 father.create_time = DateTime.Now;
@@ -2406,6 +2423,14 @@ namespace SiteCore
                 entity.DesignUserId = 0;
                 entity.DesignUserId = 0;
                 entity.WaitDesignTime = null;
                 entity.WaitDesignTime = null;
             }
             }
+            if (entity.ProductId > 0)
+            {
+                CeErpProduct ceErpProduct = CeErpProduct.GetById(entity.ProductId);
+                if (ceErpProduct.CreateTime != null && DateTime.Compare(ceErpProduct.CreateTime, DateTime.Now.AddDays(-90)) > 0)
+                {
+                    entity.NewProduct = 1;
+                }
+            }
             if (isNull)
             if (isNull)
             {
             {
                 father.create_time = DateTime.Now;
                 father.create_time = DateTime.Now;
@@ -2583,6 +2608,14 @@ namespace SiteCore
                 entity.DesignUserId = 0;
                 entity.DesignUserId = 0;
                 entity.WaitDesignTime = null;
                 entity.WaitDesignTime = null;
             }
             }
+            if (entity.ProductId > 0)
+            {
+                CeErpProduct ceErpProduct = CeErpProduct.GetById(entity.ProductId);
+                if (ceErpProduct.CreateTime != null && DateTime.Compare(ceErpProduct.CreateTime, DateTime.Now.AddDays(-90)) > 0)
+                {
+                    entity.NewProduct = 1;
+                }
+            }
             if (isNull)
             if (isNull)
             {
             {
                 father.create_time = DateTime.Now;
                 father.create_time = DateTime.Now;
@@ -2969,6 +3002,14 @@ namespace SiteCore
                 entity.DesignUserId = 0;
                 entity.DesignUserId = 0;
                 entity.WaitDesignTime = null;
                 entity.WaitDesignTime = null;
             }
             }
+            if (entity.ProductId > 0)
+            {
+                CeErpProduct ceErpProduct = CeErpProduct.GetById(entity.ProductId);
+                if (ceErpProduct.CreateTime != null && DateTime.Compare(ceErpProduct.CreateTime, DateTime.Now.AddDays(-90)) > 0)
+                {
+                    entity.NewProduct = 1;
+                }
+            }
             if (ishave)
             if (ishave)
             {
             {
 
 
@@ -3398,6 +3439,14 @@ namespace SiteCore
                 entity.DesignUserId = 0;
                 entity.DesignUserId = 0;
                 entity.WaitDesignTime = null;
                 entity.WaitDesignTime = null;
             }
             }
+            if (entity.ProductId > 0)
+            {
+                CeErpProduct ceErpProduct = CeErpProduct.GetById(entity.ProductId);
+                if (ceErpProduct.CreateTime != null && DateTime.Compare(ceErpProduct.CreateTime, DateTime.Now.AddDays(-90)) > 0)
+                {
+                    entity.NewProduct = 1;
+                }
+            }
             if (ishave)
             if (ishave)
             {
             {
                 entity.Update();
                 entity.Update();

+ 1 - 1
Web/js/view.render.js

@@ -49,7 +49,7 @@
     if (record.MemoOpt == 2) {
     if (record.MemoOpt == 2) {
         html += "<span class=\"word_tui word_green\">定</span>";
         html += "<span class=\"word_tui word_green\">定</span>";
     }
     }
-    if (record.IsNew == 1) {
+    if (record.IsNew == 1 || record.NewProduct == 1) {
         html += "<span class=\"word_tui word_green\">新</span>";
         html += "<span class=\"word_tui word_green\">新</span>";
     }
     }
     if (record.gongchuang == 200) {
     if (record.gongchuang == 200) {