仓库退货订单逻辑 30%

This commit is contained in:
wule committed 2026-08-07 20:04:53 +08:00
1 parent d25374956e
commit d5d235c0b0
18 files changed
+747 -39

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ namespace AllBase.Model.DBModel
//中国广电‌:192。作为第四大运营商,其号段于2022年开始放号。
public static List<int> MobileHead { get; set; } = new List<int>()
{
134, 135, 136, 137, 138, 139, 147, 150, 151, 152, 157, 158, 159, 172, 178, 182, 183, 184, 187, 188, 195, 197, 198,
134, 135, 136, 137, 138, 139, 147, 150, 151, 152, 157, 158, 159, 172, 178, 182, 183, 184, 187, 188, 195, 197, 198,
130, 131, 132, 155, 156, 166, 175, 176, 185, 186, 196,
133, 149, 153, 173, 177, 180, 181, 189, 190, 191, 193, 199,
};
@@ -0,0 +1,193 @@
using AllBase.Model.MvvmBaseClasses;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AllBase.Model.DBModel
{
/// <summary>
/// 分销退货表
/// </summary>
public class distrib_return_order : PropertyNotifyObject
{
public long id { get; set; }
/// <summary>
/// 退货订单编码
/// </summary>
public string order_code { get; set; }
/// <summary>
/// 原始订单来源编码
/// </summary>
public string order_code_source { get; set; }
/// <summary>
/// 物流系统编码(如SF、ZTO)
/// </summary>
public string logistics_code { get; set; }
/// <summary>
/// 物流单号
/// </summary>
public string logistics_express_no { get; set; }
/// <summary>
/// 中转仓平台来源(如OTHER、JD、PDD)
/// </summary>
public string platform { get; set; } = "PDD";
/// <summary>
/// 店铺名称
/// </summary>
public string shop_name { get; set; }
/// <summary>
/// 发件人姓名(冗余字段,便于快速查询,不依赖JSON解析)
/// </summary>
public string sender_name { get; set; }
/// <summary>
/// 发件人电话(冗余字段,便于快速查询,不依赖JSON解析)
/// </summary>
public string sender_phone { get; set; }
/// <summary>
/// 发货人信息(JSON格式:姓名、电话、省市区地址)
/// </summary>
public string sender_info { get; set; }
/// <summary>
/// 收货人姓名
/// </summary>
public string receiver_name { get; set; }
/// <summary>
/// 收货人电话
/// </summary>
public string receiver_phone { get; set; }
/// <summary>
/// 收货省份
/// </summary>
public string receiver_province { get; set; }
/// <summary>
/// 收货城市
/// </summary>
public string receiver_city { get; set; }
/// <summary>
/// 收货区县
/// </summary>
public string receiver_area { get; set; }
/// <summary>
/// 收货详细地址
/// </summary>
public string receiver_address { get; set; }
/// <summary>
/// 记录创建时间
/// </summary>
public DateTime created_at { get; set; }
/// <summary>
/// 记录更新时间
/// </summary>
public DateTime updated_at { get; set; }
/// <summary>
/// 入库时间(仓库接收退货商品的时间)
/// </summary>
public DateTime warehouse_in_time { get; set; }
/// <summary>
/// 出库时间(仓库发出补货或处理后商品的时间)
/// </summary>
public DateTime warehouse_out_time { get; set; }
/// <summary>
/// 出入库状态:0待处理、1已入库、2创建异常、3处理中
/// </summary>
public int? warehouse_status { get; set; }
/// <summary>
/// 退货订单创建与处理状态
/// </summary>
public int? return_order_status { get; set; }
/// <summary>
/// 首重费用
/// </summary>
public int first_weight_fee { get; set; }
/// <summary>
/// 超重费用
/// </summary>
public int? additional_weight_fee { get; set; }
/// <summary>
/// 订单作废状态:0=正常,1=已作废,2=作废失败
/// </summary>
public int? order_void_status { get; set; }
/// <summary>
/// 下游物流公司
/// </summary>
public string real_logistics_code { get; set; }
/// <summary>
/// 下游物流单号
/// </summary>
public string real_logistics_express_code { get; set; }
public string response_msg { get; set; }
/// <summary>
/// 备用扩展字段1
/// </summary>
public string ext_field1 { get; set; }
/// <summary>
/// 备用扩展字段2
/// </summary>
public string ext_field2 { get; set; }
/// <summary>
/// 退货订单平台来源
/// </summary>
public string platform_code { get; set; }
/// <summary>
/// 平台订单号
/// </summary>
public string platform_order_no { get; set; }
/// <summary>
/// 售后单号
/// </summary>
public string after_sale_no { get; set; }
[JsonIgnore]
public ObservableCollection<distrib_return_order_item> distrib_return_order_items
{
get { return this.GetValue(x => x.distrib_return_order_items); }
set { this.SetValue(x => x.distrib_return_order_items, value); }
}
}
public class distrib_return_order_item : PropertyNotifyObject
{
public long id { get; set; }
public string order_code { get; set; }
public string spu_code { get; set; }
public string spu_name { get; set; }
public string sku_code { get; set; }
public string spec_info { get; set; }
public string sku_url { get; set; }
public string pic_url { get; set; }
public int return_quantity { get; set; } = 1;
public DateTime updated_at { get; set; }
public distrib_return_order distrib_return_order
{
get { return this.GetValue(x => x.distrib_return_order); }
set
{
this.SetValue(x => x.distrib_return_order, value);
if (value != null)
{
if (value.distrib_return_order_items == null)
value.distrib_return_order_items = new ObservableCollection<distrib_return_order_item>();
//if (value.distrib_return_order_items.FirstOrDefault(it => it.spu_code + it.sku_code == this.spu_code + this.sku_code) is distrib_return_order_item item)
//{
// //给每个属性赋值...
//}
//else
//{
// value.distrib_return_order_items.Add(this);
//}
while (value.distrib_return_order_items.FirstOrDefault(it => it.spu_code + it.sku_code == this.spu_code + this.sku_code) is distrib_return_order_item item)
{
value.distrib_return_order_items.Remove(item);
}
value.distrib_return_order_items.Add(this);
}
}
}
}
}