| | |
| | | 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); |
| | |
| | | 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; |
| | | } |
| | | } |