Explorar el Código

Merge remote-tracking branch 'origin/master'

zengy hace 5 días
padre
commit
2bd6aa55b6
Se han modificado 15 ficheros con 246 adiciones y 16 borrados
  1. 1 0
      .idea/encodings.xml
  2. 3 2
      pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/warning/EarlyWarningController.java
  3. 34 0
      pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/warning/WarningParticipantController.java
  4. 5 1
      pipe-network-service/zksy-admin/src/test/java/com/zksy/web/controller/cockpit/CockpitFacilityGeometryControllerTest.java
  5. 74 0
      pipe-network-service/zksy-admin/src/test/java/com/zksy/web/controller/cockpit/CockpitFacilityGeometryServiceTest.java
  6. 13 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/domain/WarningParticipant.java
  7. 1 1
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/mapper/EarlyWarningMapper.java
  8. 13 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/mapper/WarningParticipantMapper.java
  9. 1 1
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/service/EarlyWarningService.java
  10. 46 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/service/WarningParticipantService.java
  11. 2 2
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/service/impl/EarlyWarningServiceImpl.java
  12. 8 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/cockpit/geometry/CockpitFacilityGeometryResponse.java
  13. 10 8
      pipe-network-service/zksy-system/src/main/java/com/zksy/cockpit/geometry/CockpitFacilityGeometryService.java
  14. 15 1
      pipe-network-service/zksy-system/src/main/resources/mapper/warning/EarlyWarningMapper.xml
  15. 20 0
      pipe-network-service/zksy-system/src/main/resources/mapper/warning/WarningParticipantMapper.xml

+ 1 - 0
.idea/encodings.xml

@@ -19,6 +19,7 @@
     <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/telemetry-service/src/main/java" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/video-service/src/main/java" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/water-level-service/src/main/java" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/zk-api-service/src/main/java" charset="UTF-8" />
     <file url="file://$PROJECT_DIR$/zk-common/src/main/java" charset="UTF-8" />

+ 3 - 2
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/warning/EarlyWarningController.java

@@ -368,9 +368,10 @@ List<String> alarmIds = alarmIdsJson != null && !alarmIdsJson.isEmpty()
             @ApiParam("开始时间") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime startTime,
             @ApiParam("结束时间") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime,
             @ApiParam("设备编码") @RequestParam(required = false) String deviceCode,
-            @ApiParam("设备名称") @RequestParam(required = false) String deviceName) {
+            @ApiParam("设备名称") @RequestParam(required = false) String deviceName,
+            @ApiParam("发布页排序:草稿优先,已解除最后,按修改时间倒序") @RequestParam(defaultValue = "false") boolean releaseOrder) {
         Page<?> page = new Page<>(pageNum, pageSize);
-        IPage<Map<String, Object>> result = earlyWarningService.searchWarnings(page, warningNo, warningType, warningLevel, status, publisher, ownershipUnit, startTime, endTime, excludePublisher, deviceCode, deviceName);
+        IPage<Map<String, Object>> result = earlyWarningService.searchWarnings(page, warningNo, warningType, warningLevel, status, publisher, ownershipUnit, startTime, endTime, excludePublisher, deviceCode, deviceName, releaseOrder);
         return AjaxResult.success(result);
     }
 

+ 34 - 0
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/warning/WarningParticipantController.java

@@ -0,0 +1,34 @@
+package com.zksy.web.controller.warning;
+
+import com.zksy.base.warning.service.WarningParticipantService;
+import com.zksy.common.core.domain.AjaxResult;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+/** 预警处置人、核查人选择,不要求用户管理权限。 */
+@RestController
+@RequestMapping("/warning/participants")
+@PreAuthorize("@ss.hasAnyPermi('warning:warning:add,warning:warning:edit,warning:warning:publish')")
+public class WarningParticipantController {
+    private final WarningParticipantService participants;
+
+    public WarningParticipantController(WarningParticipantService participants) {
+        this.participants = participants;
+    }
+
+    @GetMapping("/deptTree")
+    public AjaxResult departments() {
+        return AjaxResult.success(participants.departments());
+    }
+
+    @GetMapping("/users")
+    public AjaxResult users(@RequestParam(defaultValue = "1") int pageNum,
+                            @RequestParam(defaultValue = "10") int pageSize,
+                            @RequestParam(required = false) Long deptId,
+                            @RequestParam(required = false) String keyword) {
+        return AjaxResult.success(participants.users(pageNum, pageSize, deptId, keyword));
+    }
+}

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

@@ -64,7 +64,7 @@ class CockpitFacilityGeometryControllerTest {
     @Test
     void invalidGeometryIsExplicitJsonNullWithRawCoordinatesAndSameValidationShape() throws Exception {
         Properties properties = new Properties("gas_pipe_point", "1", "G1", "阀门", "GAS", "GAS_PIPE_POINT",
-                null, "阀门", null, Collections.singletonList(Arrays.asList(null, new BigDecimal("28.4"))),
+                null, null, "阀门", null, null, null, Collections.singletonList(Arrays.asList(null, new BigDecimal("28.4"))),
                 CockpitCoordinateValidator.validate(null, new BigDecimal("28.4"), true),
                 Collections.singletonList(CockpitCoordinateValidator.validate(null, new BigDecimal("28.4"), true)));
         when(service.load()).thenReturn(new CockpitFacilityGeometryResponse("2026-10-12T10:00:00+08:00",
@@ -73,6 +73,7 @@ class CockpitFacilityGeometryControllerTest {
                 .andExpect(status().isOk())
                 .andExpect(jsonPath("$.data.features[0].type").value("Feature"))
                 .andExpect(jsonPath("$.data.features[0].geometry").value(nullValue()))
+                .andExpect(jsonPath("$.data.features[0].properties.networkLevel").value(nullValue()))
                 .andExpect(jsonPath("$.data.features[0].properties.networkId").value(nullValue()))
                 .andExpect(jsonPath("$.data.features[0].properties.pointType").value("阀门"))
                 .andExpect(jsonPath("$.data.features[0].properties.sourceCoordinates[0][0]").value(nullValue()))
@@ -101,6 +102,7 @@ class CockpitFacilityGeometryControllerTest {
         com.zksy.base.domain.PipeNetworkBase line = new com.zksy.base.domain.PipeNetworkBase();
         line.setNetworkId("gas-line");
         line.setNetworkType("0");
+        line.setDiameter(new BigDecimal("400.50"));
         line.setStartLongitude(new BigDecimal("110.360"));
         line.setStartLatitude(new BigDecimal("28.420"));
         line.setEndLongitude(new BigDecimal("110.420"));
@@ -122,6 +124,8 @@ class CockpitFacilityGeometryControllerTest {
                 .andExpect(status().isOk())
                 .andExpect(jsonPath("$.data.features", hasSize(2)))
                 .andExpect(jsonPath("$.data.features[0].geometry.type").value("LineString"))
+                .andExpect(jsonPath("$.data.features[0].properties.diameter").value(400.50))
+                .andExpect(jsonPath("$.data.features[1].properties.diameter").value(nullValue()))
                 .andExpect(jsonPath("$.data.features[0].geometry.coordinates", hasSize(2)))
                 .andExpect(jsonPath("$.data.features[0].geometry.coordinates[0][0]").value(110.360))
                 .andExpect(jsonPath("$.data.features[0].geometry.coordinates[0][1]").value(28.420))

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

@@ -84,6 +84,80 @@ class CockpitFacilityGeometryServiceTest {
         verifyNoMoreInteractions(networks, points, manholes);
     }
 
+    @Test
+    void exposesReportedDiameterInMillimetresAndKeepsMissingDiameterExplicit() {
+        PipeNetworkBase known = network("known-diameter", "0");
+        known.setDiameter(new BigDecimal("400.50"));
+        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());
+        com.fasterxml.jackson.databind.JsonNode properties = json.get("features").get(0).get("properties");
+        assertTrue(properties.has("diameter"));
+        assertEquals(400.50, properties.get("diameter").asDouble());
+        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());
+        assertEquals(new BigDecimal("400.50"), known.getDiameter());
+        assertNull(missing.getDiameter());
+        verify(networks).list();
+        verifyNoMoreInteractions(networks);
+    }
+
+    @Test
+    void exposesRawRemarkForDrainageColorClassificationWithoutGuessingFromName() {
+        PipeNetworkBase rain = network("rain-remark", "1");
+        rain.setNetworkName("名称不得代替备注");
+        rain.setRemark("雨水");
+        PipeNetworkBase sewage = network("sewage-remark", "1");
+        sewage.setRemark("污水");
+        PipeNetworkBase missing = network("missing-remark", "1");
+        when(networks.list()).thenReturn(Arrays.asList(rain, sewage, missing));
+        com.fasterxml.jackson.databind.JsonNode json = new com.fasterxml.jackson.databind.ObjectMapper()
+                .valueToTree(service.load());
+        assertEquals("雨水", json.get("features").get(0).get("properties").get("remark").asText());
+        assertEquals("污水", json.get("features").get(1).get("properties").get("remark").asText());
+        assertTrue(json.get("features").get(2).get("properties").has("remark"));
+        assertTrue(json.get("features").get(2).get("properties").get("remark").isNull());
+    }
+
+    @Test
+    void exposesNetworkLevelForDrainageAndDefaultsLegacyMissingLevelWithoutMutatingSource() {
+        PipeNetworkBase sewage = network("level-zero", "1");
+        sewage.setNetworkLevel("0");
+        PipeNetworkBase rain = network("level-one", "1");
+        rain.setNetworkLevel("1");
+        PipeNetworkBase legacy = network("level-missing", "1");
+        PipeNetworkBase blank = network("level-blank", "1");
+        blank.setNetworkLevel("  ");
+        PipeNetworkBase gas = network("gas-level-one", "0");
+        gas.setNetworkLevel("1");
+        when(networks.list()).thenReturn(Arrays.asList(sewage, rain, legacy, blank, gas));
+        com.fasterxml.jackson.databind.JsonNode json = new com.fasterxml.jackson.databind.ObjectMapper().valueToTree(service.load());
+        assertEquals("0", json.get("features").get(0).get("properties").get("networkLevel").asText());
+        assertEquals("1", json.get("features").get(1).get("properties").get("networkLevel").asText());
+        assertEquals("0", json.get("features").get(2).get("properties").get("networkLevel").asText());
+        assertEquals("0", json.get("features").get(3).get("properties").get("networkLevel").asText());
+        assertEquals("GAS", json.get("features").get(4).get("properties").get("industry").asText());
+        assertEquals("1", json.get("features").get(4).get("properties").get("networkLevel").asText());
+        assertNull(legacy.getNetworkLevel());
+        assertEquals("  ", blank.getNetworkLevel());
+        verify(networks).list();
+        verifyNoMoreInteractions(networks);
+    }
+
     @Test
     void preservesEveryComponentTypeIncludingUnknownAndMissingTypesWithoutFabricatingNodes() {
         List<String> types = Arrays.asList("阀门", "调压", "计量", "阴极保护", "弯头", "三通", "其它", "未知原始值", null);

+ 13 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/domain/WarningParticipant.java

@@ -0,0 +1,13 @@
+package com.zksy.base.warning.domain;
+
+import lombok.Data;
+
+/** 预警指派候选人,仅包含选择人员所需字段。 */
+@Data
+public class WarningParticipant {
+    private Long userId;
+    private String userName;
+    private String nickName;
+    private Long deptId;
+    private String deptName;
+}

+ 1 - 1
pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/mapper/EarlyWarningMapper.java

@@ -20,7 +20,7 @@ public interface EarlyWarningMapper extends BaseMapper<EarlyWarning> {
 
     IPage<Map<String, Object>> selectWarningList(Page<?> page, @Param("warningNo") String warningNo, @Param("warningType") String warningType, @Param("warningLevel") String warningLevel, @Param("status") String status);
 
-    IPage<Map<String, Object>> searchWarnings(Page<?> page, @Param("warningNo") String warningNo, @Param("warningType") String warningType, @Param("warningLevel") String warningLevel, @Param("status") String status, @Param("publisher") String publisher, @Param("ownershipUnit") String ownershipUnit, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime, @Param("excludePublisher") String excludePublisher, @Param("deviceCode") String deviceCode, @Param("deviceName") String deviceName);
+    IPage<Map<String, Object>> searchWarnings(Page<?> page, @Param("warningNo") String warningNo, @Param("warningType") String warningType, @Param("warningLevel") String warningLevel, @Param("status") String status, @Param("publisher") String publisher, @Param("ownershipUnit") String ownershipUnit, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime, @Param("excludePublisher") String excludePublisher, @Param("deviceCode") String deviceCode, @Param("deviceName") String deviceName, @Param("releaseOrder") boolean releaseOrder);
 
     IPage<Map<String, Object>> selectTodoList(Page<?> page, @Param("userId") String userId, @Param("todoType") String todoType, @Param("warningNo") String warningNo);
 

+ 13 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/mapper/WarningParticipantMapper.java

@@ -0,0 +1,13 @@
+package com.zksy.base.warning.mapper;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.zksy.base.warning.domain.WarningParticipant;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface WarningParticipantMapper {
+    IPage<WarningParticipant> selectCandidates(Page<WarningParticipant> page,
+            @Param("deptId") Long deptId, @Param("keyword") String keyword);
+}

+ 1 - 1
pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/service/EarlyWarningService.java

@@ -18,7 +18,7 @@ public interface EarlyWarningService extends IService<EarlyWarning> {
 
     IPage<Map<String, Object>> getWarningList(Page<?> page, String warningNo, String warningType, String warningLevel, String status);
 
-    IPage<Map<String, Object>> searchWarnings(Page<?> page, String warningNo, String warningType, String warningLevel, String status, String publisher, String ownershipUnit, LocalDateTime startTime, LocalDateTime endTime, String excludePublisher, String deviceCode, String deviceName);
+    IPage<Map<String, Object>> searchWarnings(Page<?> page, String warningNo, String warningType, String warningLevel, String status, String publisher, String ownershipUnit, LocalDateTime startTime, LocalDateTime endTime, String excludePublisher, String deviceCode, String deviceName, boolean releaseOrder);
 
     IPage<Map<String, Object>> getTodoList(Page<?> page, String userName, String todoType, String warningNo);
 

+ 46 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/service/WarningParticipantService.java

@@ -0,0 +1,46 @@
+package com.zksy.base.warning.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.zksy.base.warning.domain.WarningParticipant;
+import com.zksy.base.warning.mapper.WarningParticipantMapper;
+import com.zksy.common.core.domain.TreeSelect;
+import com.zksy.common.core.domain.entity.SysDept;
+import com.zksy.common.exception.ServiceException;
+import com.zksy.system.mapper.SysDeptMapper;
+import com.zksy.system.service.ISysDeptService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/** 预警发布允许跨部门指派,业务候选查询不使用系统用户管理的数据范围。 */
+@Service
+public class WarningParticipantService {
+    private final SysDeptMapper deptMapper;
+    private final ISysDeptService deptService;
+    private final WarningParticipantMapper participantMapper;
+
+    public WarningParticipantService(SysDeptMapper deptMapper, ISysDeptService deptService,
+                                     WarningParticipantMapper participantMapper) {
+        this.deptMapper = deptMapper;
+        this.deptService = deptService;
+        this.participantMapper = participantMapper;
+    }
+
+    public List<TreeSelect> departments() {
+        SysDept query = new SysDept();
+        query.setStatus("0");
+        // 直接使用现有 Mapper 查询全部启用部门;只向客户端输出 id/label 树。
+        return deptService.buildDeptTreeSelect(deptMapper.selectDeptList(query));
+    }
+
+    public IPage<WarningParticipant> users(int pageNum, int pageSize, Long deptId, String keyword) {
+        if (deptId != null && deptId <= 0) throw new ServiceException("请选择有效部门");
+        if (keyword != null) {
+            keyword = keyword.trim();
+            if (keyword.length() > 100) throw new ServiceException("搜索关键字不能超过100个字符");
+        }
+        Page<WarningParticipant> page = new Page<>(Math.max(1, pageNum), Math.max(1, Math.min(100, pageSize)));
+        return participantMapper.selectCandidates(page, deptId, keyword);
+    }
+}

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

@@ -77,9 +77,9 @@ public class EarlyWarningServiceImpl extends ServiceImpl<EarlyWarningMapper, Ear
     }
 
     @Override
-    public IPage<Map<String, Object>> searchWarnings(Page<?> page, String warningNo, String warningType, String warningLevel, String status, String publisher, String ownershipUnit, LocalDateTime startTime, LocalDateTime endTime, String excludePublisher, String deviceCode, String deviceName) {
+    public IPage<Map<String, Object>> searchWarnings(Page<?> page, String warningNo, String warningType, String warningLevel, String status, String publisher, String ownershipUnit, LocalDateTime startTime, LocalDateTime endTime, String excludePublisher, String deviceCode, String deviceName, boolean releaseOrder) {
         reference.validateStatus(status);
-        return earlyWarningMapper.searchWarnings(page, warningNo, warningType, warningLevel, status, publisher, ownershipUnit, startTime, endTime, excludePublisher, deviceCode, deviceName);
+        return earlyWarningMapper.searchWarnings(page, warningNo, warningType, warningLevel, status, publisher, ownershipUnit, startTime, endTime, excludePublisher, deviceCode, deviceName, releaseOrder);
     }
 
     @Override

+ 8 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/cockpit/geometry/CockpitFacilityGeometryResponse.java

@@ -50,10 +50,18 @@ public class CockpitFacilityGeometryResponse {
         private final String industry;
         private final String typeCode;
         private final String networkType;
+        /** Drainage subtype: 0 sewage (legacy default), 1 rainwater; ignored by other industries. */
+        @JsonInclude(JsonInclude.Include.ALWAYS)
+        private final String networkLevel;
         @JsonInclude(JsonInclude.Include.ALWAYS)
         private final String pointType;
         @JsonInclude(JsonInclude.Include.ALWAYS)
         private final String networkId;
+        /** Original reported diameter in millimetres; null means not supplied. */
+        @JsonInclude(JsonInclude.Include.ALWAYS)
+        private final BigDecimal diameter;
+        @JsonInclude(JsonInclude.Include.ALWAYS)
+        private final String remark;
         // Raw pairs remain available for objects whose GeoJSON geometry must be null.
         private final List<List<BigDecimal>> sourceCoordinates;
         private final CockpitCoordinateValidation coordinateValidation;

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

@@ -53,20 +53,22 @@ public class CockpitFacilityGeometryService {
                 features.add(feature("pipe_network_base", network.getNetworkId(), network.getNetworkCode(),
                         network.getNetworkName(), industry == null ? "UNKNOWN" : industry,
                         CockpitPipeNetworkType.typeCodeOf(network.getNetworkType()), network.getNetworkType(),
-                        null, network.getNetworkId(), "LineString", Arrays.asList(
+                        "DRAINAGE".equals(industry) && (network.getNetworkLevel() == null || network.getNetworkLevel().trim().isEmpty())
+                                ? "0" : network.getNetworkLevel(),
+                        null, network.getNetworkId(), network.getDiameter(), network.getRemark(), "LineString", Arrays.asList(
                                 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, point.getPointType(),
-                        point.getNetworkId(), "Point",
+                        point.getPointName(), "GAS", "GAS_PIPE_POINT", null, null, point.getPointType(),
+                        point.getNetworkId(), point.getDiameter(), null, "Point",
                         Collections.singletonList(pair(point.getLongitude(), point.getLatitude()))));
             }
             for (ManholeBase manhole : Objects.requireNonNull(manholes.list())) {
                 features.add(feature("manhole_base", manhole.getManholeId(), manhole.getManholeCode(),
-                        manhole.getManholeName(), "MANHOLE", "MANHOLE", null, null,
-                        manhole.getNetworkId(), "Point",
+                        manhole.getManholeName(), "MANHOLE", "MANHOLE", null, null, null,
+                        manhole.getNetworkId(), null, null, "Point",
                         Collections.singletonList(pair(manhole.getLongitude(), manhole.getLatitude()))));
             }
             List<Coverage> coverage = new ArrayList<>();
@@ -94,7 +96,7 @@ public class CockpitFacilityGeometryService {
     }
 
     private static Feature feature(String source, String sourceId, String code, String name, String industry,
-            String typeCode, String networkType, String pointType, String networkId, String geometryType,
+            String typeCode, String networkType, String networkLevel, String pointType, String networkId, BigDecimal diameter, String remark, String geometryType,
             List<List<BigDecimal>> coordinates) {
         List<CockpitCoordinateValidation> validations = coordinates.stream()
                 .map(pair -> validate(pair.get(0), pair.get(1)))
@@ -105,8 +107,8 @@ public class CockpitFacilityGeometryService {
         // Invalid GeoJSON coordinates cannot be represented as an empty or invented geometry.
         Geometry geometry = "INVALID".equals(overall.getState()) ? null : new Geometry(geometryType,
                 "Point".equals(geometryType) ? coordinates.get(0) : coordinates);
-        Properties properties = new Properties(source, sourceId, code, name, industry, typeCode, networkType,
-                pointType, networkId, coordinates, overall, validations);
+        Properties properties = new Properties(source, sourceId, code, name, industry, typeCode, networkType, networkLevel,
+                pointType, networkId, diameter, remark, coordinates, overall, validations);
         return new Feature(source + ":" + sourceId, geometry, properties);
     }
 

+ 15 - 1
pipe-network-service/zksy-system/src/main/resources/mapper/warning/EarlyWarningMapper.xml

@@ -828,7 +828,21 @@
                 AND w.create_time &lt;= #{endTime}
             </if>
         </where>
-        ORDER BY w.create_time DESC
+        <choose>
+            <when test="releaseOrder">
+                ORDER BY CASE w.status
+                             WHEN 'DRAFT' THEN 0
+                             WHEN 'PENDING' THEN 1
+                             WHEN 'RECEIVED' THEN 2
+                             WHEN 'PROCESSING' THEN 3
+                             WHEN 'HANDLED' THEN 4
+                             WHEN 'CLOSED' THEN 5
+                             ELSE 6 END,
+                         COALESCE(w.update_time, w.create_time) DESC NULLS LAST,
+                         w.create_time DESC NULLS LAST, w.warning_id DESC
+            </when>
+            <otherwise>ORDER BY w.create_time DESC</otherwise>
+        </choose>
     </select>
 
     <select id="selectTodoList" resultType="java.util.Map">

+ 20 - 0
pipe-network-service/zksy-system/src/main/resources/mapper/warning/WarningParticipantMapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.zksy.base.warning.mapper.WarningParticipantMapper">
+    <select id="selectCandidates" resultType="com.zksy.base.warning.domain.WarningParticipant">
+        SELECT u.user_id, u.user_name, u.nick_name, u.dept_id, d.dept_name
+        FROM app_user.sys_user u
+        JOIN app_user.sys_dept d ON d.dept_id = u.dept_id
+        WHERE u.status = '0' AND u.del_flag = '0'
+          AND d.status = '0' AND d.del_flag = '0'
+        <if test="deptId != null">
+          AND (d.dept_id = #{deptId}
+               OR POSITION(CONCAT(',', #{deptId}, ',') IN CONCAT(',', d.ancestors, ',')) &gt; 0)
+        </if>
+        <if test="keyword != null and keyword != ''">
+          AND (LOWER(u.user_name) LIKE CONCAT('%', LOWER(#{keyword}), '%')
+               OR LOWER(u.nick_name) LIKE CONCAT('%', LOWER(#{keyword}), '%'))
+        </if>
+        ORDER BY d.order_num, d.dept_id, u.user_name, u.user_id
+    </select>
+</mapper>