From e0738c0754dd80a3b8d972f03d84b0611fd8254c Mon Sep 17 00:00:00 2001 From: ningshuxia <ningshuxia0927@outlook.com> Date: 星期二, 22 十一月 2022 16:43:54 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/IStation/Service.V4.1 --- Application/IStation.Application.Run/energy_flow/EngineFlow_Controller.cs | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Application/IStation.Application.Run/energy_flow/EngineFlow_Controller.cs b/Application/IStation.Application.Run/energy_flow/EngineFlow_Controller.cs index 7243868..c3585d3 100644 --- a/Application/IStation.Application.Run/energy_flow/EngineFlow_Controller.cs +++ b/Application/IStation.Application.Run/energy_flow/EngineFlow_Controller.cs @@ -34,7 +34,13 @@ int Month ) { - var cacheKey = $"Run_Energy_Flow_GetByLogicTreeIDOfMonth_{CorpID}_{LogicTreeID}"; + var currentTime= DateTime.Now; + var currentYear = currentTime.Year; + var currentMonth = currentTime.Month; + if (currentYear == Year && currentMonth == Month) + return new EnergyFlowLogicalTreeItemDto(); + + var cacheKey = $"Run_Energy_Flow_GetByLogicTreeIDOfMonth_{CorpID}_{LogicTreeID}_{Year}_{Month}"; var vm_list = MemoryCacheHelper.GetSet(cacheKey, () => { var logicTreeList = new Service.LogicTree().GetExChildAndSelfByID(CorpID, LogicTreeID); @@ -148,11 +154,11 @@ if (validChildren.Count > 0) { var validChildrenStatisticValue = validChildren.Sum(x => x.StatisticValue.Value); - if (vm.LogicalType == IStation.ObjectType.Station) + /*if (vm.LogicalType == IStation.ObjectType.Station) { if (vm.StatisticValue > validChildrenStatisticValue) continue; - } + }*/ vm.StatisticValue = validChildrenStatisticValue; } } -- Gitblit v1.9.3