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

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> /// <summary>
/// 版本ID /// 版本ID
/// </summary> /// </summary>
public static int VersionCount = 503; public static int VersionCount = 505;
//public static int VersionCount = 503; //public static int VersionCount = 505;
/// <summary> /// <summary>
/// 版本号 /// 版本号
@@ -47,6 +47,8 @@ namespace AllBase.Model.Param.TemuProductManage
/// ///
/// </summary> /// </summary>
public string numberInputValue { get; set; } public string numberInputValue { get; set; }
public int? controlType { get; set; }
} }
public class MainProductSkuSpecReqsItem 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.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2);
this.cmbStatus.Name = "cmbStatus"; this.cmbStatus.Name = "cmbStatus";
this.cmbStatus.Size = new System.Drawing.Size(49, 25); this.cmbStatus.Size = new System.Drawing.Size(49, 25);
@@ -606,9 +606,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
} }
Thread.Sleep(200); Thread.Sleep(200);
var error = BaseRegex.GetStringJson(ref result, "errMsg");
if (result.Contains("\"status\":\"未上传\"")) if (result.Contains("\"status\":\"未上传\""))
{ {
var error = BaseRegex.GetStringJson(ref result, "errMsg");
if (string.IsNullOrWhiteSpace(error)) if (string.IsNullOrWhiteSpace(error))
error = result; error = result;
Invoke(new Action(() => Invoke(new Action(() =>
@@ -638,7 +638,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms
Invoke(new Action(() => Invoke(new Action(() =>
{ {
string opRst = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱"; 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; row.Cells["colStatus"].Value = prod.status;
})); }));
} }
@@ -646,10 +646,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms
{ {
Invoke(new Action(() => Invoke(new Action(() =>
{ {
string opRst = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱";
row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id
row.Cells["colOpResult"].Value = opRst + BaseRegex.GetStringJson(ref result, "msg") + "; "; row.Cells["colOpResult"].Value = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱" + (" " + error).Trim(' ');
row.Cells["colStatus"].Value = "已上传"; row.Cells["colStatus"].Value = prod.status;
})); }));
} }
} }
@@ -870,6 +869,21 @@ namespace TemuKJD.KJDForms.ProductSelectForms
vid = propInfo.vid, 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 prodParam.productSaleExtAttrReq = new ProductSaleExtAttrReq
{ {
bodyShape = prodInfo.productSaleExtAttr.bodyShape, bodyShape = prodInfo.productSaleExtAttr.bodyShape,
@@ -617,9 +617,9 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
} }
Thread.Sleep(200); Thread.Sleep(200);
var error = BaseRegex.GetStringJson(ref result, "errMsg");
if (result.Contains("\"status\":\"未上传\"")) if (result.Contains("\"status\":\"未上传\""))
{ {
var error = BaseRegex.GetStringJson(ref result, "errMsg");
if (string.IsNullOrWhiteSpace(error)) if (string.IsNullOrWhiteSpace(error))
error = result; error = result;
Invoke(new Action(() => Invoke(new Action(() =>
@@ -649,7 +649,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
Invoke(new Action(() => Invoke(new Action(() =>
{ {
string opRst = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱"; 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; row.Cells["colStatus"].Value = prod.status;
})); }));
} }
@@ -658,7 +658,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
Invoke(new Action(() => Invoke(new Action(() =>
{ {
row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id 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; row.Cells["colStatus"].Value = prod.status;
})); }));
} }