Цей коміт міститься в:
2026-04-03 15:36:04 +08:00
джерело 5d1f6128a5
коміт d1fb3b15bd
3 змінених файлів з 183 додано та 3 видалено
+1 -1
Переглянути файл
@@ -169,6 +169,7 @@ public partial class supplierBuildFile : System.Web.UI.Page
try try
{ {
copyFile(getDesignDate(row["FinishDesignTime"]), suppierName, fname, zipFileName.Replace(".zip", "")); copyFile(getDesignDate(row["FinishDesignTime"]), suppierName, fname, zipFileName.Replace(".zip", ""));
writeLog("打包复制文件!" + zipFileName.Replace(".zip", "") + ":" + fname);
files.Add(fname); files.Add(fname);
supplierId = 0; supplierId = 0;
tids.Add("'" + ctid + "'"); tids.Add("'" + ctid + "'");
@@ -185,7 +186,6 @@ public partial class supplierBuildFile : System.Web.UI.Page
if (files.Count == 0) if (files.Count == 0)
{ {
updateSql += string.Format("update CE_ErpPackData set upStatus = 3,message='没有可打包文件!' where ID= {0} ;", packId); updateSql += string.Format("update CE_ErpPackData set upStatus = 3,message='没有可打包文件!' where ID= {0} ;", packId);
continue;
} }
else else
{ {
+1 -1
Переглянути файл
@@ -278,7 +278,7 @@ public partial class supplierDownload : System.Web.UI.Page
catch (Exception ex) catch (Exception ex)
{ {
conErc("错误的下载访问" + ex.Message); conErc("错误的下载访问" + ex.Message);
XLog.SaveLog(0, "download" + ex.Message); XLog.SaveLog(0, "supplierDownload download" + ex.Message);
return; return;
} }
+181 -1
Переглянути файл
@@ -22,6 +22,10 @@ using System.Text.RegularExpressions;
using MSharp.Framework; using MSharp.Framework;
using System.Net.Http.Headers; using System.Net.Http.Headers;
using System.Net.Http; using System.Net.Http;
using SQLData;
using NHibernate.Mapping;
using System.Collections.Generic;
using System.Linq;
public partial class uploadFile : System.Web.UI.Page public partial class uploadFile : System.Web.UI.Page
{ {
@@ -259,7 +263,7 @@ public partial class uploadFile : System.Web.UI.Page
entity.FinishPlaceTime = DateTime.Now; entity.FinishPlaceTime = DateTime.Now;
} }
} }
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("帆布袋"))) 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.seller_memo.Contains("电子稿"))
{ {
entity.IsVerifyToSupplier = true; entity.IsVerifyToSupplier = true;
entity.SupplierId = 98; entity.SupplierId = 98;
@@ -528,6 +532,182 @@ public partial class uploadFile : System.Web.UI.Page
} }
conErc("空文件!"); conErc("空文件!");
} }
private int getsupplierId(CeErpTradeCell entity)
{
int supplierId = 0;
StringBuilder sql = new StringBuilder();
sql.AppendFormat("select * from CE_ErpUpFileSupplier ");
DataTable cellEx = DbHelper.DbConn.ExecuteDataset(sql.ToString()).Tables[0];
int num = getProductCount(entity.seller_memo);
foreach (DataRow row in cellEx.Rows)
{
bool isIn = true;
//判断材质工艺都要符合
if (Convert.IsDBNull(row["seller_memo"]))
{
string memo = row["seller_memo"].ToString();
string[] memolist = memo.Split('+');
for (int i = 0; i < memolist.Length; i++)
{
if (!Regex.IsMatch(entity.seller_memo, memolist[i].Replace("/", "|")))
{
isIn = false;
}
}
}
if (!isIn)
{
continue;
}
//判断金额符不符合
if (!Convert.IsDBNull(row["payment"]))
{
string payment = row["payment"].ToString();
string[] paymentList = payment.Split('-');
if (!string.IsNullOrEmpty(paymentList[0]))
{
if (entity.payment < Convert.ToDouble(paymentList[0]))
{
continue;
}
}
if (!string.IsNullOrEmpty(paymentList[1]))
{
if (entity.payment > Convert.ToDouble(paymentList[1]))
{
continue;
}
}
}
if (!Convert.IsDBNull(row["size"]))
{
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);//设定要查找的字符串
double width = 0;
double height = 0;
try
{
if (matches[0].Success)
{
string sizematches = matches[0].Groups[0].Value;
sizematches = sizematches.Replace("mm", "");
sizematches = sizematches.Replace("cm", "");
string[] size_list = sizematches.Split('x');
if (size_list.Length > 1)
{
width = Convert.ToDouble(size_list[0]);
height = Convert.ToDouble(size_list[1]);
}
}
}
catch (Exception ex)
{
}
string size = row["size"].ToString();
string[] sizeList = size.Split('-');
if (!string.IsNullOrEmpty(sizeList[0]))
{
string[] sizeItemList = sizeList[0].Split('x');
//第一个尺寸格式不正确
if (sizeItemList.Length < 2)
{
continue;
}
double sizeWidth = Convert.ToDouble(sizeItemList[0]);
double sizeheight = Convert.ToDouble(sizeItemList[1]);
//备注尺寸要大于第一个尺寸
if (!((width > sizeWidth && height > sizeheight) || (width > sizeheight && height > sizeWidth)))
{
continue;
}
}
if (!string.IsNullOrEmpty(sizeList[1]))
{
string[] sizeItemList = sizeList[1].Split('x');
//第二个尺寸格式不正确
if (sizeItemList.Length < 2)
{
continue;
}
double sizeWidth = Convert.ToDouble(sizeItemList[0]);
double sizeheight = Convert.ToDouble(sizeItemList[1]);
//备注尺寸要大于第二个尺寸
if (!((width < sizeWidth && height < sizeheight) || (width < sizeheight && height < sizeWidth)))
{
continue;
}
}
}
//判断数量是否符合
if (!Convert.IsDBNull(row["number"]))
{
string numberText = row["number"].ToString();
string[] numberTextList = numberText.Split('-');
int number = 0;
if (!string.IsNullOrEmpty(numberTextList[0]))
{
number = Convert.ToInt32(numberTextList[0]);
if (number > num)
{
continue;
}
}
if (!string.IsNullOrEmpty(numberTextList[1]))
{
number = Convert.ToInt32(numberTextList[1]);
if (number < num)
{
continue;
}
}
}
//判断店铺符不符合
if (!Convert.IsDBNull(row["shopIds"]))
{
List<string> shopids = row["shopIds"].ToString().Split(',').ToList();
if (!shopids.Contains(entity.ShopId.ToString()))
{
continue;
}
}
//地区不符合
if (!Convert.IsDBNull(row["address"]))
{
if (!Regex.IsMatch(entity.seller_memo, row["address"].ToString().Replace("、", "|")))
{
continue;
}
}
//限制条件
if (!Convert.IsDBNull(row["filterText"]))
{
if (!Regex.IsMatch(entity.seller_memo, row["filterText"].ToString().Replace("/", "|")))
{
continue;
}
}
}
return supplierId;
}
class CdrConvert class CdrConvert
{ {
private object lockObject = new object(); private object lockObject = new object();