From cd1de89a5b9280b169431049a6a37f099c191d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Thu, 26 Sep 2024 19:46:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=BE=85=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E7=9A=84=E7=94=B3=E8=AF=B7=E5=88=86=E9=A1=B5=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Settlement/Dtos/PaymentApplicationDtoV2.cs | 12 ++++++++++++ .../Method/ApplicationSettlementService.cs | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) 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();