获取待结算的申请分页列表

dev
嵇文龙 2 months ago
parent 33f8b469a4
commit cd1de89a5b

@ -26,6 +26,11 @@ namespace DS.WMS.Core.Settlement.Dtos
/// </summary> /// </summary>
public decimal AmountUSD { get; set; } public decimal AmountUSD { get; set; }
/// <summary>
/// 其他申请金额
/// </summary>
public decimal AmountOther { get; set; }
/// <summary> /// <summary>
/// 本次结算人民币 /// 本次结算人民币
/// </summary> /// </summary>
@ -46,7 +51,14 @@ namespace DS.WMS.Core.Settlement.Dtos
/// </summary> /// </summary>
public decimal UnSettledUSD { get; set; } public decimal UnSettledUSD { get; set; }
/// <summary>
/// 未结其他
/// </summary>
public decimal UnSettledOther { get; set; }
/// <summary>
/// 结算方式ID
/// </summary>
public long? SettlementTypeId { get; set; } public long? SettlementTypeId { get; set; }
/// <summary> /// <summary>

@ -263,16 +263,20 @@ namespace DS.WMS.Core.Settlement.Method
{ {
AmountRMB = a.AmountRMB == null ? 0 : a.AmountRMB.Value, //RMB申请金额 AmountRMB = a.AmountRMB == null ? 0 : a.AmountRMB.Value, //RMB申请金额
AmountUSD = a.AmountUSD == null ? 0 : a.AmountUSD.Value, //USD申请金额 AmountUSD = a.AmountUSD == null ? 0 : a.AmountUSD.Value, //USD申请金额
AmountOther = a.AmountOther == null ? 0 : a.AmountOther.Value,
//RMB未结金额 //RMB未结金额
UnSettledRMB = SqlFunc.Subqueryable<ApplicationDetail>().Where(d => d.Currency == FeeCurrency.RMB_CODE) UnSettledRMB = SqlFunc.Subqueryable<ApplicationDetail>().Where(d => d.Currency == FeeCurrency.RMB_CODE)
.Select(d => SqlFunc.AggregateSum(d.ApplyAmount - d.ProcessedAmount)), .Select(d => SqlFunc.AggregateSum(d.ApplyAmount - d.ProcessedAmount)),
//USD未结金额 //USD未结金额
UnSettledUSD = SqlFunc.Subqueryable<ApplicationDetail>().Where(d => d.Currency == FeeCurrency.USD_CODE) UnSettledUSD = SqlFunc.Subqueryable<ApplicationDetail>().Where(d => d.Currency == FeeCurrency.USD_CODE)
.Select(d => SqlFunc.AggregateSum(d.ApplyAmount - d.ProcessedAmount)), .Select(d => SqlFunc.AggregateSum(d.ApplyAmount - d.ProcessedAmount)),
//USD未结其他
UnSettledOther = SqlFunc.Subqueryable<ApplicationDetail>().Where(d => d.Currency != FeeCurrency.RMB_CODE && d.Currency != FeeCurrency.USD_CODE)
.Select(d => SqlFunc.AggregateSum(d.ApplyAmount - d.ProcessedAmount)),
SettlementTypeName = a.SettlementType.StlName, //结算方式 SettlementTypeName = a.SettlementType.StlName, //结算方式
}, true).MergeTable().Where(whereList).ToQueryPageAsync(request.PageCondition); }, true).MergeTable().Where(whereList).ToQueryPageAsync(request.PageCondition);
if (result.Data.Count > 0) if (result.Data?.Count > 0)
{ {
var userIds = result.Data.Select(x => x.CreateBy).Distinct(); var userIds = result.Data.Select(x => x.CreateBy).Distinct();
var users = await Db.Queryable<SysUser>().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToListAsync(); var users = await Db.Queryable<SysUser>().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToListAsync();

Loading…
Cancel
Save