فهرست منبع

修改uV派单规则

zhuyiyi 5 ماه پیش
والد
کامیت
83ab2f7016
3فایلهای تغییر یافته به همراه28 افزوده شده و 9 حذف شده
  1. 1 1
      SiteCore/taobao/commonHelper.cs
  2. 24 5
      SiteCore/taobao/tmcHelper.cs
  3. 3 3
      ecomServer/MainForm.cs

+ 1 - 1
SiteCore/taobao/commonHelper.cs

@@ -3227,7 +3227,7 @@ namespace SiteCore
                 string kuanNum = kuanMatch.Success ? kuanMatch.Groups[1].Value : "1";
 
                 // 提取"个"或"张"前面的数字
-                string unitPattern = @"(\d+)(?=个|张|本|套|件  )";
+                string unitPattern = @"(\d+)(?=个|张|本|套|件|卷|劵 )";
                 Match unitMatch = Regex.Match(txtList[i], unitPattern);
                 string unitNum = unitMatch.Success ? unitMatch.Groups[1].Value : "1";
                 int kuan = 1;

+ 24 - 5
SiteCore/taobao/tmcHelper.cs

@@ -412,7 +412,7 @@ namespace SiteCore
             Content tObj = fullObj.content;
             List<Api_tmc_trade_info_Obj.LinesItem> orderList = tObj.lines;
             //未付款,未成功的单不需要 榆家不收
-            if (tObj.status == "DELETED" || (tObj.status == "CANCEL" && tObj.refType != "JD") || tObj.status == "UNKNOWN" || tObj.status == "UNPAID" )
+            if (tObj.status == "DELETED" || (tObj.status == "CANCEL" && tObj.refType != "JD") || tObj.status == "UNKNOWN" || tObj.status == "UNPAID")
             {
                 return;
             }
@@ -731,8 +731,16 @@ namespace SiteCore
                     {
                         order.spu_id = item.refSpuId;
                     }
-
-                    if (item.refSkuId != null && item.standards != null && (item.standards.IndexOf("现货") != -1 || item.standards.IndexOf("封酒贴") != -1 || item.standards.IndexOf("兔团团") != -1 || item.standards.IndexOf("帆布") != -1 || item.standards.IndexOf("手拉旗") != -1 || item.standards.IndexOf("kt") != -1 || item.standards.IndexOf("条幅") != -1 || item.standards.IndexOf("#") != -1) && item.standards.IndexOf("定制") == -1)
+                    List<string> standards_list = new List<string>() { "现货", "封酒贴", "兔团团", "帆布", "手拉旗", "kt", "条幅"};
+                    bool isInList = false;
+                    foreach (string text in standards_list)
+                    {
+                        if (item.standards.IndexOf(text) > -1)
+                        {
+                            isInList = true;
+                        }
+                    }
+                    if (item.refSkuId != null && item.standards != null && (isInList || item.standards.IndexOf("#") != -1) && item.standards.IndexOf("定制") == -1)
                     {
                         isXianhuo = true;
                         xianhuoMemo += order.sku_properties_name;
@@ -903,6 +911,16 @@ namespace SiteCore
                         {
                             entity.SupplierId = 108;
                         }
+                        else if (xianhuoMemo.IndexOf("臂贴") != -1)
+                        {
+                            entity.OrderState = 2;
+                            entity.ProductId = 327;
+                            entity.IsXianHuo = 0;
+                            xianhuoMemo = xianhuoMemo.Replace("现货", "");
+                            xianhuoMemo = xianhuoMemo.Replace(" ", "");
+                            entity.seller_memo = xianhuoMemo;
+
+                        }
                         try
                         {
                             string goodsSql = "select * from CE_ErpSupplier where IsClose = 0 and XianhuoMemo IS NOT NULL AND XianhuoMemo != ''";
@@ -3390,12 +3408,13 @@ namespace SiteCore
             CeErpSukuraData.createInfo(entity.ctid, 1);
             LogHelper.addLog(entity.ctid, entity.CustomerUserId, "普通推送生成:" + entity.seller_memo, entity.OrderState);
         }
-
+        public static List<int> shop_list = new List<int>() { 5, 6, 8, 10, 11, 12, 14, 15, 16, 18, 24, 28, 31, 32, 56, 61, 126, 128 };
         public static void dealOldCustomerEntityTag(ref CeErpTradeCell entity, CeErpTrade father)
         {
             //UV跟指定店铺
             int[] shopList = { 49, 67, 26, 45, 13, 68, 20, 17, 52, 21, 66, 63, 64 };
-            if (entity.ProductId == 43 || shopList.Contains(entity.ShopId))
+
+            if ((entity.ProductId == 43 && !shop_list.Contains(entity.ShopId)) || shopList.Contains(entity.ShopId))
             {
                 /**int curHour = DateTime.Now.Hour;
                 int initSysDesignerId = Convert.ToInt32(webConfig.OldCusPartShopDesigner);

+ 3 - 3
ecomServer/MainForm.cs

@@ -152,7 +152,7 @@ namespace ErpServer
         string dinggaolvSync = "";
         string unusualSync = "";
         string refundSync = "";
-        List<int> shop_list = new List<int>() { 5, 6, 8, 10, 11, 12, 14, 15, 16, 18, 24, 28, 31, 32, 56, 61, 126, 128 };
+        
 
         private void MainForm_Load(object sender, EventArgs e)
         {
@@ -954,7 +954,7 @@ namespace ErpServer
                                     int[] uv_productIds = new int[] { 14, 43, 2487, 2531, 2654, 2656 };
 
                                     CeErpTrade ceErpTrade = CeErpTrade.Get(dr["tid"].ToString());
-                                    if ("normal".Equals(syncType) && ceErpTrade != null && !string.IsNullOrEmpty(ceErpTrade.buyer_nick) && shop_list.Contains(Convert.ToInt32(dr["shopid"])))
+                                    if ("normal".Equals(syncType) && ceErpTrade != null && !string.IsNullOrEmpty(ceErpTrade.buyer_nick) && tmcHelper.shop_list.Contains(Convert.ToInt32(dr["shopid"])))
                                     {
                                         string design_order_sql = string.Format("SELECT top 1 DesignUserId,DesignUserName,OnDuty,BeOnDuty,OldOrder FROM [dbo].[view_ErpTradeCell] WHERE (buyer_nick = '{0}' or buyer_id = '{1}' ) and seller_nick = '{2}' and DesignUserId > 0 order by pay_time desc;", ceErpTrade.buyer_nick, ceErpTrade.buyer_id, ceErpTrade.seller_nick);
                                         DataTable dataTable = SqlHelper.ExecuteDataset(design_order_sql).Tables[0];
@@ -1054,7 +1054,7 @@ namespace ErpServer
                                         if ("normal".Equals(syncType))
                                         {
                                             //UV接老客户的设计师也可以接新客
-                                            if (uv_productIds.Contains(ProductId) && shop_list.Contains(Convert.ToInt32(dr["shopid"])))
+                                            if (uv_productIds.Contains(ProductId) && tmcHelper.shop_list.Contains(Convert.ToInt32(dr["shopid"])))
                                             {
                                                 //UV老客只派给老客设计师
                                                 if (IsOldCustomer == "1")