优化中转仓处理逻辑
This commit is contained in:
1 parent
82165f25a8
commit
15b8288a98
9 files changed
+90
-115
No files matched your search
@@ -1303,9 +1303,14 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
|
||||
if (afterSale.orderDate < DateTime.Now.AddMonths(-2).ToString("yyMMdd").ParseToInt())
|
||||
{
|
||||
ShowBuyerOrderReadInfo(buyer, " 近2个月售后列表获取完成,退出自动滑动 ");
|
||||
currentReadBuyer = "";
|
||||
//return;
|
||||
var count = lstPddBuyerAfterSaleInfoLite.ToList().Where(af => af.orderDate < DateTime.Now.AddMonths(-2).ToString("yyMMdd").ParseToInt()).Count();
|
||||
if (count > 3)
|
||||
{
|
||||
|
||||
ShowBuyerOrderReadInfo(buyer, " 近2个月售后列表获取完成,退出自动滑动 ");
|
||||
currentReadBuyer = "";
|
||||
//return;
|
||||
}
|
||||
}
|
||||
|
||||
if (afterSale?.ShopIdStr == "3738859887048176128")
|
||||
@@ -2460,7 +2465,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
{
|
||||
var transit = orderItem.ItemTransitOrders.FirstOrDefault(t => t.out_order_no == order.order_sn);
|
||||
if (transit != null)
|
||||
transit.pre_allocated_order_no = 1;
|
||||
transit.pre_allocated_order_no = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2846,7 +2851,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
// 发送过的,不再发送
|
||||
if (order.OutAfterSaleStatusStr == statusText)
|
||||
{
|
||||
return "<code>0</code><msg>SUCCESS</msg>";
|
||||
return "<code>0</code><msg>SUCCESS</msg><json_msg>{\"code\":0,\"msg\":\"SUCCESS\"}</json_msg>";
|
||||
}
|
||||
|
||||
JObject obj = new JObject();
|
||||
|
||||
@@ -1022,7 +1022,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
/// <summary>
|
||||
/// 更新拍单成功信息
|
||||
/// </summary>
|
||||
public void ManualUpdateBuyOrder()
|
||||
public async void ManualUpdateBuyOrder()
|
||||
{
|
||||
if (BuyType == "transit" && txtSourceCodeVal.Trim().Length != 6)
|
||||
{
|
||||
@@ -1119,24 +1119,18 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
var dataStr = JsonHelper.SerializeObject(body);
|
||||
//dataStr = "{\"orderNo\":\"3737339733954942720\",\"outOrderNo\":\"2606846854564\",\"buyerAccount\":\"测试\",\"outAmount\":\"2000\",\"purchaserNote\":\"测试\",\"express1Company\":\"\"" +
|
||||
// ",\"express1Waybill\":\"\",\"platform\":\"XDYSHC\",\"orderPlatformCode\":\"WEISHOP\"}";
|
||||
var exportRst = HttpResponseWXBLL.e57PostResponse(url, dataStr, "");
|
||||
var exportRst = await HttpResponseWXBLL.e57PostResponseAsync(url, dataStr);
|
||||
//<AjaxResult><msg>保存成功</msg><code>200</code></AjaxResult>
|
||||
//<AjaxResult><msg>订单不存在:373733973395494272</msg><code>500</code></AjaxResult>
|
||||
if (!exportRst.ParseToString().Contains("<code>200</code>"))
|
||||
if (!exportRst.ParseToString().Contains("\"code\":200"))
|
||||
{
|
||||
await Task.Delay(500);
|
||||
exportRst = await HttpResponseWXBLL.e57PostResponseAsync(url, dataStr);
|
||||
}
|
||||
if (!exportRst.ParseToString().Contains("\"code\":200"))
|
||||
{
|
||||
string msg = "";
|
||||
string code = "";
|
||||
try
|
||||
{
|
||||
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
|
||||
xmlDoc.LoadXml(exportRst);
|
||||
code = xmlDoc["AjaxResult"]["code"].InnerText;
|
||||
msg = xmlDoc["AjaxResult"]["msg"].InnerText;
|
||||
}
|
||||
catch
|
||||
{
|
||||
msg = exportRst.ParseToString();
|
||||
}
|
||||
msg = BaseRegex.GetStringJsonByRegs(ref exportRst, exportRst, "msg");
|
||||
this.ErrorMsg = "拍单保存失败,服务端返回 " + msg;
|
||||
Enabled = true;
|
||||
return;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using _29WxOrderWpf.BaseWindows;
|
||||
using _29WxOrderWpf.CefHelper;
|
||||
using WxOrder.Framework.Commons;
|
||||
using _29WxOrderWpf.ViewModels;
|
||||
using AllBase;
|
||||
using AllBase.Helper;
|
||||
@@ -27,12 +26,14 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media.Imaging;
|
||||
using TemuKJD.ToolForms;
|
||||
using Work;
|
||||
using Work._29Tools.BLL;
|
||||
using Work._29Tools.CefTools;
|
||||
using Work.BaseForms;
|
||||
using WxOrder.Framework.Commons;
|
||||
using WxOrder.Framework.Helpers;
|
||||
using static AllBase.DouYinModel.Result.DouOrderListInfo;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.ListView;
|
||||
@@ -1736,7 +1737,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
/// <summary>
|
||||
/// 更新拍单成功信息
|
||||
/// </summary>
|
||||
public void ManualUpdateBuyOrder()
|
||||
public async void ManualUpdateBuyOrder()
|
||||
{
|
||||
if (BuyType == "transit" && txtSourceCodeVal.ParseToString().Trim().Length != 6)
|
||||
{
|
||||
@@ -1831,26 +1832,16 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
}
|
||||
var url = "https://po.e57.cn/prod-api/api/oms-api/externalProcurement/saveOrUpdate";
|
||||
var dataStr = JsonHelper.SerializeObject(body);
|
||||
//dataStr = "{\"orderNo\":\"3737339733954942720\",\"outOrderNo\":\"2606846854564\",\"buyerAccount\":\"测试\",\"outAmount\":\"2000\",\"purchaserNote\":\"测试\",\"express1Company\":\"\"" +
|
||||
// ",\"express1Waybill\":\"\",\"platform\":\"XDYSHC\",\"orderPlatformCode\":\"WEISHOP\"}";
|
||||
var exportRst = HttpResponseWXBLL.e57PostResponse(url, dataStr, "");
|
||||
//<AjaxResult><msg>保存成功</msg><code>200</code></AjaxResult>
|
||||
//<AjaxResult><msg>订单不存在:373733973395494272</msg><code>500</code></AjaxResult>
|
||||
if (!exportRst.ParseToString().Contains("<code>200</code>"))
|
||||
var exportRst = await HttpResponseWXBLL.e57PostResponseAsync(url, dataStr);
|
||||
if (!exportRst.ParseToString().Contains("\"code\":200"))
|
||||
{
|
||||
await Task.Delay(500);
|
||||
exportRst = await HttpResponseWXBLL.e57PostResponseAsync(url, dataStr);
|
||||
}
|
||||
if (!exportRst.ParseToString().Contains("\"code\":200"))
|
||||
{
|
||||
string msg = "";
|
||||
string code = "";
|
||||
try
|
||||
{
|
||||
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
|
||||
xmlDoc.LoadXml(exportRst);
|
||||
code = xmlDoc["AjaxResult"]["code"].InnerText;
|
||||
msg = xmlDoc["AjaxResult"]["msg"].InnerText;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
msg = exportRst.ParseToString();
|
||||
}
|
||||
msg = BaseRegex.GetStringJsonByRegs(ref exportRst, exportRst, "msg");
|
||||
this.ErrorMsg = "拍单保存失败,服务端返回 " + msg;
|
||||
Enabled = true;
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user