Jelajahi Sumber

修改老客户日志

zhuyiyi 4 bulan lalu
induk
melakukan
7368ccc187

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

@@ -130,7 +130,6 @@ namespace SiteCore.Handler
                 Debug.WriteLine(index++);
             }*/
             //string a = commonHelper.convertQNMemo("48x61mm-4款各40个-铜版纸-不干胶-覆膜模切-tb963561715-金陵-顺丰到付.粘成品.6.5cm牙签-老客户改稿找金陵拉群-16发", CeErpTradeCell.GetByCtid("2879265072537265386"));
-
             List<string> lw = new List<string>();
             string tid = GetPostString("ctid");
             string date1 = GetPostString("date1");

+ 9 - 5
SiteCore/taobao/commonHelper.cs

@@ -30,6 +30,7 @@ using NPOI.SS.Formula.Functions;
 using System.Security.Cryptography;
 using NHibernate.Hql.Ast;
 using System.Security.Principal;
+using Microsoft.SqlServer.Server;
 
 namespace SiteCore
 {
@@ -3190,10 +3191,10 @@ namespace SiteCore
                 return;
             }
             int VipCustomer = 2;
-
+            string last_tid = "";
             if (ceErpTrade.payment > 20)
             {
-                string sql = string.Format("SELECT count(*) as number FROM [dbo].[view_ErpTradeCell] WITH(NOLOCK) WHERE (buyer_nick = '{0}' or buyer_id = '{1}' ) and status = 'COMPLETE' and seller_nick = '{2}' and tid <> '{3}' AND end_time < '{4}' and IsSample = 0 and payment >= 20", ceErpTrade.buyer_nick, ceErpTrade.buyer_id, ceErpTrade.seller_nick, ceErpTrade.tid, ceErpTrade.pay_time);
+                string sql = string.Format("SELECT top 1 tid FROM [dbo].[view_ErpTradeCell] WITH(NOLOCK) WHERE (buyer_nick = '{0}' or buyer_id = '{1}' ) and status = 'COMPLETE' and seller_nick = '{2}' and tid <> '{3}' AND end_time < '{4}' and IsSample = 0 and payment >= 20 order by pay_time desc;", ceErpTrade.buyer_nick, ceErpTrade.buyer_id, ceErpTrade.seller_nick, ceErpTrade.tid, ceErpTrade.pay_time);
                 if (string.IsNullOrEmpty(ceErpTrade.buyer_nick))
                 {
                     sql = string.Format("SELECT tid FROM [dbo].[CE_ErpTrade] WITH(NOLOCK) WHERE (buyer_id = '{1}' ) and status = 'COMPLETE' and seller_nick = '{2}' and tid <> '{3}' AND end_time < '{4}' and payment >= 20", ceErpTrade.buyer_nick, ceErpTrade.buyer_id, ceErpTrade.seller_nick, ceErpTrade.tid, ceErpTrade.pay_time);
@@ -3201,15 +3202,18 @@ namespace SiteCore
                 DataTable dataTable = DbHelper.DbConn.ExecuteDataset(sql).Tables[0];
                 if (dataTable != null && dataTable.Rows.Count > 0)
                 {
-                    int count = Convert.ToInt32(dataTable.Rows[0]["number"]);
+                    last_tid = dataTable.Rows[0]["tid"].ToString();
 
-                    if (count > 0)
+                    if (!string.IsNullOrEmpty(last_tid))
                     {
                         VipCustomer = 1;
                     }
                 }
             }
-
+            if (VipCustomer == 1)
+            {
+                LogHelper.addLog(ceErpTrade.tid, 0, "老客户订单号:" + last_tid, Convert.ToInt32(OrderState.待设计));
+            }
             DbHelper.DbConn.ExecuteNonQuery(string.Format("UPDATE [dbo].[CE_ErpTradeCell] set VipCustomer = {1} WHERE tid='{0}';", ceErpTrade.tid, VipCustomer));
 
             return;

+ 6 - 0
SiteCore/taobao/tmcHelper.cs

@@ -3385,6 +3385,12 @@ namespace SiteCore
                 entity.FinishPlaceTime = DateTime.Now;
                 entity.SupplierId = 5;//-福广
             }
+            if (entity.seller_memo.Contains("法式蛋糕"))
+            {
+                entity.OrderState = 6;
+                entity.FinishPlaceTime = DateTime.Now;
+                entity.SupplierId = 35;//-福广
+            }
             //台湾省要审核
             if ((father.receiver_state.Contains("台湾") && string.IsNullOrEmpty(father.receiver_zip)) || entity.seller_memo.IndexOf("不要切单个") > -1 || commonHelper.isFarAddress(father.receiver_state))
             {