店铺统计功能 30%
This commit is contained in:
1 parent
7d5daf27ad
commit
4693c42024
10 files changed
+1269
-182
No files matched your search
@@ -527,39 +527,12 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 小于60分商品
|
||||
/// qualityScoreEnum = 1 小于60分商品
|
||||
/// qualityScoreEnum = 2 60分到70分商品
|
||||
/// qualityScoreEnum = 3 70分到90分商品
|
||||
/// qualityScoreEnum = 4 90分以上
|
||||
/// </summary>
|
||||
private string GetQualityInfo1_2(ShopLoginInfo shop, string productIds)
|
||||
{
|
||||
string url = "https://agentseller.temu.com/bg-luna-agent-seller/goods/quality/supplyChain/qualityMetrics/pageQuery";
|
||||
string body = @"{""page"":1,""pageSize"":40,""qualityScoreEnum"":1,""productIds"":[" + productIds + "]}";
|
||||
string refere = "https://agentseller.temu.com/main/quality/dashboard";
|
||||
return KJDHttpResponse.PostResponse2(shop, url, body, refere);
|
||||
}
|
||||
/// <summary>
|
||||
/// 60分到70分商品
|
||||
/// </summary>
|
||||
private string GetQualityInfo2_2(ShopLoginInfo shop, string productIds)
|
||||
{
|
||||
string url = "https://agentseller.temu.com/bg-luna-agent-seller/goods/quality/supplyChain/qualityMetrics/pageQuery";
|
||||
string body = @"{""page"":1,""pageSize"":40,""qualityScoreEnum"":2,""productIds"":[" + productIds + "]}";
|
||||
string refere = "https://agentseller.temu.com/main/quality/dashboard";
|
||||
return KJDHttpResponse.PostResponse2(shop, url, body, refere);
|
||||
}
|
||||
/// <summary>
|
||||
/// 70分到90分商品
|
||||
/// </summary>
|
||||
private string GetQualityInfo3_2(ShopLoginInfo shop, string productIds)
|
||||
{
|
||||
string url = "https://agentseller.temu.com/bg-luna-agent-seller/goods/quality/supplyChain/qualityMetrics/pageQuery";
|
||||
string body = @"{""page"":1,""pageSize"":40,""qualityScoreEnum"":3,""productIds"":[" + productIds + "]}";
|
||||
string refere = "https://agentseller.temu.com/main/quality/dashboard";
|
||||
return KJDHttpResponse.PostResponse2(shop, url, body, refere);
|
||||
}
|
||||
/// <summary>
|
||||
/// 90分以上
|
||||
/// </summary>
|
||||
private string GetQualityInfo4_2(ShopLoginInfo shop, string productIds, int qualityScoreEnum = 4)
|
||||
private string GetQualityInfo2(ShopLoginInfo shop, string productIds, int qualityScoreEnum = 4)
|
||||
{
|
||||
string url = "https://agentseller.temu.com/bg-luna-agent-seller/goods/quality/supplyChain/qualityMetrics/pageQuery";
|
||||
string body = @"{""page"":1,""pageSize"":40,""qualityScoreEnum"":" + qualityScoreEnum + @",""productIds"":[" + productIds + "]}";
|
||||
@@ -922,7 +895,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
{
|
||||
for (int j = 1; j <= 4; j++)
|
||||
{
|
||||
var qualityRst1 = this.GetQualityInfo4_2(shop, productIds, j);
|
||||
var qualityRst1 = this.GetQualityInfo2(shop, productIds, j);
|
||||
if (qualityRst1.Contains("\"success\":true"))
|
||||
{
|
||||
var jObj = JObject.Parse(qualityRst1);
|
||||
@@ -982,8 +955,8 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
sInfo.needStockUp == false ? "无需备货" : "可备货",
|
||||
sInfo.goodsAfsScore == -1 ? "获取商品品质信息失败" : ""
|
||||
);
|
||||
if (sInfo.goodsAfsScore == -1)
|
||||
sInfo.goodsAfsScore = null;
|
||||
//if (sInfo.goodsAfsScore == -1)
|
||||
// sInfo.goodsAfsScore = null;
|
||||
if (rowId >= 0)
|
||||
dgvStock.Rows[rowId].Height = 60;
|
||||
}));
|
||||
@@ -1053,6 +1026,9 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
ucGroupBoxEx4.Enabled = false;
|
||||
|
||||
cancellationTokenSource = new CancellationTokenSource();
|
||||
var minQualityScore = this.txtMinQualityScore.Text.ParseToInt();
|
||||
if (!chkMinQualityScore.Checked) // 没选最低品质分,即不考虑品质分上货。
|
||||
minQualityScore = -100;
|
||||
Task.Run(() =>
|
||||
{
|
||||
int i = 0;
|
||||
@@ -1083,7 +1059,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
}));
|
||||
continue;
|
||||
}
|
||||
if (stockUp.goodsAfsScore != null && stockUp.goodsAfsScore < 75)
|
||||
if (stockUp.goodsAfsScore != null && stockUp.goodsAfsScore < minQualityScore)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user