From 2e55d894612bf869dbf7ce37a08164e48de68bcc Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期二, 25 二月 2025 21:58:23 +0800 Subject: [PATCH] 损失统计bug修复 --- WinFrmUI/Yw.WinFrmUI.Hydro.Core/loss-statistics/04-catalog/HydroLossStatisticsCatalogHelper.cs | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/loss-statistics/04-catalog/HydroLossStatisticsCatalogHelper.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/loss-statistics/04-catalog/HydroLossStatisticsCatalogHelper.cs index 2a57185..71c7877 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/loss-statistics/04-catalog/HydroLossStatisticsCatalogHelper.cs +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/loss-statistics/04-catalog/HydroLossStatisticsCatalogHelper.cs @@ -94,7 +94,7 @@ { var itemForValve = new HydroLossStatisticsCatalogItemViewModel(); itemForValve.EnergyName = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Valve); - var codes = hydroInfo.Translations.Select(x => x.Code).Distinct().ToList(); + var codes = hydroInfo.Valves.Select(x => x.Code).Distinct().ToList(); var items = allItemList.Where(x => codes.Contains(x.EnergyCode)).ToList(); if (items != null && items.Count > 0) { @@ -111,7 +111,7 @@ { var itemForElbow = new HydroLossStatisticsCatalogItemViewModel(); itemForElbow.EnergyName = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Elbow); - var codes = hydroInfo.Translations.Select(x => x.Code).Distinct().ToList(); + var codes = hydroInfo.Elbows.Select(x => x.Code).Distinct().ToList(); var items = allItemList.Where(x => codes.Contains(x.EnergyCode)).ToList(); if (items != null && items.Count > 0) { @@ -128,7 +128,7 @@ { var itemForThreelink = new HydroLossStatisticsCatalogItemViewModel(); itemForThreelink.EnergyName = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Threelink); - var codes = hydroInfo.Translations.Select(x => x.Code).Distinct().ToList(); + var codes = hydroInfo.Threelinks.Select(x => x.Code).Distinct().ToList(); var items = allItemList.Where(x => codes.Contains(x.EnergyCode)).ToList(); if (items != null && items.Count > 0) { @@ -145,7 +145,7 @@ { var itemForFourlink = new HydroLossStatisticsCatalogItemViewModel(); itemForFourlink.EnergyName = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Fourlink); - var codes = hydroInfo.Translations.Select(x => x.Code).Distinct().ToList(); + var codes = hydroInfo.Fourlinks.Select(x => x.Code).Distinct().ToList(); var items = allItemList.Where(x => codes.Contains(x.EnergyCode)).ToList(); if (items != null && items.Count > 0) { @@ -162,7 +162,7 @@ { var itemForExchanger = new HydroLossStatisticsCatalogItemViewModel(); itemForExchanger.EnergyName = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Exchanger); - var codes = hydroInfo.Translations.Select(x => x.Code).Distinct().ToList(); + var codes = hydroInfo.Exchangers.Select(x => x.Code).Distinct().ToList(); var items = allItemList.Where(x => codes.Contains(x.EnergyCode)).ToList(); if (items != null && items.Count > 0) { @@ -179,7 +179,7 @@ { var itemForCompressor = new HydroLossStatisticsCatalogItemViewModel(); itemForCompressor.EnergyName = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Compressor); - var codes = hydroInfo.Translations.Select(x => x.Code).Distinct().ToList(); + var codes = hydroInfo.Compressors.Select(x => x.Code).Distinct().ToList(); var items = allItemList.Where(x => codes.Contains(x.EnergyCode)).ToList(); if (items != null && items.Count > 0) { -- Gitblit v1.9.3