根据服务接口调整修改上货逻辑

This commit is contained in:
wule_5900x committed 2025-08-07 23:29:03 +08:00
1 parent f92e8ed79b
commit d7550ae559
5 files changed
+27 -11

No files matched your search

+2 -2
View File
@@ -27,8 +27,8 @@ namespace AllBase
/// <summary>
/// 版本ID
/// </summary>
public static int VersionCount = 503;
//public static int VersionCount = 503;
public static int VersionCount = 505;
//public static int VersionCount = 505;
/// <summary>
/// 版本号
@@ -47,6 +47,8 @@ namespace AllBase.Model.Param.TemuProductManage
///
/// </summary>
public string numberInputValue { get; set; }
public int? controlType { get; set; }
}
public class MainProductSkuSpecReqsItem
@@ -280,7 +280,7 @@
"待上传",
"已上传",
"全部"});
this.cmbStatus.Location = new System.Drawing.Point(702, 2);
this.cmbStatus.Location = new System.Drawing.Point(702, 4);
this.cmbStatus.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.cmbStatus.Name = "cmbStatus";
this.cmbStatus.Size = new System.Drawing.Size(49, 25);
@@ -606,9 +606,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
}
Thread.Sleep(200);
var error = BaseRegex.GetStringJson(ref result, "errMsg");
if (result.Contains("\"status\":\"未上传\""))
{
var error = BaseRegex.GetStringJson(ref result, "errMsg");
if (string.IsNullOrWhiteSpace(error))
error = result;
Invoke(new Action(() =>
@@ -638,7 +638,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
Invoke(new Action(() =>
{
string opRst = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱";
row.Cells["colOpResult"].Value = opRst + "但保存到服务端失败:" + BaseRegex.GetStringJson(ref html, "msg") + "; ";
row.Cells["colOpResult"].Value = opRst + "但保存到服务端失败:" + BaseRegex.GetStringJson(ref html, "msg") + (" " + error).Trim(' ');
row.Cells["colStatus"].Value = prod.status;
}));
}
@@ -646,10 +646,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{
Invoke(new Action(() =>
{
string opRst = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱";
row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id
row.Cells["colOpResult"].Value = opRst + BaseRegex.GetStringJson(ref result, "msg") + "; ";
row.Cells["colStatus"].Value = "已上传";
row.Cells["colOpResult"].Value = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱" + (" " + error).Trim(' ');
row.Cells["colStatus"].Value = prod.status;
}));
}
}
@@ -870,6 +869,21 @@ namespace TemuKJD.KJDForms.ProductSelectForms
vid = propInfo.vid,
});
}
if (prodParam.productPropertyReqs.Any(p => p.propValue == "织物") && !prodParam.productPropertyReqs.Any(p => p.propName == "织物材质成分"))
{
prodParam.productPropertyReqs.Add(new ProductPropertyReqsItem
{
valueUnit = "",
propValue = "人造纤维",
propName = "织物材质成分",
refPid = 7550,
vid = 329529,
controlType = 1,
pid = 2335,
templatePid = 1580208,
valueExtendInfo = ""
});
}
prodParam.productSaleExtAttrReq = new ProductSaleExtAttrReq
{
bodyShape = prodInfo.productSaleExtAttr.bodyShape,
@@ -617,9 +617,9 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
}
Thread.Sleep(200);
var error = BaseRegex.GetStringJson(ref result, "errMsg");
if (result.Contains("\"status\":\"未上传\""))
{
var error = BaseRegex.GetStringJson(ref result, "errMsg");
if (string.IsNullOrWhiteSpace(error))
error = result;
Invoke(new Action(() =>
@@ -649,7 +649,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
Invoke(new Action(() =>
{
string opRst = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱";
row.Cells["colOpResult"].Value = opRst + "但保存到服务端失败:" + BaseRegex.GetStringJson(ref html, "msg") + "; ";
row.Cells["colOpResult"].Value = opRst + "但保存到服务端失败:" + BaseRegex.GetStringJson(ref html, "msg") + (" " + error).Trim(' ');
row.Cells["colStatus"].Value = prod.status;
}));
}
@@ -658,7 +658,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
Invoke(new Action(() =>
{
row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id
row.Cells["colOpResult"].Value = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱";
row.Cells["colOpResult"].Value = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱" + (" " + error).Trim(' ');
row.Cells["colStatus"].Value = prod.status;
}));
}