|
|
@ -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();
|
|
|
|