1部分废弃功能注释 2数据库商品车队费、贴单费等设置 3账户授权金额设置 4jit核价商品还原逻辑调整
This commit is contained in:
1 parent
480d8c2cd4
commit
165df61234
52 files changed
+2019
-1023
No files matched your search
@@ -903,6 +903,11 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
tryAgain:
|
||||
Thread.Sleep(100 + Randomx.GetId(200));
|
||||
string jsonStr = getAdsGoodsList(shop, page, pageSize);
|
||||
for (int rt = 0; rt < 3 && !jsonStr.Contains("\"success\":true"); rt++)
|
||||
{
|
||||
Thread.Sleep(100 + Randomx.GetId(200));
|
||||
jsonStr = getAdsGoodsList(shop, page, pageSize);
|
||||
}
|
||||
Thread.Sleep(Randomx.GetId(300, 800));
|
||||
if (jsonStr.Contains("当前操作人数太多,请稍后重试") && tryCount < 5)
|
||||
{
|
||||
|
||||
@@ -594,6 +594,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
jArr = new JArray();
|
||||
|
||||
List<string> extCodeLst = new List<string>();
|
||||
List<string> spuIdLst = new List<string>();
|
||||
List<TemuForChainProductInfo> chainProductTmpLst = new List<TemuForChainProductInfo>();
|
||||
foreach (var item in jArr)
|
||||
{
|
||||
@@ -602,25 +603,16 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
lstChainProdInfo.Add(chainProdInfo);
|
||||
chainProductTmpLst.Add(chainProdInfo);
|
||||
extCodeLst.Add(chainProdInfo.skcList.FirstOrDefault()?.extCode);
|
||||
spuIdLst.Add(chainProdInfo.productId.ParseToString());
|
||||
}
|
||||
|
||||
// 查询货号原售价
|
||||
List<TemuDBExtCodePriceInfo> extCodePriceList = new List<TemuDBExtCodePriceInfo>();
|
||||
try
|
||||
{
|
||||
extCodePriceList = AdminProductPriceCheckForm.GetServerExtCodePriceLst(extCodeLst.Distinct().ToList());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BaseMsgForm.ShowError("获取货号价格失败 " + ex.Message);
|
||||
}
|
||||
List<TemuDBExtCodePriceInfo> extCodePriceList = AdminProductPriceCheckForm.GetServerExtCodePriceLst(extCodeLst.Distinct().ToList());
|
||||
// 获取产品数据库中的成本价格
|
||||
List<DBProdDraftIdMapUpSpuIdInfo> upProdList = AdminProductPriceCheckForm.GetUpSpuIdLst(spuIdLst);
|
||||
|
||||
// 查询合规信息,实拍图等
|
||||
var spuIds = "";
|
||||
foreach (var chainProdInfo in chainProductTmpLst)
|
||||
{
|
||||
spuIds += chainProdInfo.productId + ",";
|
||||
}
|
||||
var spuIds = string.Join(",", spuIdLst);
|
||||
spuIds = "\"" + spuIds.Trim(',').Replace(",", "\",\"") + "\"";
|
||||
List<complianceInfo> complianceInfoTmpLst = null;
|
||||
string sComplianceErrMsg = "";
|
||||
@@ -762,6 +754,10 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
// 产品货号与货号价格
|
||||
var reviewExtCode = chainProdInfo.skcList.FirstOrDefault()?.extCode;
|
||||
var extCodePrice = extCodePriceList.FirstOrDefault(p => reviewExtCode == p.ext_code);
|
||||
var upSpuIdPrice = upProdList.FirstOrDefault(p => chainProdInfo.productId == p.draft_id);
|
||||
var original_price = extCodePrice?.original_price / 100m;
|
||||
if (upSpuIdPrice?.cost_price > 0)
|
||||
original_price = upSpuIdPrice?.cost_price;
|
||||
|
||||
// 合规信息
|
||||
var complianceStr = sComplianceErrMsg;
|
||||
@@ -810,7 +806,7 @@ namespace TemuKJD.KJDForms.ProductForms
|
||||
chainProdInfo.productName,
|
||||
skuNames,
|
||||
reviewExtCode,
|
||||
extCodePrice == null ? "-" : (extCodePrice.original_price / 100.0).ParseToString(), //货号价格
|
||||
original_price, //extCodePrice == null ? "-" : (extCodePrice.original_price / 100.0).ParseToString(), //货号价格
|
||||
chainProdInfo.supplierPrice, // 申报价格范围 //reviewInfo.productSkuList.FirstOrDefault()?.supplierPrice, // 同价格单号申报价格
|
||||
BaseClass.StampToDateTime((chainProdInfo.skcList.FirstOrDefault()?.statusTime.createdTime.ParseToLong() / 1000).ParseToInt()).ToString("yy/MM/dd HH:mm:ss"), // 创建时间
|
||||
"调价",
|
||||
@@ -2072,40 +2068,60 @@ Content-Disposition: form-data; name=""upload_sign""
|
||||
var filterExtCodeLst = dgvExtCode.Rows.Cast<DataGridViewRow>()
|
||||
.Where(r => r.Cells["colSelectExtCode"].Value.ParseToBool() == true)
|
||||
.Select(r => r.Cells["colFilterExtCode"].Value.ParseToString()).Distinct().ToList();
|
||||
foreach (DataGridViewRow row in dgvOpenJit.Rows)
|
||||
this.pbLoading.Visible = true;
|
||||
Task.Run(() =>
|
||||
{
|
||||
row.Visible = true;
|
||||
row.Cells["colCheck"].Value = false;
|
||||
if (filterExtCodeLst != null && filterExtCodeLst.Count > 0)
|
||||
foreach (DataGridViewRow row in dgvOpenJit.Rows)
|
||||
//for (int i = dgvOpenJit.Rows.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (filterExtCodeLst.Contains(row.Cells["colExtCode"].Value.ParseToString()))
|
||||
{
|
||||
row.Cells["colCheck"].Value = true;
|
||||
row.Visible = true;
|
||||
}
|
||||
else
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
//var row = dgvOpenJit.Rows[i];
|
||||
//row.Visible = true;
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
}
|
||||
bool isVisible = true;
|
||||
|
||||
if (filterExtCodeLst != null && filterExtCodeLst.Count > 0)
|
||||
{
|
||||
if (filterExtCodeLst.Contains(row.Cells["colExtCode"].Value.ParseToString()))
|
||||
{
|
||||
//row.Cells["colCheck"].Value = true;
|
||||
//row.Visible = true;
|
||||
isVisible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//row.Cells["colCheck"].Value = false;
|
||||
//row.Visible = false;
|
||||
isVisible = false;
|
||||
}
|
||||
}
|
||||
if (chkFilterJit.Checked)
|
||||
{
|
||||
if (row.Cells["colJit"].Value.ParseToString().Contains("已开通"))
|
||||
{
|
||||
//row.Cells["colCheck"].Value = false;
|
||||
//row.Visible = false;
|
||||
isVisible = false;
|
||||
}
|
||||
}
|
||||
if (chkFilterNotJit.Checked)
|
||||
{
|
||||
if (!row.Cells["colJit"].Value.ParseToString().Contains("已开通"))
|
||||
{
|
||||
//row.Cells["colCheck"].Value = false;
|
||||
//row.Visible = false;
|
||||
isVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (row.Visible != isVisible)
|
||||
row.Visible = isVisible;
|
||||
row.Cells["colCheck"].Value = isVisible;
|
||||
}));
|
||||
}
|
||||
if (chkFilterJit.Checked)
|
||||
{
|
||||
if (row.Cells["colJit"].Value.ParseToString().Contains("已开通"))
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
}
|
||||
}
|
||||
if (chkFilterNotJit.Checked)
|
||||
{
|
||||
if (!row.Cells["colJit"].Value.ParseToString().Contains("已开通"))
|
||||
{
|
||||
row.Cells["colCheck"].Value = false;
|
||||
row.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Invoke(new Action(() => { pbLoading.Visible = false; }));
|
||||
});
|
||||
}
|
||||
|
||||
private void btnSetReceiveArea_Click(object sender, EventArgs e)
|
||||
|
||||
Reference in new issue
Block a user