Просмотр исходного кода

feat(cockpit): 运行信息补窨井指标并移除燃气管点来源

Kazerin 2 недель назад
Родитель
Сommit
3962e9aeab

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

@@ -6,7 +6,9 @@ import com.zksy.WaterSupply.WaterPlantInfo.service.IWaterPlantInfoService;
 import com.zksy.WaterSupply.WaterPumpStation.domain.PumpStationType;
 import com.zksy.WaterSupply.WaterPumpStation.domain.WaterPumpStation;
 import com.zksy.WaterSupply.WaterPumpStation.service.IWaterPumpStationService;
+import com.zksy.base.domain.ManholeBase;
 import com.zksy.base.domain.PipeNetworkBase;
+import com.zksy.base.service.ManholeBaseService;
 import com.zksy.base.service.PipeNetworkBaseService;
 import com.zksy.cockpit.infrastructure.BusinessCockpitInfrastructureOperatingInformationAdapter;
 import com.zksy.cockpit.infrastructure.CockpitInfrastructureOperatingInformationSnapshot;
@@ -35,6 +37,7 @@ class BusinessCockpitInfrastructureOperatingInformationAdapterTest {
     private IWaterPumpStationService pumpStationService;
     private PipeNetworkBaseService pipeNetworkBaseService;
     private EngineeringFacilityService engineeringFacilityService;
+    private ManholeBaseService manholeBaseService;
     private BusinessCockpitInfrastructureOperatingInformationAdapter adapter;
 
     @BeforeEach
@@ -43,8 +46,10 @@ class BusinessCockpitInfrastructureOperatingInformationAdapterTest {
         pumpStationService = mock(IWaterPumpStationService.class);
         pipeNetworkBaseService = mock(PipeNetworkBaseService.class);
         engineeringFacilityService = mock(EngineeringFacilityService.class);
+        manholeBaseService = mock(ManholeBaseService.class);
         adapter = new BusinessCockpitInfrastructureOperatingInformationAdapter(
-                plantService, pumpStationService, pipeNetworkBaseService, engineeringFacilityService);
+                plantService, pumpStationService, pipeNetworkBaseService, engineeringFacilityService,
+                manholeBaseService);
     }
 
     @Test
@@ -136,10 +141,57 @@ class BusinessCockpitInfrastructureOperatingInformationAdapterTest {
         assertEquals("unknown_pipe_network_length", snapshot.getMetrics().get(2).getMetricCode());
     }
 
-    /** 业务 GIS 权威编码 {@code 0/1/2} 必须全部映射出正确行业(执行票 20 现象 1)。 */
+    /**
+     * 窨井必须作为 MANHOLE 指标下发(维护者 2026-11-12)。
+     *
+     * <p>原话:「基础设施-运行信息中,窨井相关的统计没有正确显示在窨井数量和设施台账中
+     * (上方菜单选择筛选窨井后)」。旧实现只产 水厂/泵站/管网/排水设施 四类,
+     * 这个端点对 MANHOLE 恒为 `EMPTY`,所以筛「窨井」后设施台账是空的。</p>
+     *
+     * <p>口径与排水工程设施一致:**一个窨井一条指标**(本类指标是"按设施实体逐条",不做二次聚合),
+     * 值固定为 1,单位「座」,`facilityKind` 用 {@code MANHOLE}。</p>
+     */
     @Test
-    void mapsAllAuthoritativeGisNetworkTypeCodesToIndustries() {
+    void emitsOneManholeMetricPerFacility() {
         when(plantService.list()).thenReturn(Collections.emptyList());
+        when(pumpStationService.list(any(Wrapper.class))).thenReturn(Collections.emptyList());
+        when(pipeNetworkBaseService.list()).thenReturn(Collections.emptyList());
+        when(engineeringFacilityService.list()).thenReturn(Collections.emptyList());
+        when(manholeBaseService.list()).thenReturn(Arrays.asList(
+                manhole("MH-001", "沅陵县窨井001", "FINE"),
+                manhole("MH-002", "沅陵县窨井002", "BROKEN")));
+
+        CockpitInfrastructureOperatingInformationSnapshot snapshot = adapter.load();
+
+        assertEquals(2, snapshot.getMetrics().size(), "一个窨井一条指标,不合并成一条总数");
+        CockpitInfrastructureOperatingInformationSnapshot.SourceMetric first = snapshot.getMetrics().get(0);
+        assertEquals("MANHOLE", first.getIndustry());
+        assertEquals("MANHOLE", first.getFacilityKind());
+        assertEquals("manhole_point_count", first.getMetricCode());
+        assertEquals("座", first.getUnit());
+        assertEquals(BigDecimal.ONE, first.getValue());
+        assertEquals("MH-001", first.getFacilityId());
+        assertFalse(first.isAbnormal(), "状态正常(0)不算异常");
+        assertTrue(snapshot.getMetrics().get(1).isAbnormal(), "非 0 状态如实标记为异常");
+    }
+
+    /** 没有窨井时不产指标(不拿 0 凑数)。 */
+    @Test
+    void emitsNoManholeMetricWhenThereAreNone() {
+        when(plantService.list()).thenReturn(Collections.emptyList());
+        when(pumpStationService.list(any(Wrapper.class))).thenReturn(Collections.emptyList());
+        when(pipeNetworkBaseService.list()).thenReturn(Collections.emptyList());
+        when(engineeringFacilityService.list()).thenReturn(Collections.emptyList());
+        when(manholeBaseService.list()).thenReturn(Collections.emptyList());
+
+        CockpitInfrastructureOperatingInformationSnapshot snapshot = adapter.load();
+
+        assertTrue(snapshot.getMetrics().isEmpty());
+    }
+
+    /** 业务 GIS 权威编码 {@code 0/1/2} 必须全部映射出正确行业(执行票 20 现象 1)。 */
+    @Test
+    void mapsAllAuthoritativeGisNetworkTypeCodesToIndustries() {        when(plantService.list()).thenReturn(Collections.emptyList());
         when(pumpStationService.list(any(Wrapper.class))).thenReturn(Collections.emptyList());
         when(pipeNetworkBaseService.list()).thenReturn(Arrays.asList(
                 pipe("P-GAS", "燃气管线", "0", "500"),
@@ -154,8 +206,17 @@ class BusinessCockpitInfrastructureOperatingInformationAdapterTest {
                 .collect(Collectors.toList()));
     }
 
-    private static PipeNetworkBase pipe(String code, String name, String type, String length) {
-        PipeNetworkBase pipe = new PipeNetworkBase();
+    private static ManholeBase manhole(String code, String name, String status) {
+        ManholeBase manhole = new ManholeBase();
+        manhole.setManholeId("ID-" + code);
+        manhole.setManholeCode(code);
+        manhole.setManholeName(name);
+        manhole.setStatus(status);
+        manhole.setUpdateTime(LocalDateTime.parse("2026-11-16T10:00:00"));
+        return manhole;
+    }
+
+    private static PipeNetworkBase pipe(String code, String name, String type, String length) {        PipeNetworkBase pipe = new PipeNetworkBase();
         pipe.setNetworkCode(code);
         pipe.setNetworkName(name);
         pipe.setNetworkType(type);

+ 7 - 50
pipe-network-service/zksy-admin/src/test/java/com/zksy/web/controller/cockpit/CockpitDeviceFacilityRelationContractTest.java

@@ -1,17 +1,11 @@
 package com.zksy.web.controller.cockpit;
 
 import com.zksy.base.domain.EquipmentBase;
-import com.zksy.base.domain.GasPipePoint;
-import com.zksy.base.domain.GasPipePointDeviceRel;
 import com.zksy.base.domain.ManholeBase;
 import com.zksy.base.domain.ManholeDeviceRel;
-import com.zksy.base.domain.PipeNetworkBase;
-import com.zksy.base.mapper.GasPipePointDeviceRelMapper;
 import com.zksy.base.mapper.ManholeDeviceRelMapper;
 import com.zksy.base.service.EquipmentBaseService;
-import com.zksy.base.service.GasPipePointService;
 import com.zksy.base.service.ManholeBaseService;
-import com.zksy.base.service.PipeNetworkBaseService;
 import com.zksy.cockpit.relation.CockpitDeviceFacilityRelationService;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -47,23 +41,17 @@ class CockpitDeviceFacilityRelationContractTest {
     private static final String URL = "/api/cockpit/v1/device-facility-relations";
 
     private ManholeDeviceRelMapper manholeRelationMapper;
-    private GasPipePointDeviceRelMapper gasPipePointRelationMapper;
     private ManholeBaseService manholes;
-    private GasPipePointService gasPipePoints;
-    private PipeNetworkBaseService pipeNetworks;
     private EquipmentBaseService equipments;
     private MockMvc mockMvc;
 
     @BeforeEach
     void setUp() {
         manholeRelationMapper = mock(ManholeDeviceRelMapper.class);
-        gasPipePointRelationMapper = mock(GasPipePointDeviceRelMapper.class);
         manholes = mock(ManholeBaseService.class);
-        gasPipePoints = mock(GasPipePointService.class);
-        pipeNetworks = mock(PipeNetworkBaseService.class);
         equipments = mock(EquipmentBaseService.class);
         CockpitDeviceFacilityRelationService service = new CockpitDeviceFacilityRelationService(
-                manholeRelationMapper, gasPipePointRelationMapper, manholes, gasPipePoints, pipeNetworks, equipments,
+                manholeRelationMapper, manholes, equipments,
                 // 2026-10-22T02:00:00Z == 10:00:00+08:00
                 Clock.fixed(Instant.parse("2026-10-22T02:00:00Z"), ZoneOffset.UTC));
         mockMvc = MockMvcBuilders.standaloneSetup(new CockpitDeviceFacilityRelationController(service)).build();
@@ -75,23 +63,16 @@ class CockpitDeviceFacilityRelationContractTest {
                 manholeRelation("M-1", "EQ-1"),
                 manholeRelation("M-LEGACY-DEVICE-ID", "EQ-2"),   // 不是 manhole_base 主键 → 跳过
                 manholeRelation("M-1", "EQ-UNKNOWN")));           // 设备查不到 → deviceCode=null
-        when(gasPipePointRelationMapper.selectList(any())).thenReturn(Arrays.asList(
-                gasRelation(49L, "EQ-1"),
-                gasRelation(50L, "EQ-1"),                         // 管段主键悬空 → 跳过
-                gasRelation(51L, "EQ-1")));                       // 管点不存在 → 跳过
         when(manholes.listByIds(any())).thenReturn(Collections.singletonList(manhole("M-1")));
         when(equipments.listByIds(any())).thenReturn(Arrays.asList(equipment("EQ-1", "DEV-1")));
-        when(gasPipePoints.listByIds(any())).thenReturn(Arrays.asList(
-                gasPoint(49L, "NET-1"), gasPoint(50L, "NET-DANGLING")));
-        when(pipeNetworks.listByIds(any())).thenReturn(Collections.singletonList(network("NET-1")));
 
         mockMvc.perform(get(URL))
                 .andExpect(status().isOk())
                 .andExpect(jsonPath("$.code").value(200))
                 .andExpect(jsonPath("$.data.readOnly").value(true))
                 .andExpect(jsonPath("$.data.generatedAt").value("2026-10-22T10:00:00+08:00"))
-                .andExpect(jsonPath("$.data.relations.length()").value(3))
-                // 窨井用 manholeId,燃气管点用所属管段 networkId
+                .andExpect(jsonPath("$.data.relations.length()").value(2))
+                // 窨井用 manholeId 作为设施主键
                 .andExpect(jsonPath("$.data.relations[0].deviceCode").value("DEV-1"))
                 .andExpect(jsonPath("$.data.relations[0].facilityCode").value("M-1"))
                 .andExpect(jsonPath("$.data.relations[0].facilityKind").value("MANHOLE"))
@@ -99,14 +80,12 @@ class CockpitDeviceFacilityRelationContractTest {
                 // 设备查不到时如实回 null,不编造编码
                 .andExpect(jsonPath("$.data.relations[1].deviceId").value("EQ-UNKNOWN"))
                 .andExpect(jsonPath("$.data.relations[1].deviceCode").value(nullValue()))
-                .andExpect(jsonPath("$.data.relations[2].facilityCode").value("NET-1"))
-                .andExpect(jsonPath("$.data.relations[2].facilityKind").value("PIPE"))
-                .andExpect(jsonPath("$.data.relations[2].relationType").value("GAS_PIPE_POINT_DEVICE"))
                 .andExpect(jsonPath("$.data.statistics.manholeRelationRows").value(3))
-                .andExpect(jsonPath("$.data.statistics.gasPipePointRelationRows").value(3))
-                .andExpect(jsonPath("$.data.statistics.returnedRelationCount").value(3))
+                // 燃气管点来源已移除:这两个计数恒为 0(字段保留以不断开既有契约)
+                .andExpect(jsonPath("$.data.statistics.gasPipePointRelationRows").value(0))
+                .andExpect(jsonPath("$.data.statistics.skippedGasPipeNetworkMissing").value(0))
+                .andExpect(jsonPath("$.data.statistics.returnedRelationCount").value(2))
                 .andExpect(jsonPath("$.data.statistics.skippedManholeFacilityMissing").value(1))
-                .andExpect(jsonPath("$.data.statistics.skippedGasPipeNetworkMissing").value(2))
                 .andExpect(jsonPath("$.data.statistics.skippedDeviceIdMissing").value(0))
                 .andExpect(jsonPath("$.data.statistics.deviceCodeUnresolved").value(1));
     }
@@ -114,7 +93,6 @@ class CockpitDeviceFacilityRelationContractTest {
     @Test
     void noRelationsIsEmptyArrayNotError() throws Exception {
         when(manholeRelationMapper.selectList(any())).thenReturn(Collections.emptyList());
-        when(gasPipePointRelationMapper.selectList(any())).thenReturn(Collections.emptyList());
 
         mockMvc.perform(get(URL))
                 .andExpect(status().isOk())
@@ -142,33 +120,12 @@ class CockpitDeviceFacilityRelationContractTest {
         return relation;
     }
 
-    private static GasPipePointDeviceRel gasRelation(Long pointId, String equipmentId) {
-        GasPipePointDeviceRel relation = new GasPipePointDeviceRel();
-        relation.setPointId(pointId);
-        relation.setEquipmentId(equipmentId);
-        relation.setDelFlag("0");
-        return relation;
-    }
-
     private static ManholeBase manhole(String manholeId) {
         ManholeBase manhole = new ManholeBase();
         manhole.setManholeId(manholeId);
         return manhole;
     }
 
-    private static GasPipePoint gasPoint(Long pointId, String networkId) {
-        GasPipePoint point = new GasPipePoint();
-        point.setPointId(pointId);
-        point.setNetworkId(networkId);
-        return point;
-    }
-
-    private static PipeNetworkBase network(String networkId) {
-        PipeNetworkBase network = new PipeNetworkBase();
-        network.setNetworkId(networkId);
-        return network;
-    }
-
     private static EquipmentBase equipment(String equipmentId, String equipmentCode) {
         EquipmentBase equipment = new EquipmentBase();
         equipment.setEquipmentId(equipmentId);

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

@@ -1,6 +1,6 @@
 package com.zksy.web.controller.cockpit;
 
-import com.zksy.base.service.GasPipePointService;
+
 import com.zksy.base.service.ManholeBaseService;
 import com.zksy.base.service.PipeNetworkBaseService;
 import com.zksy.cockpit.foundation.CockpitReadException;
@@ -44,12 +44,12 @@ class CockpitFacilityGeometryControllerTest {
     @Test
     void returnsGeoJsonInsideTheExistingAjaxEnvelopeWithoutRequiringAnAuthorizationHeader() throws Exception {
         PipeNetworkBaseService networks = mock(PipeNetworkBaseService.class);
-        GasPipePointService points = mock(GasPipePointService.class);
+        
         ManholeBaseService manholes = mock(ManholeBaseService.class);
         when(networks.list()).thenReturn(Collections.emptyList());
-        when(points.list()).thenReturn(Collections.emptyList());
+
         when(manholes.list()).thenReturn(Collections.emptyList());
-        CockpitFacilityGeometryResponse response = new CockpitFacilityGeometryService(networks, points, manholes,
+        CockpitFacilityGeometryResponse response = new CockpitFacilityGeometryService(networks, manholes,
                 Clock.fixed(Instant.parse("2026-10-12T02:00:00Z"), ZoneOffset.UTC)).load();
         when(service.load()).thenReturn(response);
         mvc.perform(get(URL))
@@ -97,7 +97,7 @@ class CockpitFacilityGeometryControllerTest {
     @Test
     void serializesActualServicePointAndLineCoordinatesInLongitudeLatitudeOrder() throws Exception {
         PipeNetworkBaseService networks = mock(PipeNetworkBaseService.class);
-        GasPipePointService points = mock(GasPipePointService.class);
+        
         ManholeBaseService manholes = mock(ManholeBaseService.class);
         com.zksy.base.domain.PipeNetworkBase line = new com.zksy.base.domain.PipeNetworkBase();
         line.setNetworkId("gas-line");
@@ -107,16 +107,16 @@ class CockpitFacilityGeometryControllerTest {
         line.setStartLatitude(new BigDecimal("28.420"));
         line.setEndLongitude(new BigDecimal("110.420"));
         line.setEndLatitude(new BigDecimal("28.460"));
-        com.zksy.base.domain.GasPipePoint point = new com.zksy.base.domain.GasPipePoint();
-        point.setPointId(1L);
-        point.setPointType("三通");
-        point.setNetworkId("gas-line");
-        point.setLongitude(new BigDecimal("110.440"));
-        point.setLatitude(new BigDecimal("28.450"));
+        // 点要素样例改用窨井:燃气管点来源已移除,它才是现在唯一的点来源。
+        com.zksy.base.domain.ManholeBase well = new com.zksy.base.domain.ManholeBase();
+        well.setManholeId("well-1");
+        well.setManholeCode("MH-001");
+        well.setNetworkId("gas-line");
+        well.setLongitude(new BigDecimal("110.440"));
+        well.setLatitude(new BigDecimal("28.450"));
         when(networks.list()).thenReturn(Collections.singletonList(line));
-        when(points.list()).thenReturn(Collections.singletonList(point));
-        when(manholes.list()).thenReturn(Collections.emptyList());
-        CockpitFacilityGeometryService actual = new CockpitFacilityGeometryService(networks, points, manholes,
+        when(manholes.list()).thenReturn(Collections.singletonList(well));
+        CockpitFacilityGeometryService actual = new CockpitFacilityGeometryService(networks, manholes,
                 Clock.fixed(Instant.parse("2026-10-12T02:00:00Z"), ZoneOffset.UTC));
         mvc = MockMvcBuilders.standaloneSetup(new CockpitFacilityGeometryController(actual,
                 Clock.fixed(Instant.parse("2026-10-12T02:00:00Z"), ZoneOffset.UTC))).build();
@@ -135,7 +135,7 @@ class CockpitFacilityGeometryControllerTest {
                 .andExpect(jsonPath("$.data.features[1].geometry.coordinates", hasSize(2)))
                 .andExpect(jsonPath("$.data.features[1].geometry.coordinates[0]").value(110.440))
                 .andExpect(jsonPath("$.data.features[1].geometry.coordinates[1]").value(28.450))
-                .andExpect(jsonPath("$.data.features[1].properties.pointType").value("三通"))
+                .andExpect(jsonPath("$.data.features[1].properties.industry").value("MANHOLE"))
                 .andExpect(jsonPath("$.data.features[1].properties.networkId").value("gas-line"))
                 // 2026-10-12 契约:区内坐标自动准入 → VALID/可上图。
                 .andExpect(jsonPath("$.data.features[1].properties.coordinateValidation.state").value("VALID"))

+ 40 - 57
pipe-network-service/zksy-admin/src/test/java/com/zksy/web/controller/cockpit/CockpitFacilityGeometryServiceTest.java

@@ -1,9 +1,7 @@
 package com.zksy.web.controller.cockpit;
 
-import com.zksy.base.domain.GasPipePoint;
 import com.zksy.base.domain.ManholeBase;
 import com.zksy.base.domain.PipeNetworkBase;
-import com.zksy.base.service.GasPipePointService;
 import com.zksy.base.service.ManholeBaseService;
 import com.zksy.base.service.PipeNetworkBaseService;
 import com.zksy.cockpit.foundation.CockpitReadException;
@@ -30,19 +28,16 @@ import static org.mockito.Mockito.*;
 
 class CockpitFacilityGeometryServiceTest {
     private PipeNetworkBaseService networks;
-    private GasPipePointService points;
     private ManholeBaseService manholes;
     private CockpitFacilityGeometryService service;
 
     @BeforeEach
     void setUp() {
         networks = mock(PipeNetworkBaseService.class);
-        points = mock(GasPipePointService.class);
         manholes = mock(ManholeBaseService.class);
         when(networks.list()).thenReturn(Collections.emptyList());
-        when(points.list()).thenReturn(Collections.emptyList());
         when(manholes.list()).thenReturn(Collections.emptyList());
-        service = new CockpitFacilityGeometryService(networks, points, manholes,
+        service = new CockpitFacilityGeometryService(networks, manholes,
                 Clock.fixed(Instant.parse("2026-10-12T02:00:00Z"), ZoneOffset.UTC));
     }
 
@@ -50,9 +45,6 @@ class CockpitFacilityGeometryServiceTest {
     void readsAllThreeIndustriesAsActualTwoEndpointLinesWithoutInventingTopology() {
         when(networks.list()).thenReturn(Arrays.asList(network("same-id", "0"), network("water", "2"),
                 network("drain", "1"), network("unknown", "3")));
-        GasPipePoint point = point(1L, "三通");
-        point.setNetworkId("same-id");
-        when(points.list()).thenReturn(Collections.singletonList(point));
         ManholeBase manhole = new ManholeBase();
         manhole.setManholeId("same-id");
         manhole.setLongitude(new BigDecimal("110.440"));
@@ -62,9 +54,10 @@ class CockpitFacilityGeometryServiceTest {
         CockpitFacilityGeometryResponse response = service.load();
         assertEquals("FeatureCollection", response.getType());
         assertEquals("2026-10-12T10:00:00+08:00", response.getGeneratedAt());
-        assertEquals(6, response.getFeatures().size());
-        assertEquals(6, response.getFeatures().stream().map(Feature::getId).distinct().count());
-        assertEquals(Arrays.asList("GAS", "WATER_SUPPLY", "DRAINAGE", "UNKNOWN", "GAS", "MANHOLE"),
+        // 4 条管网线 + 1 个窨井点(燃气管点来源已移除,不再有第 6 个要素)
+        assertEquals(5, response.getFeatures().size());
+        assertEquals(5, response.getFeatures().stream().map(Feature::getId).distinct().count());
+        assertEquals(Arrays.asList("GAS", "WATER_SUPPLY", "DRAINAGE", "UNKNOWN", "MANHOLE"),
                 response.getFeatures().stream().map(item -> item.getProperties().getIndustry()).collect(Collectors.toList()));
         Feature gas = response.getFeatures().get(0);
         assertEquals("LineString", gas.getGeometry().getType());
@@ -73,15 +66,12 @@ class CockpitFacilityGeometryServiceTest {
         assertEquals("GAS_PIPE", gas.getProperties().getTypeCode());
         assertEquals("PIPE_UNCLASSIFIED", response.getFeatures().get(3).getProperties().getTypeCode());
         assertEquals("3", response.getFeatures().get(3).getProperties().getNetworkType());
-        Feature component = response.getFeatures().get(4);
-        assertEquals("Point", component.getGeometry().getType());
-        assertEquals("三通", component.getProperties().getPointType());
-        assertEquals(gas.getProperties().getNetworkId(), component.getProperties().getNetworkId());
+        // 燃气管点已移除:GAS 的点要素覆盖必须如实标为 UNAVAILABLE(不冒充"这里没有管线")
+        assertEquals("UNAVAILABLE", coverage(response, "GAS", "Point").getState());
         assertEquals(1, coverage(response, "UNKNOWN", "LineString").getRecordCount());
         verify(networks).list();
-        verify(points).list();
         verify(manholes).list();
-        verifyNoMoreInteractions(networks, points, manholes);
+        verifyNoMoreInteractions(networks, manholes);
     }
 
     @Test
@@ -91,14 +81,11 @@ class CockpitFacilityGeometryServiceTest {
         PipeNetworkBase missing = network("missing-diameter", "0");
         PipeNetworkBase zero = network("zero-diameter", "0");
         zero.setDiameter(BigDecimal.ZERO);
-        GasPipePoint point = point(7L, "阀门");
-        point.setDiameter(new BigDecimal("125.25"));
         ManholeBase well = new ManholeBase();
         well.setManholeId("well");
         well.setLongitude(new BigDecimal("110.440"));
         well.setLatitude(new BigDecimal("28.450"));
         when(networks.list()).thenReturn(Arrays.asList(known, missing, zero));
-        when(points.list()).thenReturn(Collections.singletonList(point));
         when(manholes.list()).thenReturn(Collections.singletonList(well));
         com.fasterxml.jackson.databind.JsonNode json = new com.fasterxml.jackson.databind.ObjectMapper()
                 .valueToTree(service.load());
@@ -108,8 +95,8 @@ class CockpitFacilityGeometryServiceTest {
         assertTrue(json.get("features").get(1).get("properties").has("diameter"));
         assertTrue(json.get("features").get(1).get("properties").get("diameter").isNull());
         assertEquals(0, json.get("features").get(2).get("properties").get("diameter").asInt());
-        assertEquals(125.25, json.get("features").get(3).get("properties").get("diameter").asDouble());
-        assertTrue(json.get("features").get(4).get("properties").get("diameter").isNull());
+        // 窨井没有管径语义 → 如实为 null(曾经的管点直径来源已移除)
+        assertTrue(json.get("features").get(3).get("properties").get("diameter").isNull());
         assertEquals(new BigDecimal("400.50"), known.getDiameter());
         assertNull(missing.getDiameter());
         verify(networks).list();
@@ -158,19 +145,21 @@ class CockpitFacilityGeometryServiceTest {
         verifyNoMoreInteractions(networks);
     }
 
+    /**
+     * 燃气管点来源移除后,GAS 的**点**要素不再产出任何构件(维护者 2026-11-16)。
+     *
+     * <p>原用例逐个校验 阀门/调压/三通… 等 pointType 原样透传;来源删掉后这些断言
+     * 已无生产对象可测。保留的契约是:不产要素、且覆盖统计如实说「没有这个来源」。</p>
+     */
     @Test
-    void preservesEveryComponentTypeIncludingUnknownAndMissingTypesWithoutFabricatingNodes() {
-        List<String> types = Arrays.asList("阀门", "调压", "计量", "阴极保护", "弯头", "三通", "其它", "未知原始值", null);
-        List<GasPipePoint> records = new java.util.ArrayList<>();
-        for (int i = 0; i < types.size(); i++) {
-            records.add(point((long) i, types.get(i)));
-        }
-        when(points.list()).thenReturn(records);
+    void gasPointComponentsAreNotProducedAnymore() {
+        when(networks.list()).thenReturn(Collections.singletonList(network("gas-line", "0")));
         CockpitFacilityGeometryResponse response = service.load();
-        assertEquals(types, response.getFeatures().stream()
-                .map(item -> item.getProperties().getPointType()).collect(Collectors.toList()));
-        assertEquals(types.size(), response.getFeatures().size());
-        assertTrue(response.getFeatures().stream().allMatch(item -> item.getProperties().getNetworkId() == null));
+        assertTrue(response.getFeatures().stream().noneMatch(item -> "Point".equals(item.getGeometry() == null
+                ? null : item.getGeometry().getType())),
+                "不再产出点要素");
+        assertEquals("UNAVAILABLE", coverage(response, "GAS", "Point").getState());
+        assertEquals("NO_COMPONENT_SOURCE", coverage(response, "GAS", "Point").getReason());
     }
 
     @ParameterizedTest
@@ -179,10 +168,11 @@ class CockpitFacilityGeometryServiceTest {
             "110.4,-91,LATITUDE_OUT_OF_RANGE", "0,0,ZERO_COORDINATE"})
     void invalidPointsStayInTheCollectionWithNullGeometryAndSpecificReason(String longitude, String latitude,
             String reason) {
-        GasPipePoint point = point(1L, "阀门");
-        point.setLongitude(decimal(longitude));
-        point.setLatitude(decimal(latitude));
-        when(points.list()).thenReturn(Collections.singletonList(point));
+        ManholeBase manhole = new ManholeBase();
+        manhole.setManholeId("invalid-point");
+        manhole.setLongitude(decimal(longitude));
+        manhole.setLatitude(decimal(latitude));
+        when(manholes.list()).thenReturn(Collections.singletonList(manhole));
         Feature feature = service.load().getFeatures().get(0);
         assertNull(feature.getGeometry());
         assertEquals("INVALID", feature.getProperties().getCoordinateValidation().getState());
@@ -216,12 +206,15 @@ class CockpitFacilityGeometryServiceTest {
     @Test
     void outsidePrimaryAreaIsRejectedWhileInAreaCoordinatesRender() {
         when(networks.list()).thenReturn(Collections.singletonList(network("line", "0")));
-        when(points.list()).thenReturn(Collections.singletonList(point(1L, "阀门")));
-        ManholeBase manhole = new ManholeBase();
-        manhole.setManholeId("well");
-        manhole.setLongitude(new BigDecimal("-180"));
-        manhole.setLatitude(new BigDecimal("90"));
-        when(manholes.list()).thenReturn(Collections.singletonList(manhole));
+        ManholeBase inside = new ManholeBase();
+        inside.setManholeId("inside-well");
+        inside.setLongitude(new BigDecimal("110.440"));
+        inside.setLatitude(new BigDecimal("28.450"));
+        ManholeBase outsideWell = new ManholeBase();
+        outsideWell.setManholeId("outside-well");
+        outsideWell.setLongitude(new BigDecimal("-180"));
+        outsideWell.setLatitude(new BigDecimal("90"));
+        when(manholes.list()).thenReturn(Arrays.asList(inside, outsideWell));
 
         CockpitFacilityGeometryResponse response = service.load();
 
@@ -248,8 +241,8 @@ class CockpitFacilityGeometryServiceTest {
         assertTrue(coverage(response, "GAS", "LineString").getRenderableCount() > 0,
                 "区内线段必须计入可渲染统计");
         assertEquals(1, coverage(response, "GAS", "LineString").getRenderableCount());
-        assertEquals(1, coverage(response, "GAS", "Point").getRenderableCount());
-        assertEquals(0, coverage(response, "MANHOLE", "Point").getRenderableCount());
+        assertEquals(1, coverage(response, "MANHOLE", "Point").getRenderableCount());
+        assertEquals("UNAVAILABLE", coverage(response, "GAS", "Point").getState());
     }
 
     @Test
@@ -269,10 +262,9 @@ class CockpitFacilityGeometryServiceTest {
     @Test
     void aFailedSourceNeverProducesAnEmptyOrPartialSuccess() {
         when(networks.list()).thenReturn(Collections.singletonList(network("line", "0")));
-        when(points.list()).thenThrow(new IllegalStateException("private database detail"));
+        when(manholes.list()).thenThrow(new IllegalStateException("private database detail"));
         CockpitReadException failure = assertThrows(CockpitReadException.class, service::load);
         assertEquals("facility geometry source unavailable", failure.getMessage());
-        verifyNoInteractions(manholes);
     }
 
     @Test
@@ -298,15 +290,6 @@ class CockpitFacilityGeometryServiceTest {
         return network;
     }
 
-    private static GasPipePoint point(Long id, String type) {
-        GasPipePoint point = new GasPipePoint();
-        point.setPointId(id);
-        point.setPointType(type);
-        point.setLongitude(new BigDecimal("110.360"));
-        point.setLatitude(new BigDecimal("28.420"));
-        return point;
-    }
-
     private static BigDecimal decimal(String value) {
         return value == null ? null : new BigDecimal(value);
     }

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

@@ -86,7 +86,8 @@ class CockpitPipeNetworkCrossEndpointContractTest {
                 new BusinessCockpitInfrastructureManagementInformationAdapter(equipment, equipmentTypes, catalog),
                 CLOCK).load("management", null, null));
         JsonNode operating = JSON.valueToTree(new CockpitInfrastructureOperatingInformationService(
-                new BusinessCockpitInfrastructureOperatingInformationAdapter(plants, stations, pipes, engineering),
+                new BusinessCockpitInfrastructureOperatingInformationAdapter(plants, stations, pipes, engineering,
+                        mock(ManholeBaseService.class)),
                 CLOCK, 60).load("operating", null, null, null, null));
         JsonNode overview = JSON.valueToTree(new CockpitOverviewInfrastructureService(
                 new BusinessCockpitOverviewInfrastructureAdapter(equipmentTypes, equipment, catalog),

+ 2 - 51
pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/impl/EquipmentBaseServiceImpl.java

@@ -73,12 +73,6 @@ public class EquipmentBaseServiceImpl extends ServiceImpl<EquipmentBaseMapper, E
     @Autowired
     private ManholeDataMapper manholeDataMapper;
 
-    @Autowired
-    private GasPipePointDeviceRelMapper gasPipePointDeviceRelMapper;
-
-    @Autowired
-    private GasPipePointMapper gasPipePointMapper;
-
     @Autowired
     private PipeNetworkBaseMapper pipeNetworkBaseMapper;
 
@@ -821,30 +815,8 @@ public class EquipmentBaseServiceImpl extends ServiceImpl<EquipmentBaseMapper, E
         Map<String, EquipmentStatus> statusMap = statusList.stream()
                 .collect(Collectors.toMap(EquipmentStatus::getEquipmentId, Function.identity(), (a, b) -> a));
 
-        // 3. 批量查管点-设备关联 (gas_pipe_point_device_rel)
-        List<GasPipePointDeviceRel> allRels = gasPipePointDeviceRelMapper.selectList(
-                new LambdaQueryWrapper<GasPipePointDeviceRel>().in(GasPipePointDeviceRel::getEquipmentId, equipmentIds));
-        Map<String, GasPipePointDeviceRel> relMap = allRels.stream()
-                .collect(Collectors.toMap(GasPipePointDeviceRel::getEquipmentId, Function.identity(), (a, b) -> a));
-
-        // 4. 批量查管点
-        List<Long> pointIds = allRels.stream().map(GasPipePointDeviceRel::getPointId).distinct().collect(Collectors.toList());
-        Map<Long, GasPipePoint> pointMap = new HashMap<>();
-        if (CollUtil.isNotEmpty(pointIds)) {
-            List<GasPipePoint> pointList = gasPipePointMapper.selectBatchIds(pointIds);
-            pointMap = pointList.stream()
-                    .collect(Collectors.toMap(GasPipePoint::getPointId, Function.identity(), (a, b) -> a));
-        }
-
-        // 5. 批量查管线
-        List<String> networkIds = pointMap.values().stream()
-                .map(GasPipePoint::getNetworkId).filter(Objects::nonNull).distinct().collect(Collectors.toList());
-        Map<String, PipeNetworkBase> networkMap = new HashMap<>();
-        if (CollUtil.isNotEmpty(networkIds)) {
-            List<PipeNetworkBase> networkList = pipeNetworkBaseMapper.selectBatchIds(networkIds);
-            networkMap = networkList.stream()
-                    .collect(Collectors.toMap(PipeNetworkBase::getNetworkId, Function.identity(), (a, b) -> a));
-        }
+        // 3. 燃气管点回联已移除(维护者 2026-11-16):gas_pipe_point 在实际页面没有使用场景,
+        //    其用途由 pipe_network_base 的管段覆盖;该链路此前也多为悬空(管点 network_id 指不到管段)。
 
         // 批量查设备类型(用于解析类型名称)
         List<Integer> equipmentTypeIdList = equipmentList.stream()
@@ -879,27 +851,6 @@ public class EquipmentBaseServiceImpl extends ServiceImpl<EquipmentBaseMapper, E
                 vo.setOnlineStatus(0);
             }
 
-            GasPipePointDeviceRel rel = relMap.get(equip.getEquipmentId());
-            if (rel != null) {
-                GasPipePoint point = pointMap.get(rel.getPointId());
-                if (point != null) {
-                    vo.setPointId(point.getPointId());
-                    vo.setPointCode(point.getPointCode());
-                    vo.setPointName(point.getPointName());
-                    vo.setPointType(point.getPointType());
-                    vo.setPointAddress(point.getAddress());
-
-                    PipeNetworkBase network = networkMap.get(point.getNetworkId());
-                    if (network != null) {
-                        vo.setNetworkId(network.getNetworkId());
-                        vo.setNetworkCode(network.getNetworkCode());
-                        vo.setNetworkName(network.getNetworkName());
-                        vo.setNetworkType(network.getNetworkType());
-                        vo.setNetworkLevel(network.getNetworkLevel());
-                    }
-                }
-            }
-
             voList.add(vo);
 
             // 解析设备类型名称

+ 5 - 12
pipe-network-service/zksy-system/src/main/java/com/zksy/cockpit/geometry/CockpitFacilityGeometryService.java

@@ -1,9 +1,7 @@
 package com.zksy.cockpit.geometry;
 
-import com.zksy.base.domain.GasPipePoint;
 import com.zksy.base.domain.ManholeBase;
 import com.zksy.base.domain.PipeNetworkBase;
-import com.zksy.base.service.GasPipePointService;
 import com.zksy.base.service.ManholeBaseService;
 import com.zksy.base.service.PipeNetworkBaseService;
 import com.zksy.cockpit.foundation.CockpitCoordinateValidation;
@@ -31,14 +29,12 @@ import java.util.stream.Collectors;
 @Service
 public class CockpitFacilityGeometryService {
     private final PipeNetworkBaseService networks;
-    private final GasPipePointService gasPoints;
     private final ManholeBaseService manholes;
     private final Clock clock;
 
-    public CockpitFacilityGeometryService(PipeNetworkBaseService networks, GasPipePointService gasPoints,
+    public CockpitFacilityGeometryService(PipeNetworkBaseService networks,
             ManholeBaseService manholes, Clock clock) {
         this.networks = networks;
-        this.gasPoints = gasPoints;
         this.manholes = manholes;
         this.clock = clock;
     }
@@ -59,12 +55,8 @@ public class CockpitFacilityGeometryService {
                                 pair(network.getStartLongitude(), network.getStartLatitude()),
                                 pair(network.getEndLongitude(), network.getEndLatitude()))));
             }
-            for (GasPipePoint point : Objects.requireNonNull(gasPoints.list())) {
-                features.add(feature("gas_pipe_point", String.valueOf(point.getPointId()), point.getPointCode(),
-                        point.getPointName(), "GAS", "GAS_PIPE_POINT", null, null, point.getPointType(),
-                        point.getNetworkId(), point.getDiameter(), null, "Point",
-                        Collections.singletonList(pair(point.getLongitude(), point.getLatitude()))));
-            }
+            // 燃气管点(gas_pipe_point)已移除(维护者 2026-11-16):该表在实际页面没有使用场景,
+            // 其用途由 pipe_network_base 的管段覆盖,不再作为独立点要素上图。
             for (ManholeBase manhole : Objects.requireNonNull(manholes.list())) {
                 features.add(feature("manhole_base", manhole.getManholeId(), manhole.getManholeCode(),
                         manhole.getManholeName(), "MANHOLE", "MANHOLE", null, null, null,
@@ -75,7 +67,8 @@ public class CockpitFacilityGeometryService {
             for (String industry : Arrays.asList("GAS", "WATER_SUPPLY", "DRAINAGE")) {
                 coverage.add(coverage(features, industry, "pipe_network_base", "LineString", "TWO_ENDPOINTS_ONLY"));
             }
-            coverage.add(coverage(features, "GAS", "gas_pipe_point", "Point", null));
+            coverage.add(new Coverage("GAS", null, "Point", "UNAVAILABLE",
+                    "NO_COMPONENT_SOURCE", 0, 0, 0));
             coverage.add(new Coverage("WATER_SUPPLY", null, "Point", "UNAVAILABLE",
                     "NO_COMPONENT_SOURCE", 0, 0, 0));
             coverage.add(new Coverage("DRAINAGE", null, "Point", "UNAVAILABLE",

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

@@ -6,7 +6,9 @@ import com.zksy.WaterSupply.WaterPlantInfo.service.IWaterPlantInfoService;
 import com.zksy.WaterSupply.WaterPumpStation.domain.PumpStationType;
 import com.zksy.WaterSupply.WaterPumpStation.domain.WaterPumpStation;
 import com.zksy.WaterSupply.WaterPumpStation.service.IWaterPumpStationService;
+import com.zksy.base.domain.ManholeBase;
 import com.zksy.base.domain.PipeNetworkBase;
+import com.zksy.base.service.ManholeBaseService;
 import com.zksy.base.service.PipeNetworkBaseService;
 import com.zksy.cockpit.foundation.CockpitPipeNetworkType;
 import com.zksy.drainage.domain.EngineeringFacility;
@@ -44,16 +46,19 @@ public class BusinessCockpitInfrastructureOperatingInformationAdapter
     private final IWaterPumpStationService pumpStationService;
     private final PipeNetworkBaseService pipeNetworkBaseService;
     private final EngineeringFacilityService engineeringFacilityService;
+    private final ManholeBaseService manholeBaseService;
 
     public BusinessCockpitInfrastructureOperatingInformationAdapter(
             IWaterPlantInfoService plantService,
             IWaterPumpStationService pumpStationService,
             PipeNetworkBaseService pipeNetworkBaseService,
-            EngineeringFacilityService engineeringFacilityService) {
+            EngineeringFacilityService engineeringFacilityService,
+            ManholeBaseService manholeBaseService) {
         this.plantService = plantService;
         this.pumpStationService = pumpStationService;
         this.pipeNetworkBaseService = pipeNetworkBaseService;
         this.engineeringFacilityService = engineeringFacilityService;
+        this.manholeBaseService = manholeBaseService;
     }
 
     @Override
@@ -151,6 +156,28 @@ public class BusinessCockpitInfrastructureOperatingInformationAdapter
                     facility.getFacilityId(), facility.getFacilityId(), "ENGINEERING_FACILITY", facility.getStatus()));
         }
 
+        // 窨井(维护者 2026-11-12):本端点此前只产 水厂/泵站/管网/排水设施 四类,筛「窨井」时
+        // 整块 EMPTY、设施台账为空。口径与排水工程设施一致:**一个窨井一条指标**,
+        // 值固定 1(本类指标按设施实体逐条,不做二次聚合),单位「座」。
+        for (ManholeBase manhole : safeList(manholeBaseService.list())) {
+            if (manhole == null || isBlank(manhole.getManholeCode())) {
+                continue;
+            }
+            String sampledAt = format(manhole.getUpdateTime());
+            latestUpdatedAt = latest(latestUpdatedAt, sampledAt);
+            metrics.add(metric(
+                    "manhole_point_count",
+                    isBlank(manhole.getManholeName()) ? "窨井" : manhole.getManholeName(),
+                    "CAPACITY",
+                    "座",
+                    "MANHOLE",
+                    BigDecimal.ONE,
+                    null,
+                    sampledAt,
+                    abnormalStatus(manhole.getStatus()),
+                    manhole.getManholeCode(), manhole.getManholeId(), "MANHOLE", manhole.getStatus()));
+        }
+
         return new CockpitInfrastructureOperatingInformationSnapshot(latestUpdatedAt, metrics);
     }
 

+ 11 - 7
pipe-network-service/zksy-system/src/main/java/com/zksy/cockpit/relation/CockpitDeviceFacilityRelationResponse.java

@@ -10,12 +10,13 @@ import java.util.List;
  * <p>数据来源(只读,不写库、不推导、不猜关联):
  * <ul>
  *   <li>窨井:{@code app_user.manhole_device_rel}(del_flag=0)→ {@code app_user.manhole_base.manhole_id};</li>
- *   <li>燃气管点:{@code app_user.gas_pipe_point_device_rel}(del_flag=0)→ {@code app_user.gas_pipe_point.network_id}
- *       → {@code app_user.pipe_network_base.network_id}(返回**管段**主键,因为前端挂载的是管线);</li>
  *   <li>{@code deviceCode} 取 {@code app_user.equipment_base.equipment_code};查不到时为 null,只回退到
  *       {@code deviceId}(关联表里的 equipment_id 原值),绝不用名字或编码去猜。</li>
  * </ul>
  *
+ * <p><b>燃气管点来源已移除</b>(维护者 2026-11-16):{@code gas_pipe_point} 在实际页面没有使用场景,
+ * 其用途由 {@code pipe_network_base} 的管段覆盖;统计里两个 gas 字段保留但恒为 0(见 {@link Statistics})。
+ *
  * <p>降级语义(前端据此判定「真实关联」是否成立):
  * <ul>
  *   <li>关联行的设施主键在设施表里不存在/已删除 → 该条不返回,计入统计 {@code skipped*};</li>
@@ -57,11 +58,11 @@ public class CockpitDeviceFacilityRelationResponse {
         /** 设备编码(equipment_base.equipment_code);查不到时为 null,但字段始终回显(契约稳定)。 */
         @JsonInclude(JsonInclude.Include.ALWAYS)
         private final String deviceCode;
-        /** 设施主键:窨井为 manholeId,燃气管点为所属管段 networkId。 */
+        /** 设施主键:窨井即 manholeId。 */
         private final String facilityCode;
-        /** 设施种类:MANHOLE / PIPE。 */
+        /** 设施种类:现只有 MANHOLE(燃气管点来源已移除)。 */
         private final String facilityKind;
-        /** 关联类型:MANHOLE_DEVICE / GAS_PIPE_POINT_DEVICE。 */
+        /** 关联类型:现只有 MANHOLE_DEVICE(GAS_PIPE_POINT_DEVICE 已随燃气管点移除)。 */
         private final String relationType;
 
         public Relation(String deviceId, String deviceCode, String facilityCode, String facilityKind,
@@ -88,13 +89,16 @@ public class CockpitDeviceFacilityRelationResponse {
     public static class Statistics {
         /** manhole_device_rel 中 del_flag=0 的行数。 */
         private final int manholeRelationRows;
-        /** gas_pipe_point_device_rel 中 del_flag=0 的行数。 */
+        /**
+         * 已**恒为 0**:燃气管点来源随 {@code gas_pipe_point} 一并移除(维护者 2026-11-16)。
+         * 字段保留是为了不让既有 API 约定断开(前端按整体透传,不读具体字段)。
+         */
         private final int gasPipePointRelationRows;
         /** 实际返回的关联条数。 */
         private final int returnedRelationCount;
         /** 因窨井主键在 manhole_base 里查不到(含已删除)而跳过的条数。 */
         private final int skippedManholeFacilityMissing;
-        /** 因管点所属管段 networkId 在 pipe_network_base 里查不到(含已删除)而跳过的条数。 */
+        /** 已**恒为 0**:随燃气管点来源移除,保留字段同 {@link #gasPipePointRelationRows}。 */
         private final int skippedGasPipeNetworkMissing;
         /** 关联行设备主键为空、无法定位设备而跳过的条数。 */
         private final int skippedDeviceIdMissing;

+ 10 - 86
pipe-network-service/zksy-system/src/main/java/com/zksy/cockpit/relation/CockpitDeviceFacilityRelationService.java

@@ -2,17 +2,11 @@ package com.zksy.cockpit.relation;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.zksy.base.domain.EquipmentBase;
-import com.zksy.base.domain.GasPipePoint;
-import com.zksy.base.domain.GasPipePointDeviceRel;
 import com.zksy.base.domain.ManholeBase;
 import com.zksy.base.domain.ManholeDeviceRel;
-import com.zksy.base.domain.PipeNetworkBase;
-import com.zksy.base.mapper.GasPipePointDeviceRelMapper;
 import com.zksy.base.mapper.ManholeDeviceRelMapper;
 import com.zksy.base.service.EquipmentBaseService;
-import com.zksy.base.service.GasPipePointService;
 import com.zksy.base.service.ManholeBaseService;
-import com.zksy.base.service.PipeNetworkBaseService;
 import com.zksy.cockpit.foundation.CockpitReadException;
 import com.zksy.cockpit.relation.CockpitDeviceFacilityRelationResponse.Relation;
 import com.zksy.cockpit.relation.CockpitDeviceFacilityRelationResponse.Statistics;
@@ -38,11 +32,14 @@ import java.util.Set;
  * <p><b>数据来源</b>(只读查询,不写库、不推导):
  * <ol>
  *   <li>窨井:{@code manhole_device_rel.manhole_id} → {@code manhole_base.manhole_id},设施主键即 manholeId;</li>
- *   <li>燃气管点:{@code gas_pipe_point_device_rel.point_id} → {@code gas_pipe_point.network_id}
- *       → {@code pipe_network_base.network_id},返回**管段**主键(前端挂的是管线);</li>
  *   <li>设备编码:{@code equipment_base.equipment_code}(按 rel.equipment_id 精确匹配主键)。</li>
  * </ol>
  *
+ * <p><b>燃气管点已移除</b>(维护者 2026-11-16):{@code gas_pipe_point} 在实际页面没有使用场景,
+ * 其用途由 {@code pipe_network_base} 的管段覆盖。这条链路此前也一直是悬空的
+ * ({@code network_id} 指向的管段在 {@code pipe_network_base} 里不存在,4 条全跳过),
+ * 所以删掉它不减少任何真实可匹配的关联。
+ *
  * <p><b>不编造</b>:只用上表主键做等值解析;解析不到就跳过该条并在 {@link Statistics} 里记缺,
  * 既不按名称/编码猜设施,也不把查不到设备的行填个假 deviceCode。
  *
@@ -55,27 +52,17 @@ public class CockpitDeviceFacilityRelationService {
 
     private static final String SCHEMA_TIME_ZONE = "Asia/Shanghai";
     private static final String FACILITY_KIND_MANHOLE = "MANHOLE";
-    private static final String FACILITY_KIND_PIPE = "PIPE";
     private static final String RELATION_TYPE_MANHOLE_DEVICE = "MANHOLE_DEVICE";
-    private static final String RELATION_TYPE_GAS_PIPE_POINT_DEVICE = "GAS_PIPE_POINT_DEVICE";
 
     private final ManholeDeviceRelMapper manholeRelationMapper;
-    private final GasPipePointDeviceRelMapper gasPipePointRelationMapper;
     private final ManholeBaseService manholes;
-    private final GasPipePointService gasPipePoints;
-    private final PipeNetworkBaseService pipeNetworks;
     private final EquipmentBaseService equipments;
     private final Clock clock;
 
     public CockpitDeviceFacilityRelationService(ManholeDeviceRelMapper manholeRelationMapper,
-            GasPipePointDeviceRelMapper gasPipePointRelationMapper, ManholeBaseService manholes,
-            GasPipePointService gasPipePoints, PipeNetworkBaseService pipeNetworks, EquipmentBaseService equipments,
-            Clock clock) {
+            ManholeBaseService manholes, EquipmentBaseService equipments, Clock clock) {
         this.manholeRelationMapper = manholeRelationMapper;
-        this.gasPipePointRelationMapper = gasPipePointRelationMapper;
         this.manholes = manholes;
-        this.gasPipePoints = gasPipePoints;
-        this.pipeNetworks = pipeNetworks;
         this.equipments = equipments;
         this.clock = clock;
     }
@@ -85,13 +72,9 @@ public class CockpitDeviceFacilityRelationService {
             // del_flag 显式写进条件:即使全局逻辑删除配置漂移,也只会读到未删除的关联行。
             List<ManholeDeviceRel> manholeRelations = manholeRelationMapper.selectList(
                     new LambdaQueryWrapper<ManholeDeviceRel>().eq(ManholeDeviceRel::getDelFlag, "0"));
-            List<GasPipePointDeviceRel> gasRelations = gasPipePointRelationMapper.selectList(
-                    new LambdaQueryWrapper<GasPipePointDeviceRel>().eq(GasPipePointDeviceRel::getDelFlag, "0"));
 
-            Map<String, String> deviceCodeById = loadDeviceCodes(manholeRelations, gasRelations);
+            Map<String, String> deviceCodeById = loadDeviceCodes(manholeRelations);
             Set<String> existingManholeIds = loadExistingManholeIds(manholeRelations);
-            Map<Long, String> networkIdByPointId = loadNetworkIdByPointId(gasRelations);
-            Set<String> existingNetworkIds = loadExistingNetworkIds(networkIdByPointId.values());
 
             List<Relation> relations = new ArrayList<>();
             int skippedManholeMissing = 0;
@@ -118,31 +101,12 @@ public class CockpitDeviceFacilityRelationService {
                         RELATION_TYPE_MANHOLE_DEVICE));
             }
 
-            for (GasPipePointDeviceRel relation : gasRelations) {
-                String deviceId = trimToNull(relation.getEquipmentId());
-                String networkId = trimToNull(networkIdByPointId.get(relation.getPointId()));
-                if (networkId == null || !existingNetworkIds.contains(networkId)) {
-                    skippedGasNetworkMissing++;
-                    continue;
-                }
-                if (deviceId == null) {
-                    skippedDeviceMissing++;
-                    continue;
-                }
-                String deviceCode = trimToNull(deviceCodeById.get(deviceId));
-                if (deviceCode == null) {
-                    deviceCodeUnresolved++;
-                }
-                relations.add(new Relation(deviceId, deviceCode, networkId, FACILITY_KIND_PIPE,
-                        RELATION_TYPE_GAS_PIPE_POINT_DEVICE));
-            }
-
             // 顺序固定,便于前端 diff / 排查时不因 SQL 返回顺序抖动。
             relations.sort(Comparator.comparing(Relation::getFacilityKind)
                     .thenComparing(Relation::getFacilityCode)
                     .thenComparing(Relation::getDeviceId));
 
-            Statistics statistics = new Statistics(manholeRelations.size(), gasRelations.size(), relations.size(),
+            Statistics statistics = new Statistics(manholeRelations.size(), 0, relations.size(),
                     skippedManholeMissing, skippedGasNetworkMissing, skippedDeviceMissing, deviceCodeUnresolved);
             String generatedAt = DateTimeFormatter.ISO_OFFSET_DATE_TIME
                     .format(clock.instant().atZone(ZoneId.of(SCHEMA_TIME_ZONE)));
@@ -155,15 +119,11 @@ public class CockpitDeviceFacilityRelationService {
     }
 
     /** 设备主键 → 设备编码;只做等值匹配,不按名称/编码猜。 */
-    private Map<String, String> loadDeviceCodes(List<ManholeDeviceRel> manholeRelations,
-            List<GasPipePointDeviceRel> gasRelations) {
+    private Map<String, String> loadDeviceCodes(List<ManholeDeviceRel> manholeRelations) {
         Set<String> deviceIds = new LinkedHashSet<>();
         for (ManholeDeviceRel relation : manholeRelations) {
             addIfPresent(deviceIds, relation.getEquipmentId());
         }
-        for (GasPipePointDeviceRel relation : gasRelations) {
-            addIfPresent(deviceIds, relation.getEquipmentId());
-        }
         Map<String, String> deviceCodeById = new HashMap<>();
         if (deviceIds.isEmpty()) {
             return deviceCodeById;
@@ -194,43 +154,7 @@ public class CockpitDeviceFacilityRelationService {
         return existing;
     }
 
-    /** 管点主键 → 所属管段 networkId(管点表自身字段,原样读出)。 */
-    private Map<Long, String> loadNetworkIdByPointId(List<GasPipePointDeviceRel> gasRelations) {
-        Set<Long> pointIds = new LinkedHashSet<>();
-        for (GasPipePointDeviceRel relation : gasRelations) {
-            if (relation.getPointId() != null) {
-                pointIds.add(relation.getPointId());
-            }
-        }
-        Map<Long, String> networkIdByPointId = new HashMap<>();
-        if (pointIds.isEmpty()) {
-            return networkIdByPointId;
-        }
-        for (GasPipePoint point : gasPipePoints.listByIds(pointIds)) {
-            if (point != null && point.getPointId() != null) {
-                networkIdByPointId.put(point.getPointId(), point.getNetworkId());
-            }
-        }
-        return networkIdByPointId;
-    }
-
-    /** 只认 pipe_network_base 里真实存在(未删除)的管段主键。 */
-    private Set<String> loadExistingNetworkIds(Iterable<String> networkIds) {
-        Set<String> candidates = new LinkedHashSet<>();
-        for (String networkId : networkIds) {
-            addIfPresent(candidates, networkId);
-        }
-        Set<String> existing = new HashSet<>();
-        if (candidates.isEmpty()) {
-            return existing;
-        }
-        for (PipeNetworkBase network : pipeNetworks.listByIds(candidates)) {
-            if (network != null && network.getNetworkId() != null) {
-                existing.add(network.getNetworkId());
-            }
-        }
-        return existing;
-    }
+    /** 管点主键 → 所属管段 networkId(已随 gas_pipe_point 移除,见类注释)。 */
 
     private static void addIfPresent(Set<String> target, String value) {
         String trimmed = trimToNull(value);