调整备货逻辑不允许品质分过低的商品自动备货(完成但尚未测试) 注释无用的相关接口(原小奶狗,小奶兔)

This commit is contained in:
wule committed 2025-08-18 19:19:42 +08:00
1 parent fceead357f
commit 8445ec1828
19 files changed
+865 -540

No files matched your search

+33 -34
View File
@@ -40,42 +40,41 @@ namespace Work.ManageClass
}
public void getAddress1688()
{
string strContent = FileBase.ReadAllText("1688_address.tjm");
strContent = GetHtml.UrlDecode(strContent);
var m = BaseRegex.GetMatchRegex(ref strContent, @"{[^}]+?}");
for (int i = 0; m != null && i < m.Count; i++)
{
//string strContent = FileBase.ReadAllText("1688_address.tjm");
//strContent = GetHtml.UrlDecode(strContent);
//var m = BaseRegex.GetMatchRegex(ref strContent, @"{[^}]+?}");
//for (int i = 0; m != null && i < m.Count; i++)
//{
string addressContent = m[i].Groups[0].Value;
AddressBase a = new AddressBase();
string[] addressArray = addressContent.Split(',');
for (int j = 0; j < addressArray.Length; j++)
{
var itemMatch = BaseRegex.GetMatchRegex(ref addressArray[j], @"([\w\W]+?):([\w\W]+)");
string itemname = itemMatch[0].Groups[1].Value.Replace("{", "");
string itemvalue = itemMatch[0].Groups[2].Value.Replace("\"", "").Replace("}", "");
if (itemname == "a")
{
a.Id = int.Parse(itemvalue);
}
if (itemname == "n")
{
a.Name = itemvalue;
}
if (itemname == "p")
{
a.UpId = int.Parse(itemvalue);
}
}
AddressAllList.Add(a);
if (!Addressdic.ContainsKey(a.Id))
Addressdic.Add(a.Id, new List<AddressBase>());
if (!Addressdic.ContainsKey(a.UpId))
Addressdic.Add(a.UpId, new List<AddressBase>());
Addressdic[a.UpId].Add(a);
}
// string addressContent = m[i].Groups[0].Value;
// AddressBase a = new AddressBase();
// string[] addressArray = addressContent.Split(',');
// for (int j = 0; j < addressArray.Length; j++)
// {
// var itemMatch = BaseRegex.GetMatchRegex(ref addressArray[j], @"([\w\W]+?):([\w\W]+)");
// string itemname = itemMatch[0].Groups[1].Value.Replace("{", "");
// string itemvalue = itemMatch[0].Groups[2].Value.Replace("\"", "").Replace("}", "");
// if (itemname == "a")
// {
// a.Id = int.Parse(itemvalue);
// }
// if (itemname == "n")
// {
// a.Name = itemvalue;
// }
// if (itemname == "p")
// {
// a.UpId = int.Parse(itemvalue);
// }
// }
// AddressAllList.Add(a);
// if (!Addressdic.ContainsKey(a.Id))
// Addressdic.Add(a.Id, new List<AddressBase>());
// if (!Addressdic.ContainsKey(a.UpId))
// Addressdic.Add(a.UpId, new List<AddressBase>());
// Addressdic[a.UpId].Add(a);
//}
}
}
public class AddressBase