From 926d1ff779b1ee9c524bc05d3f161bee6740b2a8 Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期二, 01 四月 2025 17:16:36 +0800 Subject: [PATCH] fix:bug修复 --- LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs | 22 ++++++++++++---------- LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml | 14 ++++++++++++++ LifePayment/LifePayment.Application/LifePay/StatisticsService.cs | 10 +++++----- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs index af8d6e1..8bdc9a9 100644 --- a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs +++ b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs @@ -336,7 +336,6 @@ public async Task GetAllLifePayConsumption() { var orderList = await _lifePayOrderRepository.Where(x => x.PayStatus == LifePayStatusEnum.宸叉敮浠�).ToListAsync(); - foreach (var item in orderList) { LifePayConsumption lifePayConsumption = new LifePayConsumption() @@ -344,17 +343,20 @@ OrderNo = item.OrderNo, AcoolyOrderNo = item.ACOOLYOrderNo, Amount = item.PlatformDeductionAmount.Value, - //ACOOLYStatus = - }; - //switch (item.ACOOLYStatus) - //{ - // case ACOOLYStatusEnum.鍏呭�间腑: - - // break; - // default:break; - //} + switch (item.ACOOLYStatus) + { + case ACOOLYStatusEnum.鍏呭�间腑: + lifePayConsumption.FinishTime = item.CreationTime; + lifePayConsumption.ACOOLYStatus = ACOOLYStatusEnum.鍏呭�间腑; + lifePayConsumption.FrozenStatus = ConsumptionFrozenStatusEnum.Frozen; + lifePayConsumption.Flow = ConsumptionFlowEnum.Unchanged; + lifePayConsumption.DeductionAmount = 0; + lifePayConsumption.FrozenAmount = lifePayConsumption.Amount; + break; + default: break; + } } } diff --git a/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs b/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs index 6ebfa27..b69b5b6 100644 --- a/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs +++ b/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs @@ -143,18 +143,18 @@ public async Task<ChannlesRakeListOutPut> GetChannlesRakeList(List<string> channleList) { var today = DateTime.Now.Date; - var statistics = await _lifePayChannlesRakeRepository.Where(x => x.IsDeleted == false) + var statistics = await _lifePayChannlesRakeRepository.Where(x => x.IsDeleted == false && + x.FinishTime.Date <= today && x.FinishTime.Date >= today.AddDays(-30)) .WhereIf(channleList.Count() > 0, x => channleList.Contains(x.ChannelId)) .ToListAsync(); var groupedStatistics = statistics - .GroupBy(x => x.CreationTime) + .GroupBy(x => x.FinishTime.ToString("yyyy-MM-dd")) .Select(g => new { - CreationTime = g.Key, + FinishTime = g.Key, ChannlesRakePrice = g.Sum(x => x.ChannlesRakePrice), }) .ToList(); - ChannlesRakeListOutPut channlesRakeListOutPut = new ChannlesRakeListOutPut(); @@ -162,7 +162,7 @@ { ReceiptsDetail receive = new ReceiptsDetail() { - CreationTime = item.CreationTime.AddDays(-1).ToString("yyyy-MM-dd"), + CreationTime = item.FinishTime, Amount = item.ChannlesRakePrice }; diff --git a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml index 07b961e..f1d2df9 100644 --- a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml +++ b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml @@ -77,6 +77,20 @@ <param name="input"></param> <returns></returns> </member> + <member name="M:LifePayment.HttpApi.LifePayController.GetChannelDataList(LifePayment.Application.Contracts.TopStatisticsInput)"> + <summary> + 娓犻亾鏁版嵁 + </summary> + <param name="input"></param> + <returns></returns> + </member> + <member name="M:LifePayment.HttpApi.LifePayController.GetChannlesRakeList(LifePayment.Application.Contracts.TopStatisticsInput)"> + <summary> + 30鏃ヤ剑閲戝垪琛� + </summary> + <param name="input"></param> + <returns></returns> + </member> <member name="M:LifePayment.HttpApi.LifePayController.GetElectricParValue(LifePayment.Domain.Shared.ChannelsBaseInput)"> <summary> 鑾峰彇鐢佃垂闈㈠�� -- Gitblit v1.9.1