ningshuxia
2022-12-01 391e0e408d09e698850eb5daaef485d088612b4f
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;
                        }
                    }