|
|
using DS.WMS.Core.Application.Dtos;
|
|
|
using DS.WMS.Core.Invoice.Dtos;
|
|
|
using DS.WMS.Core.Op.Entity;
|
|
|
using DS.WMS.Core.Settlement.Entity;
|
|
|
using SqlSugar;
|
|
|
|
|
|
namespace DS.WMS.Core.Settlement.Dtos
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 提交结算单请求参数
|
|
|
/// </summary>
|
|
|
public class SettlementRequest<TEntity> where TEntity : SettlementBase
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 结算单
|
|
|
/// </summary>
|
|
|
public TEntity Settlement { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 费用明细(自由结算适用)
|
|
|
/// </summary>
|
|
|
public List<FeeDetailDto>? Details { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 结算单据信息(付费申请/发票结算适用)
|
|
|
/// </summary>
|
|
|
public List<SettlementDocument>? Documents { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 查询条件
|
|
|
/// </summary>
|
|
|
public string? QueryCondition { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取当前实例的查询条件
|
|
|
/// </summary>
|
|
|
/// <param name="client">SqlSugar对象</param>
|
|
|
/// <returns></returns>
|
|
|
/// <exception cref="ArgumentNullException">当<paramref name="client"/>为null时引发</exception>
|
|
|
public List<IConditionalModel> GetConditionalModels(ISqlSugarClient client)
|
|
|
{
|
|
|
if (string.IsNullOrEmpty(QueryCondition))
|
|
|
return [];
|
|
|
|
|
|
ArgumentNullException.ThrowIfNull(client, nameof(client));
|
|
|
return client.Utilities.JsonToConditionalModels(QueryCondition);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 结算单据
|
|
|
/// </summary>
|
|
|
public class SettlementDocument
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 单据ID
|
|
|
/// </summary>
|
|
|
public long Id { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 仅自由结算使用
|
|
|
/// </summary>
|
|
|
public BusinessType? BusinessType { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 费用对象ID
|
|
|
/// </summary>
|
|
|
public long CustomerId { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 费用对象名称
|
|
|
/// </summary>
|
|
|
public string? CustomerName { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 本次RMB结算金额
|
|
|
/// </summary>
|
|
|
public decimal? SettlementRMB { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 本次USD结算金额
|
|
|
/// </summary>
|
|
|
public decimal? SettlementUSD { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 本次其他币别结算金额
|
|
|
/// </summary>
|
|
|
public decimal? SettlementOther { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 汇率(当收/付申请单币别与结算币别一致时,此字段可为null,发票结算需要提前获取原始币别)
|
|
|
/// </summary>
|
|
|
public List<CurrencyExchangeRate>? ExchangeRates { get; set; }
|
|
|
|
|
|
}
|
|
|
}
|