|
|
@@ -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, "");
|