|
@@ -252,6 +252,8 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|
|
name = string.Join("-", list);
|
|
name = string.Join("-", list);
|
|
|
return name;
|
|
return name;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
private string formatMemo(object memo)
|
|
private string formatMemo(object memo)
|
|
|
{
|
|
{
|
|
|
string m = memo.ToString();
|
|
string m = memo.ToString();
|
|
@@ -559,6 +561,23 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|
|
//CeErpTradeCell.ExecuteNonQuery(sql.ToString());
|
|
//CeErpTradeCell.ExecuteNonQuery(sql.ToString());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ static Dictionary<string, string> replaceRules = new Dictionary<string, string>
|
|
|
|
|
+ {
|
|
|
|
|
+ { "皙贝", "白卡" },
|
|
|
|
|
+ { "睿狐", "莱尼" },
|
|
|
|
|
+ { "岚蝶", "安格" },
|
|
|
|
|
+ { "琮纹", "刚古" },
|
|
|
|
|
+ { "珠光", "珠光" },
|
|
|
|
|
+ { "溪雪", "珠光" },
|
|
|
|
|
+ { "雅柔", "雅柔" },
|
|
|
|
|
+ { "萱姿", "雅柔" },
|
|
|
|
|
+ { "草香", "草香" },
|
|
|
|
|
+ { "芳怡", "草香" },
|
|
|
|
|
+ { "金绒", "牛皮" },
|
|
|
|
|
+ { "素芸", "棉卡" },
|
|
|
|
|
+ { "玉蕊", "蛋壳" }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// 压缩大文件夹(分块处理)
|
|
/// 压缩大文件夹(分块处理)
|
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -590,6 +609,8 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|
|
// 使用 EnumerateFiles 减少内存使用
|
|
// 使用 EnumerateFiles 减少内存使用
|
|
|
var files = Directory.EnumerateFiles(sourceFolder, "*.*", SearchOption.AllDirectories);
|
|
var files = Directory.EnumerateFiles(sourceFolder, "*.*", SearchOption.AllDirectories);
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
using (var fileStream = new FileStream(zipFilePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192))
|
|
using (var fileStream = new FileStream(zipFilePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192))
|
|
|
using (var zipArchive = new ZipArchive(fileStream, ZipArchiveMode.Create, true))
|
|
using (var zipArchive = new ZipArchive(fileStream, ZipArchiveMode.Create, true))
|
|
|
{
|
|
{
|
|
@@ -602,6 +623,10 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|
|
{
|
|
{
|
|
|
fileName = dealMemoName(fileName);
|
|
fileName = dealMemoName(fileName);
|
|
|
}
|
|
}
|
|
|
|
|
+ foreach (var rule in replaceRules)
|
|
|
|
|
+ {
|
|
|
|
|
+ fileName = fileName.Replace(rule.Key, rule.Value);
|
|
|
|
|
+ }
|
|
|
// 获取相对路径
|
|
// 获取相对路径
|
|
|
string relativePath = GetRelativePath(sourceFolder, file);
|
|
string relativePath = GetRelativePath(sourceFolder, file);
|
|
|
|
|
|