diff --git a/ds-wms-service/DS.WMS.Core/Settlement/Dtos/PaymentApplicationDtoV2.cs b/ds-wms-service/DS.WMS.Core/Settlement/Dtos/PaymentApplicationDtoV2.cs index ab6ae674..a578a72a 100644 --- a/ds-wms-service/DS.WMS.Core/Settlement/Dtos/PaymentApplicationDtoV2.cs +++ b/ds-wms-service/DS.WMS.Core/Settlement/Dtos/PaymentApplicationDtoV2.cs @@ -26,6 +26,11 @@ namespace DS.WMS.Core.Settlement.Dtos /// public decimal AmountUSD { get; set; } + /// + /// 其他申请金额 + /// + public decimal AmountOther { get; set; } + /// /// 本次结算人民币 /// @@ -46,7 +51,14 @@ namespace DS.WMS.Core.Settlement.Dtos /// public decimal UnSettledUSD { get; set; } + /// + /// 未结其他 + /// + public decimal UnSettledOther { get; set; } + /// + /// 结算方式ID + /// public long? SettlementTypeId { get; set; } /// diff --git a/ds-wms-service/DS.WMS.Core/Settlement/Method/ApplicationSettlementService.cs b/ds-wms-service/DS.WMS.Core/Settlement/Method/ApplicationSettlementService.cs index 2290ef9f..19cfea75 100644 --- a/ds-wms-service/DS.WMS.Core/Settlement/Method/ApplicationSettlementService.cs +++ b/ds-wms-service/DS.WMS.Core/Settlement/Method/ApplicationSettlementService.cs @@ -263,16 +263,20 @@ namespace DS.WMS.Core.Settlement.Method { AmountRMB = a.AmountRMB == null ? 0 : a.AmountRMB.Value, //RMB申请金额 AmountUSD = a.AmountUSD == null ? 0 : a.AmountUSD.Value, //USD申请金额 + AmountOther = a.AmountOther == null ? 0 : a.AmountOther.Value, //RMB未结金额 UnSettledRMB = SqlFunc.Subqueryable().Where(d => d.Currency == FeeCurrency.RMB_CODE) .Select(d => SqlFunc.AggregateSum(d.ApplyAmount - d.ProcessedAmount)), //USD未结金额 UnSettledUSD = SqlFunc.Subqueryable().Where(d => d.Currency == FeeCurrency.USD_CODE) .Select(d => SqlFunc.AggregateSum(d.ApplyAmount - d.ProcessedAmount)), + //USD未结其他 + UnSettledOther = SqlFunc.Subqueryable().Where(d => d.Currency != FeeCurrency.RMB_CODE && d.Currency != FeeCurrency.USD_CODE) + .Select(d => SqlFunc.AggregateSum(d.ApplyAmount - d.ProcessedAmount)), SettlementTypeName = a.SettlementType.StlName, //结算方式 }, 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 users = await Db.Queryable().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToListAsync();