From 7e0a6523e542dc402fab0317736d5122ad860c3f Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Tue, 24 Feb 2026 11:36:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=87=AA=E5=8A=A8=E9=80=80?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplierDownload.aspx.cs | 3 +- uploadFile.aspx.cs | 195 ++++++++++++++++++++------------------- 2 files changed, 102 insertions(+), 96 deletions(-) diff --git a/supplierDownload.aspx.cs b/supplierDownload.aspx.cs index 73c7131..8678d19 100644 --- a/supplierDownload.aspx.cs +++ b/supplierDownload.aspx.cs @@ -55,6 +55,7 @@ public partial class supplierDownload : System.Web.UI.Page { if (!IsPostBack) { + Response.Buffer = true; downloadMore(); } @@ -359,7 +360,7 @@ public partial class supplierDownload : System.Web.UI.Page private string getDesignDate(object v) { - return DateTime.Now.ToString("yyyy-MM-dd"); + return DateTime.Now.ToString("yyyy") + "\\" + DateTime.Now.ToString("MM") + "\\" + DateTime.Now.ToString("dd"); /*if (v.ToString() == "") return ""; return Convert.ToDateTime(v).ToString("yyyy-MM-dd");*/ } diff --git a/uploadFile.aspx.cs b/uploadFile.aspx.cs index 6dd0a1a..9c3129d 100644 --- a/uploadFile.aspx.cs +++ b/uploadFile.aspx.cs @@ -17,11 +17,8 @@ using System.Drawing.Imaging; using CorelDRAW; using System.Security.Principal; using System.Threading.Tasks; -using System.Threading; -using System.Runtime.InteropServices; using System.Data; using System.Text.RegularExpressions; -using NHibernate.Mapping; public partial class uploadFile : System.Web.UI.Page { @@ -247,6 +244,7 @@ public partial class uploadFile : System.Web.UI.Page { entity.MemoOpt = 0; } + if (entity.payment < 500) { if (entity.seller_memo.Contains("插卡") && entity.ProductCount != null && !entity.seller_memo.Contains("S_")) @@ -266,108 +264,116 @@ public partial class uploadFile : System.Web.UI.Page } } - if (entity.payment <= 300 && num >= 200 && num <= 3000 && entity.ShopId != 14 && entity.ShopId != 99) + if (!entity.seller_memo.Contains("出货")) { - //300克铜板纸/铜版纸300克-覆哑膜/覆膜/不覆膜-直角/裁切 - if (!entity.seller_memo.Contains("opp") && !entity.seller_memo.Contains("按文件") && !entity.seller_memo.Contains("流苏")) + if (entity.payment <= 300 && num >= 200 && num <= 3000 && entity.ShopId != 14 && entity.ShopId != 99) { - if ((entity.seller_memo.Contains("直角") || entity.seller_memo.Contains("裁切")) && (entity.seller_memo.Contains("300克铜板纸") || entity.seller_memo.Contains("300克铜板纸")) && (entity.seller_memo.Contains("覆哑膜") || entity.seller_memo.Contains("覆膜") || entity.seller_memo.Contains("不覆膜"))) + //300克铜板纸/铜版纸300克-覆哑膜/覆膜/不覆膜-直角/裁切 + if (!entity.seller_memo.Contains("opp") && !entity.seller_memo.Contains("按文件") && !entity.seller_memo.Contains("流苏") && !entity.seller_memo.Contains("排序")) + { + if ((entity.seller_memo.Contains("直角") || entity.seller_memo.Contains("裁切")) && (entity.seller_memo.Contains("300克铜板纸") || entity.seller_memo.Contains("300克铜板纸")) && (entity.seller_memo.Contains("覆哑膜") || entity.seller_memo.Contains("覆膜") || entity.seller_memo.Contains("不覆膜"))) + { + entity.IsVerifyToSupplier = true; + entity.SupplierId = 14; + entity.FinishPlaceTime = DateTime.Now; + } + } + + } + if (entity.payment <= 100 && num > 500 && num <= 1500) + { + //数量0-1500 + //0-80*54 + string pattern = @"\b(\d{1,5}[x\*]\d{1,5}(mm|cm))\b"; + string memo = entity.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 = 80; + double min_height = 54; + double width = 0; + double height = 0; + bool isIn = false; + try + { + if (matches[0].Success) + { + size = matches[0].Groups[0].Value; + size = size.Replace("mm", ""); + size = size.Replace("cm", ""); + 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)) + { + isIn = true; + } + if (width < 30 || height < 30) + { + isIn = false; + } + } + + } + catch (Exception ex) + { + + } + + //铜版纸不干胶-覆亮膜 + if (isIn && entity.seller_memo.Contains("铜版纸不干胶") && entity.seller_memo.Contains("覆亮膜") && !entity.seller_memo.Contains("烫金") && !entity.seller_memo.Contains("排序")) { entity.IsVerifyToSupplier = true; - entity.SupplierId = 14; + entity.SupplierId = 64; entity.FinishPlaceTime = DateTime.Now; } } - - } - if (entity.payment <= 100 && num > 200 && num <= 1500) - { - //数量0-1500 - //0-80*54 - string pattern = @"\b(\d{1,5}[x\*]\d{1,5}(mm|cm))\b"; - string memo = entity.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 = 80; - double min_height = 54; - double width = 0; - double height = 0; - bool isIn = false; - try + if (entity.payment <= 500 && num > 200 && num <= 5000) { - if (matches[0].Success) + //数量0-5000 + if (entity.seller_memo.Contains("透明不干胶")) { - size = matches[0].Groups[0].Value; - size = size.Replace("mm", ""); - size = size.Replace("cm", ""); - 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)) - { - isIn = true; - } - + entity.IsVerifyToSupplier = true; + entity.SupplierId = 64; + entity.FinishPlaceTime = DateTime.Now; } + } + if (entity.payment <= 100 && num > 200 && num <= 1000) + { + //数量0-1000 + if (entity.seller_memo.Contains("铜版纸不干胶") && entity.seller_memo.Contains("覆哑膜")) + { + entity.IsVerifyToSupplier = true; + entity.SupplierId = 64; + entity.FinishPlaceTime = DateTime.Now; + } + } + if (entity.payment <= 500 && num > 0 && num <= 50) + { + //数量0-50 + if (entity.seller_memo.Contains("领淘550灯布海报") || entity.seller_memo.Contains("领淘户外写真海报")) + { + entity.IsVerifyToSupplier = true; + entity.SupplierId = 59; + entity.FinishPlaceTime = DateTime.Now; + } + } + if (entity.payment <= 500 && num > 0 && num <= 50) + { + //数量0-50 + if ((entity.seller_memo.Contains("桌布") && (entity.seller_memo.Contains("白底") || entity.seller_memo.Contains("蓝底") || entity.seller_memo.Contains("红底"))) || (entity.seller_memo.Contains("双喷") && entity.seller_memo.Contains("班旗") && entity.seller_memo.Contains("旗帜布") && (entity.seller_memo.Contains("左缝筒") || entity.seller_memo.Contains("四角打孔") || entity.seller_memo.Contains("净裁")))) + { + entity.IsVerifyToSupplier = true; + entity.SupplierId = 90; + entity.FinishPlaceTime = DateTime.Now; + } + } + } - } - catch (Exception ex) - { - - } - //铜版纸不干胶-覆亮膜 - if (isIn && entity.seller_memo.Contains("铜版纸不干胶") && entity.seller_memo.Contains("覆亮膜") && !entity.seller_memo.Contains("烫金") && !entity.seller_memo.Contains("排序")) - { - entity.IsVerifyToSupplier = true; - entity.SupplierId = 64; - entity.FinishPlaceTime = DateTime.Now; - } - } - if (entity.payment <= 500 && num > 200 && num <= 5000) - { - //数量0-5000 - if (entity.seller_memo.Contains("透明不干胶")) - { - entity.IsVerifyToSupplier = true; - entity.SupplierId = 64; - entity.FinishPlaceTime = DateTime.Now; - } - } - if (entity.payment <= 100 && num > 200 && num <= 1000) - { - //数量0-1000 - if (entity.seller_memo.Contains("铜版纸不干胶") && entity.seller_memo.Contains("覆哑膜")) - { - entity.IsVerifyToSupplier = true; - entity.SupplierId = 64; - entity.FinishPlaceTime = DateTime.Now; - } - } - if (entity.payment <= 500 && num > 0 && num <= 50) - { - //数量0-50 - if (entity.seller_memo.Contains("领淘550灯布海报") || entity.seller_memo.Contains("领淘户外写真海报")) - { - entity.IsVerifyToSupplier = true; - entity.SupplierId = 59; - entity.FinishPlaceTime = DateTime.Now; - } - } - if (entity.payment <= 500 && num > 0 && num <= 50) - { - //数量0-50 - if ((entity.seller_memo.Contains("桌布") && (entity.seller_memo.Contains("白底") || entity.seller_memo.Contains("蓝底") || entity.seller_memo.Contains("红底"))) || (entity.seller_memo.Contains("双喷") && entity.seller_memo.Contains("班旗") && entity.seller_memo.Contains("旗帜布") && (entity.seller_memo.Contains("左缝筒") || entity.seller_memo.Contains("四角打孔") || entity.seller_memo.Contains("净裁")))) - { - entity.IsVerifyToSupplier = true; - entity.SupplierId = 90; - entity.FinishPlaceTime = DateTime.Now; - } - } if (entity.ProductId == 2690) { entity.IsVerifyToSupplier = true; @@ -380,7 +386,6 @@ public partial class uploadFile : System.Web.UI.Page entity.SupplierId = 98; entity.FinishPlaceTime = DateTime.Now; } - string dPath = entity.FinishDesignTime.GetValueOrDefault().ToString("yyyyMMdd"); //XLog.SaveLog(5, dPath); string sPath = Path.Combine(upPath, dPath);