admin/src/Oms.Domain/OrdersAggregate/Entities/PickupOrder.cs
zzh f66d567c49
All checks were successful
Build and Deploy / deploy (push) Successful in 1m24s
feat: 服务渠道独立计重,应付与揽收应付用渠道计费重
应收仍走销售产品计重;排货/重算应付/对账/揽收推费按渠道计重写入 PayableChargeableWeight,不改 ChargeableWeight。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-23 16:32:05 +08:00

201 lines
6.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Oms.Domain.Shared;
using SqlSugar;
namespace Oms.Domain.OrdersAggregate.Entities;
/// <summary>
/// 揽收单(上门取件履约 + 对客收款 + 承运结算)。
/// </summary>
[SugarTable("t_pickup_order")]
public class PickupOrder : OmsAuditedAggregateRoot
{
[SugarColumn(Length = 32)]
public string PickupNo { get; set; } = string.Empty;
[SugarColumn(Length = 64, IsNullable = true)]
public string? RequestId { get; set; }
public int CustomerId { get; set; }
[SugarColumn(Length = 36, IsNullable = true)]
public string? OrganizationId { get; set; }
public int SecretLevel { get; set; } = 2;
public int SenderAddressId { get; set; }
/// <summary>
/// 揽收方向:forward 正向(客户→仓)/ reverse 逆向(仓→客户)。
/// </summary>
[SugarColumn(Length = 16)]
public string Direction { get; set; } = "forward";
[SugarColumn(Length = 50)]
public string SenderName { get; set; } = string.Empty;
[SugarColumn(Length = 255, IsNullable = true)]
public string? SenderCompany { get; set; }
[SugarColumn(IsNullable = true)]
public int? SenderCountry { get; set; }
[SugarColumn(Length = 8, IsNullable = true)]
public string? SenderCountryCode { get; set; }
[SugarColumn(Length = 50, IsNullable = true)]
public string? SenderProvince { get; set; }
[SugarColumn(Length = 50, IsNullable = true)]
public string? SenderCity { get; set; }
[SugarColumn(Length = 50, IsNullable = true)]
public string? SenderZipCode { get; set; }
[SugarColumn(Length = 500)]
public string SenderStreetAddress1 { get; set; } = string.Empty;
[SugarColumn(Length = 500, IsNullable = true)]
public string? SenderStreetAddress2 { get; set; }
[SugarColumn(Length = 500, IsNullable = true)]
public string? SenderStreetAddress3 { get; set; }
[SugarColumn(Length = 50, IsNullable = true)]
public string? SenderHouseNumber { get; set; }
[SugarColumn(Length = 50, IsNullable = true)]
public string? SenderPhone { get; set; }
[SugarColumn(Length = 50, IsNullable = true)]
public string? SenderTelePhone { get; set; }
[SugarColumn(Length = 60, IsNullable = true)]
public string? SenderEmail { get; set; }
public int WarehouseId { get; set; }
[SugarColumn(Length = 64, IsNullable = true)]
public string? CarrierCode { get; set; }
[SugarColumn(Length = 64, IsNullable = true)]
public string? CarrierService { get; set; }
[SugarColumn(Length = 64, IsNullable = true)]
public string? CarrierWaybillNo { get; set; }
public DateTime ExpectPickupTime { get; set; }
[SugarColumn(IsNullable = true)]
public DateTime? PickupWindowStart { get; set; }
[SugarColumn(IsNullable = true)]
public DateTime? PickupWindowEnd { get; set; }
[SugarColumn(IsNullable = true)]
public DateTime? ActualPickupTime { get; set; }
[SugarColumn(Length = 32)]
public string Status { get; set; } = "draft";
public int ParcelCount { get; set; }
[SugarColumn(DecimalDigits = 3, IsNullable = true)]
public decimal? TotalActualWeight { get; set; }
/// <summary>
/// 应收计费重(销售产品计重)。
/// </summary>
[SugarColumn(DecimalDigits = 3, IsNullable = true)]
public decimal? ChargeableWeight { get; set; }
/// <summary>
/// 应付计费重(服务渠道计重)。
/// </summary>
[SugarColumn(DecimalDigits = 3, IsNullable = true)]
public decimal? PayableChargeableWeight { get; set; }
[SugarColumn(DecimalDigits = 3, IsNullable = true)]
public decimal? VolumetricWeight { get; set; }
/// <summary>
/// 承运回传尺寸 JSON(goodsSizeList)。
/// </summary>
[SugarColumn(ColumnDataType = "text", IsNullable = true)]
public string? PackageSizesJson { get; set; }
/// <summary>
/// 承运计费重(仅对照,不算账)。
/// </summary>
[SugarColumn(DecimalDigits = 3, IsNullable = true)]
public decimal? CarrierFreightWeight { get; set; }
/// <summary>
/// 承运报价运费合计(仅对照)。
/// </summary>
[SugarColumn(DecimalDigits = 2, IsNullable = true)]
public decimal? CarrierQuotedFreightAmount { get; set; }
/// <summary>
/// 承运报文应收(仅对照,不是客户应收)。
/// </summary>
[SugarColumn(DecimalDigits = 2, IsNullable = true)]
public decimal? CarrierQuotedReceivableAmount { get; set; }
/// <summary>
/// 承运报价原文(附加费、服务方式等)。
/// </summary>
[SugarColumn(ColumnDataType = "text", IsNullable = true)]
public string? CarrierQuoteJson { get; set; }
/// <summary>
/// 系统卖价费用明细 JSON。
/// </summary>
[SugarColumn(ColumnDataType = "text", IsNullable = true)]
public string? ReceivableFeeJson { get; set; }
/// <summary>
/// 系统买价费用明细 JSON。
/// </summary>
[SugarColumn(ColumnDataType = "text", IsNullable = true)]
public string? PayableFeeJson { get; set; }
[SugarColumn(IsNullable = true)]
public DateTime? FeePushedAt { get; set; }
[SugarColumn(Length = 8)]
public string Currency { get; set; } = "CNY";
[SugarColumn(DecimalDigits = 2, IsNullable = true)]
public decimal? FreightAmount { get; set; }
[SugarColumn(DecimalDigits = 2, IsNullable = true)]
public decimal? OtherFeeAmount { get; set; }
[SugarColumn(DecimalDigits = 2, IsNullable = true)]
public decimal? ReceivableAmount { get; set; }
[SugarColumn(Length = 16)]
public string PayStatus { get; set; } = "unpaid";
[SugarColumn(IsNullable = true)]
public DateTime? PayTime { get; set; }
[SugarColumn(Length = 16)]
public string PayMode { get; set; } = "prepaid";
[SugarColumn(DecimalDigits = 2, IsNullable = true)]
public decimal? CarrierPayableAmount { get; set; }
[SugarColumn(Length = 16)]
public string SettlementStatus { get; set; } = "none";
[SugarColumn(Length = 64, IsNullable = true)]
public string? SettlementBatchNo { get; set; }
[SugarColumn(IsNullable = true)]
public DateTime? SettledAt { get; set; }
[SugarColumn(Length = 512, IsNullable = true)]
public string? Remark { get; set; }
}