admin/src/Oms.Application/Dtos/Orders/PickupOrderDtos.cs
zzh a70f6f2a87 feat: 接入 9610 汇总申报,字段按业务含义命名并对齐运单
含清单/报关单拉取、ITFX 转发配置、迁移脚本与拣货单号扩展。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-30 17:46:04 +08:00

291 lines
6.5 KiB
C#

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; }
[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; }
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; }
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; } = [];
}