zhuyiyi 9 months ago
parent
commit
a63cd049ed

+ 4 - 0
SiteCore/taoObj/api_trade_info.cs

@@ -226,6 +226,10 @@ namespace SiteCore.taoObj
             /// </summary>
             public bool isUrgent { get; set; }
             /// <summary>
+            /// 加急时间
+            /// </summary>
+            public string UrgencyTime { get; set; }
+            /// <summary>
             /// 出货时间
             /// </summary>
             public string shippingTime { get; set; }

+ 75 - 75
SiteCore/taobao/commonHelper.cs

@@ -1801,7 +1801,7 @@ namespace SiteCore
             }
             return new designApiResponseVo(-1, check_info);
         }
-        static List<int> products = new List<int>() { 29, 2489, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2533, 2534, 2539, 2558, 2576, 2577, 2578, 2579, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, 2615, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2634, 2639, 2644, 2645, 2646, 2648, 2649, 2650 };
+        static List<int> products = new List<int>() { 29, 2489, 2517, 2518, 2519, 2520, 2533, 2534, 2558, 2576, 2577, 2578, 2579, 2580, 2581, 2582, 2583, 2584, 2587, 2588, 2589, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2634, 2644, 2645, 2646, 2648, 2649, 2650 };
         public static designApiResponseVo checkOrderDesignInfo(CeErpTradeCell ceErpTradeCell, string post = "")
         {
             if (ceErpTradeCell.DispatchSort == 2)
@@ -1855,100 +1855,100 @@ namespace SiteCore
                     int min_num = 2;
 
                     int num = 0;
-                    if (a < 15)//限制不是全品的店铺限制
+                    /*if (a < 15)//限制不是全品的店铺限制
+                    {*/
+                    /*if (ceErpTradeCell.payment >= 500)
                     {
-                        /*if (ceErpTradeCell.payment >= 500)
-                        {
-                            return new designApiResponseVo(-1, "订单价格超出");
-                        }*/
-                        string pattern = @"\b(\d{1,5}[x\*]\d{1,5}(mm|cm))\b";
-                        string memo = ceErpTradeCell.seller_memo.Replace("MM", "mm").Replace("CM", "cm");
-                        Regex reg = new Regex(pattern, RegexOptions.IgnoreCase | RegexOptions.Multiline, TimeSpan.FromSeconds(2));//2秒后超时
-                        MatchCollection matches = reg.Matches(memo);//设定要查找的字符串
-                        string size = "";
-                        double min_width = 90;
-                        double min_height = 90;
-                        double width = 0;
-                        double height = 0;
-                        try
+                        return new designApiResponseVo(-1, "订单价格超出");
+                    }*/
+                    string pattern = @"\b(\d{1,5}[x\*]\d{1,5}(mm|cm))\b";
+                    string memo = ceErpTradeCell.seller_memo.Replace("MM", "mm").Replace("CM", "cm");
+                    Regex reg = new Regex(pattern, RegexOptions.IgnoreCase | RegexOptions.Multiline, TimeSpan.FromSeconds(2));//2秒后超时
+                    MatchCollection matches = reg.Matches(memo);//设定要查找的字符串
+                    string size = "";
+                    double min_width = 90;
+                    double min_height = 90;
+                    double width = 0;
+                    double height = 0;
+                    try
+                    {
+                        num = matches.Count;
+                        foreach (System.Text.RegularExpressions.Match match in matches)
                         {
-                            num = matches.Count;
-                            foreach (System.Text.RegularExpressions.Match match in matches)
+                            if (match.Success)
                             {
-                                if (match.Success)
+                                size = match.Groups[0].Value;
+                                if (size.Contains("cm"))
                                 {
-                                    size = match.Groups[0].Value;
-                                    if (size.Contains("cm"))
-                                    {
-                                        size = size.Replace("cm", "");
-                                        string[] size_list = size.Split('x');
-                                        if (size_list.Length > 1)
-                                        {
-                                            width = Convert.ToDouble(size_list[0]) * 10;
-                                            height = Convert.ToDouble(size_list[1]) * 10;
-                                        }
-                                    }
-                                    else if (size.Contains("mm"))
-                                    {
-                                        size = size.Replace("mm", "");
-                                        string[] size_list = size.Split('x');
-                                        if (size_list.Length > 1)
-                                        {
-                                            width = Convert.ToDouble(size_list[0]);
-                                            height = Convert.ToDouble(size_list[1]);
-                                        }
-                                    }
-
-                                    if (width >= min_width && height >= min_height && height >= min_width && width >= min_height)
+                                    size = size.Replace("cm", "");
+                                    string[] size_list = size.Split('x');
+                                    if (size_list.Length > 1)
                                     {
-                                        size_bool = true;
-                                        break;
+                                        width = Convert.ToDouble(size_list[0]) * 10;
+                                        height = Convert.ToDouble(size_list[1]) * 10;
                                     }
-                                    else
+                                }
+                                else if (size.Contains("mm"))
+                                {
+                                    size = size.Replace("mm", "");
+                                    string[] size_list = size.Split('x');
+                                    if (size_list.Length > 1)
                                     {
-                                        size_bool = false;
+                                        width = Convert.ToDouble(size_list[0]);
+                                        height = Convert.ToDouble(size_list[1]);
                                     }
                                 }
-                            }
-                        }
-                        catch (Exception ex)
-                        {
 
-                        }
-                        if (ceErpTradeCell.seller_memo.Contains("刮刮"))
-                        {
-                            num = Math.Max(num - 1, 1);
-                        }
-                        pattern = @"(\d+)款";
-                        matches = Regex.Matches(ceErpTradeCell.seller_memo, pattern);
-                        try
-                        {
-                            num = Math.Max(num - matches.Count, 0);
-
-                            foreach (System.Text.RegularExpressions.Match match in matches)
-                            {
-                                if (match.Success)
+                                if (width >= min_width && height >= min_height && height >= min_width && width >= min_height)
                                 {
-                                    num += Convert.ToInt32(match.Groups[1].Value);
+                                    size_bool = true;
                                     break;
                                 }
+                                else
+                                {
+                                    size_bool = false;
+                                }
                             }
                         }
-                        catch (Exception ex)
-                        {
+                    }
+                    catch (Exception ex)
+                    {
 
-                        }
-                        //2款不进
-                        if (num < min_num)
-                        {
-                            num_bool = false;
-                        }
+                    }
+                    if (ceErpTradeCell.seller_memo.Contains("刮刮"))
+                    {
+                        num = Math.Max(num - 1, 1);
+                    }
+                    pattern = @"(\d+)款";
+                    matches = Regex.Matches(ceErpTradeCell.seller_memo, pattern);
+                    try
+                    {
+                        num = Math.Max(num - matches.Count, 0);
 
-                        if (!num_bool && !size_bool)
+                        foreach (System.Text.RegularExpressions.Match match in matches)
                         {
-                            return new designApiResponseVo(-1, "尺寸小于80x80或款数小于2");
+                            if (match.Success)
+                            {
+                                num += Convert.ToInt32(match.Groups[1].Value);
+                                break;
+                            }
                         }
                     }
+                    catch (Exception ex)
+                    {
+
+                    }
+                    //2款不进
+                    if (num < min_num)
+                    {
+                        num_bool = false;
+                    }
+
+                    if (!num_bool && !size_bool)
+                    {
+                        return new designApiResponseVo(-1, "尺寸小于90x90或款数小于2");
+                    }
+                    /*}*/
                 }
             }
             return new designApiResponseVo(200, "");

+ 1 - 0
SiteCore/taobao/preSalesHelper.cs

@@ -1508,6 +1508,7 @@ namespace SiteCore.Handler
                 if (item.shippingTime != null && item.shippingTime.Length > 0)
                 {
                     entity.UnusualTime = Convert.ToDateTime(item.shippingTime);
+                    entity.UrgencyTime = Convert.ToDateTime(item.shippingTime);
                 }
                 if (!string.IsNullOrEmpty(item.sendGiftMark))
                 {

+ 21 - 19
SiteCore/taobao/tmcHelper.cs

@@ -1690,29 +1690,31 @@ namespace SiteCore
                 }
                 string orderSql = string.Format("SELECT * FROM [dbo].[CE_ErpTradeOrder] WHERE tid = '{0}' and total_fee > 0", father.tid);
                 DataTable table = SqlHelper.ExecuteDataSet(orderSql).Tables[0];
+                string spu_id = "";
                 if (table != null && table.Rows.Count == 1)
                 {
-                    string cellSql = string.Format("SELECT ctid FROM [dbo].[CE_ErpTradeCell] WHERE tid = '{0}'", father.tid);
-                    DataTable data = SqlHelper.ExecuteDataSet(cellSql).Tables[0];
-                    if (data != null && data.Rows.Count > 0)
+                    spu_id = table.Rows[0]["spu_id"].ToString();
+                }
+                string cellSql = string.Format("SELECT ctid FROM [dbo].[CE_ErpTradeCell] WHERE tid = '{0}'", father.tid);
+                DataTable data = SqlHelper.ExecuteDataSet(cellSql).Tables[0];
+                if (data != null && data.Rows.Count > 0)
+                {
+                    foreach (DataRow row in data.Rows)
                     {
-                        foreach (DataRow row in data.Rows)
+                        CeErpTradeCellExtend ceErpTradeCellExtend = CeErpTradeCellExtend.getByTid(row["ctid"].ToString());
+                        if (ceErpTradeCellExtend == null)
                         {
-                            CeErpTradeCellExtend ceErpTradeCellExtend = CeErpTradeCellExtend.getByTid(row["ctid"].ToString());
-                            if (ceErpTradeCellExtend == null)
-                            {
-                                ceErpTradeCellExtend = new CeErpTradeCellExtend();
-                                ceErpTradeCellExtend.ctid = row["ctid"].ToString();
-                            }
-                            ceErpTradeCellExtend.spu_id = table.Rows[0]["spu_id"].ToString();
-                            if (ceErpTradeCellExtend.ID == 0)
-                            {
-                                ceErpTradeCellExtend.Create();
-                            }
-                            else
-                            {
-                                ceErpTradeCellExtend.Update();
-                            }
+                            ceErpTradeCellExtend = new CeErpTradeCellExtend();
+                            ceErpTradeCellExtend.ctid = row["ctid"].ToString();
+                        }
+                        ceErpTradeCellExtend.spu_id = spu_id;
+                        if (ceErpTradeCellExtend.ID == 0)
+                        {
+                            ceErpTradeCellExtend.Create();
+                        }
+                        else
+                        {
+                            ceErpTradeCellExtend.Update();
                         }
                     }
                 }