ソースを参照

fix(cockpit): 运行信息指标编码不再引用退役列名

Kazerin 3 週間 前
親
コミット
b417b5c77c

+ 1 - 1
pipe-network-service/zksy-admin/src/test/java/com/zksy/web/controller/cockpit/BusinessCockpitInfrastructureOperatingInformationAdapterTest.java

@@ -97,7 +97,7 @@ class BusinessCockpitInfrastructureOperatingInformationAdapterTest {
 
         CockpitInfrastructureOperatingInformationSnapshot.SourceMetric pipeMetric =
                 snapshot.getMetrics().stream()
-                        .filter(item -> "water_supply_pipe_length".equals(item.getMetricCode()))
+                        .filter(item -> "water_supply_pipe_network_length".equals(item.getMetricCode()))
                         .findFirst()
                         .orElseThrow(AssertionError::new);
         assertEquals(new BigDecimal("2500"), pipeMetric.getValue());

+ 1 - 1
pipe-network-service/zksy-system/src/main/java/com/zksy/cockpit/infrastructure/BusinessCockpitInfrastructureOperatingInformationAdapter.java

@@ -111,7 +111,7 @@ public class BusinessCockpitInfrastructureOperatingInformationAdapter
             String sampledAt = format(pipe.getUpdateTime());
             latestUpdatedAt = latest(latestUpdatedAt, sampledAt);
             metrics.add(metric(
-                    metricCode(industry, "pipe_length"),
+                    metricCode(industry, "pipe_network_length"),
                     isBlank(pipe.getNetworkName()) ? "管网长度" : pipe.getNetworkName() + "长度",
                     "CAPACITY",
                     "m",