拼多多订单获取
This commit is contained in:
1 parent
627dce3e5b
commit
87c1b8fc79
14 files changed
+679
-101
No files matched your search
@@ -56,5 +56,6 @@ namespace AllBase.Model.Local
|
||||
public int? is_transfer_ship { get; set; }
|
||||
public string random_code { get; set; }
|
||||
public int? transfer_refund_status { get; set; }
|
||||
public int? order_void_status { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -73,11 +73,34 @@ namespace AllBase.Model.Local
|
||||
get { return status == 30 || status == 100; }
|
||||
set { }
|
||||
}
|
||||
/// <summary>
|
||||
/// 售后订单(含售后关闭)
|
||||
/// </summary>
|
||||
public bool IsRefund
|
||||
{
|
||||
get { return refundItems?.Count > 0; }
|
||||
set { }
|
||||
}
|
||||
/// <summary>
|
||||
/// 紧急订单
|
||||
/// </summary>
|
||||
public bool IsEmergency
|
||||
{
|
||||
get
|
||||
{
|
||||
if (orderItems.Any(oi => oi.refund_status > 0 && oi.ItemTransitOrders.Count > 0 &&
|
||||
oi.ItemTransitOrders.Any(t => !string.IsNullOrEmpty(t.refund_status) &&
|
||||
!t.refund_status.Contains("退款成功") &&
|
||||
!t.refund_status.Contains("关闭") &&
|
||||
!t.refund_status.Contains("撤销"))))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
|
||||
public string orderStatusStr
|
||||
{
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace AllBase.Model.Local
|
||||
else
|
||||
ItemRefund = ItemOrder?.refundItems?.FirstOrDefault(r => r.sku_id == this.sku_id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 采购关联
|
||||
/// </summary>
|
||||
@@ -81,7 +82,19 @@ namespace AllBase.Model.Local
|
||||
public List<oms_wei_external_procurement_log> ItemTransitOrders { get; set; } = new List<oms_wei_external_procurement_log>();
|
||||
public oms_wei_external_procurement_log ItemTransitOrder
|
||||
{
|
||||
get { return ItemTransitOrders.FirstOrDefault(t => t.transfer_refund_status.IsNullOrZero()); }
|
||||
get { return ItemTransitOrders.FirstOrDefault(t => t.order_void_status != 1); }
|
||||
set { }
|
||||
}
|
||||
public oms_wei_external_procurement_log ItemTransitOrderWithFake
|
||||
{
|
||||
get { return ItemTransitOrders.FirstOrDefault(); }
|
||||
set { }
|
||||
}
|
||||
|
||||
public List<order_pdd_buyer_order> PddBuyerOrders { get; set; } = new List<order_pdd_buyer_order>();
|
||||
public order_pdd_buyer_order PddBuyerOrder
|
||||
{
|
||||
get { return PddBuyerOrders.FirstOrDefault(); }
|
||||
set { }
|
||||
}
|
||||
|
||||
@@ -128,64 +141,151 @@ namespace AllBase.Model.Local
|
||||
set { }
|
||||
}
|
||||
|
||||
public string TransitWaybillStatusStr
|
||||
public string BuyerWaybillStatusStr
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((ItemTransitOrder?.pre_allocated_order_no == 1 || ItemTransitOrder?.pre_allocated_order_no == 3) && !ItemTransitOrder.express_2_company.IsNullOrEmpty() && !ItemTransitOrder.express_2_waybill.IsNullOrEmpty())
|
||||
return "仓库已出单";
|
||||
if (PddBuyerOrder?.wx_order_id == "3737506236083093504")
|
||||
{
|
||||
|
||||
}
|
||||
if ((PddBuyerOrder?.order_status_prompt).ParseToString().Contains("已签收"))
|
||||
{
|
||||
return "已到中转仓";
|
||||
}
|
||||
else if ((PddBuyerOrder?.order_status_prompt).ParseToString().Contains("待用户退回商品"))
|
||||
{
|
||||
return "已到中转仓";
|
||||
}
|
||||
else if ((PddBuyerOrder?.order_status_prompt).ParseToString().Contains("待收货"))
|
||||
{
|
||||
return "买手已发货";
|
||||
}
|
||||
|
||||
if (ItemTransitOrder?.pre_allocated_order_no == 1 || ItemTransitOrder?.pre_allocated_order_no == 3)
|
||||
return "买手已出单";
|
||||
return "买手已发货";
|
||||
if (ItemTransitOrder != null)
|
||||
return "买手未出单";
|
||||
return "买手未发货";
|
||||
return "";
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
public SolidColorBrush TransitWaybillStatusStrColor
|
||||
public SolidColorBrush BuyerWaybillStatusStrColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (TransitWaybillStatusStr == "仓库已出单")
|
||||
if (BuyerWaybillStatusStr.StartsWith("已到中转仓"))
|
||||
return new SolidColorBrush(Color.FromRgb(19, 206, 102));
|
||||
if (TransitWaybillStatusStr == "买手已出单")
|
||||
if (BuyerWaybillStatusStr.StartsWith("买手已发货"))
|
||||
return new SolidColorBrush(Color.FromRgb(255, 186, 0));
|
||||
if (TransitWaybillStatusStr == "买手未出单")
|
||||
if (BuyerWaybillStatusStr.StartsWith("买手未发货"))
|
||||
return new SolidColorBrush(Color.FromRgb(255, 73, 73));
|
||||
return new SolidColorBrush(Color.FromRgb(255, 73, 73));
|
||||
}
|
||||
set { }
|
||||
}
|
||||
public SolidColorBrush TransitWaybillStatusBorderColor
|
||||
public SolidColorBrush BuyerWaybillStatusBorderColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (TransitWaybillStatusStr == "仓库已出单")
|
||||
if (BuyerWaybillStatusStr.StartsWith("已到中转仓"))
|
||||
return new SolidColorBrush(Color.FromRgb(208, 245, 224));
|
||||
if (TransitWaybillStatusStr == "买手已出单")
|
||||
if (BuyerWaybillStatusStr.StartsWith("买手已发货"))
|
||||
return new SolidColorBrush(Color.FromRgb(255, 241, 204));
|
||||
if (TransitWaybillStatusStr == "买手未出单")
|
||||
if (BuyerWaybillStatusStr.StartsWith("买手未发货"))
|
||||
return new SolidColorBrush(Color.FromRgb(255, 219, 219));
|
||||
return new SolidColorBrush(Color.FromRgb(255, 219, 219));
|
||||
}
|
||||
set { }
|
||||
}
|
||||
public SolidColorBrush BuyerWaybillStatusBackColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (BuyerWaybillStatusStr.StartsWith("已到中转仓"))
|
||||
return new SolidColorBrush(Color.FromRgb(231, 250, 240));
|
||||
if (BuyerWaybillStatusStr.StartsWith("买手已发货"))
|
||||
return new SolidColorBrush(Color.FromRgb(255, 248, 230));
|
||||
if (BuyerWaybillStatusStr.StartsWith("买手未发货"))
|
||||
return new SolidColorBrush(Color.FromRgb(255, 237, 237));
|
||||
return new SolidColorBrush(Color.FromRgb(255, 237, 237));
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
public string WarehouseWaybillStatusStr
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((ItemTransitOrder?.pre_allocated_order_no == 1 || ItemTransitOrder?.pre_allocated_order_no == 3) && !ItemTransitOrder.express_2_company.IsNullOrEmpty() && !ItemTransitOrder.express_2_waybill.IsNullOrEmpty())
|
||||
return "中转已发货";
|
||||
if (ItemTransitOrder?.pre_allocated_order_no == 1 || ItemTransitOrder?.pre_allocated_order_no == 3)
|
||||
return "待中转发货";
|
||||
if (ItemTransitOrder?.pre_allocated_order_no == 2)
|
||||
return "中转提前取号";
|
||||
if (ItemTransitOrder?.pre_allocated_order_no == 0)
|
||||
return "待中转取号";
|
||||
return "";
|
||||
}
|
||||
set { }
|
||||
}
|
||||
public SolidColorBrush WarehouseWaybillStatusStrColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (WarehouseWaybillStatusStr.StartsWith("中转已发货"))
|
||||
return new SolidColorBrush(Color.FromRgb(19, 206, 102));
|
||||
if (WarehouseWaybillStatusStr.StartsWith("待中转发货") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
|
||||
return new SolidColorBrush(Color.FromRgb(255, 186, 0));
|
||||
if (WarehouseWaybillStatusStr.StartsWith("待中转取号"))
|
||||
return new SolidColorBrush(Color.FromRgb(255, 73, 73));
|
||||
return new SolidColorBrush(Color.FromRgb(255, 73, 73));
|
||||
}
|
||||
set { }
|
||||
}
|
||||
public SolidColorBrush WarehouseWaybillStatusBorderColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (WarehouseWaybillStatusStr.StartsWith("中转已发货"))
|
||||
return new SolidColorBrush(Color.FromRgb(208, 245, 224));
|
||||
if (WarehouseWaybillStatusStr.StartsWith("待中转发货") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
|
||||
return new SolidColorBrush(Color.FromRgb(255, 241, 204));
|
||||
if (WarehouseWaybillStatusStr.StartsWith("待中转取号"))
|
||||
return new SolidColorBrush(Color.FromRgb(255, 219, 219));
|
||||
return new SolidColorBrush(Color.FromRgb(255, 73, 73));
|
||||
}
|
||||
set { }
|
||||
}
|
||||
public SolidColorBrush TransitWaybillStatusBackColor
|
||||
public SolidColorBrush WarehouseWaybillStatusBackColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (TransitWaybillStatusStr == "仓库已出单")
|
||||
if (WarehouseWaybillStatusStr.StartsWith("中转已发货"))
|
||||
return new SolidColorBrush(Color.FromRgb(231, 250, 240));
|
||||
if (TransitWaybillStatusStr == "买手已出单")
|
||||
if (WarehouseWaybillStatusStr.StartsWith("待中转发货") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
|
||||
return new SolidColorBrush(Color.FromRgb(255, 248, 230));
|
||||
if (TransitWaybillStatusStr == "买手未出单")
|
||||
if (WarehouseWaybillStatusStr.StartsWith("待中转取号"))
|
||||
return new SolidColorBrush(Color.FromRgb(255, 237, 237));
|
||||
return new SolidColorBrush(Color.FromRgb(255, 73, 73));
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
public string TransitRefundStatusStr
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ItemTransitOrder?.refund_status))
|
||||
{
|
||||
if (!ItemTransitOrder.refund_status.Contains("需手动申请售后"))
|
||||
return "已申请售后 " + ItemTransitOrder.refund_status.Replace("申请收到,", "");
|
||||
return ItemTransitOrder.refund_status;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
|
||||
// 仓库采购时间是否达标字段
|
||||
@@ -193,14 +293,14 @@ namespace AllBase.Model.Local
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ItemTransitOrder == null)
|
||||
if (ItemTransitOrderWithFake == null)
|
||||
return "";
|
||||
|
||||
if (ItemOrder.createDateTime == null)
|
||||
ItemOrder.createDateTime = BaseClass.StampToDateTime(ItemOrder.create_time);
|
||||
|
||||
string timeStr = "采购时间:" + ItemTransitOrder.created_time.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
if (ItemOrder.createDateTime.Value.Date != ItemTransitOrder.created_time.Date && ItemTransitOrder.created_time > ItemTransitOrder.created_time.Date.AddHours(1.5))
|
||||
string timeStr = "采购时间:" + ItemTransitOrderWithFake.created_time.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
if (ItemOrder.createDateTime.Value.Date != ItemTransitOrderWithFake.created_time.Date && ItemTransitOrderWithFake.created_time > ItemTransitOrderWithFake.created_time.Date.AddHours(1.5))
|
||||
return timeStr + " ×";
|
||||
return timeStr + " √";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AllBase.Model.Local
|
||||
{
|
||||
public class order_pdd_buyer_order
|
||||
{
|
||||
public long? id { get; set; }
|
||||
public string wx_order_id { get; set; }
|
||||
public string wx_sku_id { get; set; }
|
||||
public DateTime TransitCreateTime { get; set; }
|
||||
public int? pre_allocated_order_no { get; set; }
|
||||
public string buyerId { get; set; }
|
||||
public string buyerName { get; set; }
|
||||
public string order_sn { get; set; }
|
||||
public int? order_amount { get; set; }
|
||||
public long? order_time { get; set; }
|
||||
public string outExpressCompanyCode { get; set; }
|
||||
public string tracking_number { get; set; }
|
||||
/// <summary>
|
||||
/// 订单状态
|
||||
/// </summary>
|
||||
public string order_status_prompt { get; set; }
|
||||
public int? after_sales_status { get; set; }
|
||||
public string order_detail { get; set; }
|
||||
public DateTime add_time { get; set; }
|
||||
public DateTime mdy_time { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user