admin/src/Oms.Application/Dtos/Orders/PickupOrderDtos.cs
zzh 8d1e3ab17f
All checks were successful
Build and Deploy / deploy (push) Successful in 1m47s
feat: 揽收方向与地址类型,补充迁移并清理已落地 SQL
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 23:34:55 +08:00

306 lines
6.9 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 System.ComponentModel.DataAnnotations;
namespace Oms.Application.Dtos.Orders;
public class PickupOrderCreateInput
{
public int? CustomerId { get; set; }
/// <summary>
/// 请求幂等键(可选)。
/// </summary>
public string? RequestId { get; set; }
[Required]
public int SenderAddressId { get; set; }
/// <summary>
/// 揽收方向:forward 正向(客户地址→仓库)/ reverse 逆向(仓库→客户地址)。默认正向。
/// </summary>
public string? Direction { get; set; }
[Required]
public int WarehouseId { get; set; }
public string? CarrierCode { get; set; }
public string? CarrierService { get; set; }
[Required]
public DateTime ExpectPickupTime { get; set; }
[Required]
[MinLength(1)]
public List<int> OrderIds { get; set; } = [];
[StringLength(512)]
public string? Remark { get; set; }
/// <summary>
/// 可选:创建时直接写入对客运费(未写则保持未确认)。
/// </summary>
public decimal? FreightAmount { get; set; }
}
public class PickupOrderIdInput
{
[Required]
public int Id { get; set; }
}
public class PickupOrderIdsInput
{
[Required]
[MinLength(1)]
public List<int> Ids { get; set; } = [];
}
public class PickupOrderBatchPayItemOutput
{
public int Id { get; set; }
public string? PickupNo { get; set; }
public bool Success { get; set; }
public string Message { get; set; } = string.Empty;
public decimal? Amount { get; set; }
}
public class PickupOrderBatchPayOutput
{
public int SuccessCount { get; set; }
public int FailCount { get; set; }
public decimal PaidAmount { get; set; }
public string Message { get; set; } = string.Empty;
public List<PickupOrderBatchPayItemOutput> Items { get; set; } = [];
}
public class PickupOrderOrdersInput
{
[Required]
public int Id { get; set; }
[Required]
[MinLength(1)]
public List<int> OrderIds { get; set; } = [];
}
public class PickupOrderListInput
{
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 30;
public int? CustomerId { get; set; }
public string? Status { get; set; }
public string? PayStatus { get; set; }
public string? Keyword { get; set; }
public int? WarehouseId { get; set; }
/// <summary>
/// 揽收方向:forward / reverse。
/// </summary>
public string? Direction { get; set; }
public DateTime? CreateTimeStart { get; set; }
public DateTime? CreateTimeEnd { get; set; }
public DateTime? ExpectPickupTimeStart { get; set; }
public DateTime? ExpectPickupTimeEnd { get; set; }
}
public class PickupOrderStatusCountsOutput
{
public int Total { get; set; }
public int PendingPayment { get; set; }
public Dictionary<string, int> Counts { get; set; } = new(StringComparer.OrdinalIgnoreCase);
}
public class PickupOrderConfirmFreightInput
{
[Required]
public int Id { get; set; }
[Required]
public decimal FreightAmount { get; set; }
public decimal? OtherFeeAmount { get; set; }
public decimal? CarrierPayableAmount { get; set; }
}
public class PickupOrderScheduleInput
{
[Required]
public int Id { get; set; }
/// <summary>
/// 兼容旧字段,已不再作为预约必填;承运服务改用销售产品编码。
/// </summary>
public string? CarrierCode { get; set; }
/// <summary>
/// 承运服务:国内揽收分组销售产品编码。
/// </summary>
[Required]
public string CarrierService { get; set; } = string.Empty;
/// <summary>
/// 国内承运商回执单号(手工录入或对接返回)。
/// </summary>
public string? CarrierWaybillNo { get; set; }
public DateTime? ExpectPickupTime { get; set; }
}
public class PickupOrderRescheduleInput
{
[Required]
public int Id { get; set; }
[Required]
public DateTime ExpectPickupTime { get; set; }
}
public class PickupOrderRejectItem
{
public int OrderId { get; set; }
public string? ServiceNo { get; set; }
public string Reason { get; set; } = string.Empty;
}
public class PickupOrderLineOutput
{
public int OrderId { get; set; }
public string? ServiceNo { get; set; }
public string? ClientNo { get; set; }
public string? OrderStatus { get; set; }
public int? WarehouseId { get; set; }
public decimal? ChargeableWeight { get; set; }
}
public class PickupOrderOutput
{
public int Id { get; set; }
public string PickupNo { get; set; } = string.Empty;
public string? RequestId { get; set; }
public int CustomerId { get; set; }
public string? CustomerName { get; set; }
public string? OrganizationId { get; set; }
public int SecretLevel { get; set; }
public int SenderAddressId { get; set; }
/// <summary>
/// 揽收方向:forward / reverse。
/// </summary>
public string Direction { get; set; } = "forward";
public string SenderName { get; set; } = string.Empty;
public string? SenderPhone { get; set; }
public string? SenderTelePhone { get; set; }
public string? SenderEmail { get; set; }
public string? SenderCompany { get; set; }
public int? SenderCountry { get; set; }
public string? SenderCountryCode { get; set; }
public string? SenderProvince { get; set; }
public string? SenderCity { get; set; }
public string? SenderZipCode { get; set; }
public string? SenderStreetAddress1 { get; set; }
public string? SenderStreetAddress2 { get; set; }
public string? SenderStreetAddress3 { get; set; }
public string? SenderHouseNumber { get; set; }
public int WarehouseId { get; set; }
public string? WarehouseName { get; set; }
public string? CarrierCode { get; set; }
public string? CarrierService { get; set; }
public string? CarrierWaybillNo { get; set; }
public DateTime ExpectPickupTime { get; set; }
public DateTime? ActualPickupTime { get; set; }
public string Status { get; set; } = string.Empty;
public int ParcelCount { get; set; }
public decimal? TotalActualWeight { get; set; }
public decimal? ChargeableWeight { get; set; }
public string Currency { get; set; } = "CNY";
public decimal? FreightAmount { get; set; }
public decimal? OtherFeeAmount { get; set; }
public decimal? ReceivableAmount { get; set; }
public string PayStatus { get; set; } = string.Empty;
public DateTime? PayTime { get; set; }
public string PayMode { get; set; } = string.Empty;
public decimal? CarrierPayableAmount { get; set; }
public string SettlementStatus { get; set; } = string.Empty;
public string? SettlementBatchNo { get; set; }
public string? Remark { get; set; }
public DateTime? CreateTime { get; set; }
public DateTime? UpdateTime { get; set; }
public List<PickupOrderLineOutput> Orders { get; set; } = [];
public List<PickupOrderRejectItem> Rejected { get; set; } = [];
}