订单金额统计利润计算功能

This commit is contained in:
wule committed 2025-09-02 19:03:37 +08:00
1 parent eca6a8a9e7
commit cc539ce604
27 files changed
+2090 -214

No files matched your search

@@ -9,6 +9,7 @@ using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -1298,18 +1299,27 @@ namespace TemuKJD.KJDForms.AdminForms
string RestoreProductName(string pName)
{
string checkChineseName = pName.Replace("适合不同的搭配风格", "").Replace("个", "").Replace("适合不同的搭配场景", "");
bool containsChinese = Regex.IsMatch(checkChineseName, @"[\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF]");
string newPName = pName;
if (pName.EndsWith("适合不同的搭配风格") && pName.IndexOf("个") < 4 && pName.IndexOf("个") > 0)
{
var headword = pName.Substring(0, pName.IndexOf("个") + 1);
newPName = pName.Substring(pName.IndexOf("个") + "个".Length);
newPName = newPName.Replace("适合不同的搭配风格", "适合" + headword + "不同的搭配风格");
if (containsChinese)
newPName = newPName.Replace("适合不同的搭配风格", "适合" + headword + "不同的搭配风格");
else
newPName = newPName.Replace("适合不同的搭配风格", "Suitable for " + headword + " different matching styles").Trim();
}
if (pName.EndsWith("适合不同的搭配风格") && pName.IndexOf("pcs") < 4 && pName.IndexOf("pcs") > 0)
{
var headword = pName.Substring(0, pName.IndexOf("pcs"));
newPName = pName.Substring(pName.IndexOf("pcs") + "pcs".Length);
newPName = newPName.Replace("适合不同的搭配风格", "适合" + headword + "个不同的搭配风格").Trim();
if (containsChinese)
newPName = newPName.Replace("适合不同的搭配风格", "适合" + headword + "不同的搭配风格");
else
newPName = newPName.Replace("适合不同的搭配风格", "Suitable for " + headword + " different matching styles").Trim();
}
return newPName;
}