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

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/MonitorPointService.java
#	pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/PipeNetworkBaseService.java
#	pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/impl/MonitorPointServiceImpl.java
#	pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/impl/PipeNetworkBaseServiceImpl.java
null 1 месяц назад
Родитель
Сommit
71f3b9c698
38 измененных файлов с 2212 добавлено и 64 удалено
  1. 1 1
      pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/base/EquipmentBaseController.java
  2. 148 0
      pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/base/MonitorPointController.java
  3. 107 0
      pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/base/PipeNetworkBaseController.java
  4. 161 0
      pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/manhole/CaseInfoController.java
  5. 101 0
      pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/manhole/WorkOrderController.java
  6. 38 32
      pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/warning/EarlyWarningController.java
  7. 102 0
      pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/warning/WarningItemController.java
  8. 133 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/domain/CaseInfo.java
  9. 178 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/domain/WorkOrder.java
  10. 70 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/domain/WorkOrderLog.java
  11. 20 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/mapper/CaseInfoMapper.java
  12. 20 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/mapper/WorkOrderLogMapper.java
  13. 20 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/mapper/WorkOrderMapper.java
  14. 22 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/CaseInfoService.java
  15. 24 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/MonitorPointService.java
  16. 12 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/PipeNetworkBaseService.java
  17. 13 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/WorkOrderLogService.java
  18. 22 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/WorkOrderService.java
  19. 119 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/impl/CaseInfoServiceImpl.java
  20. 238 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/impl/MonitorPointServiceImpl.java
  21. 110 15
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/impl/PipeNetworkBaseServiceImpl.java
  22. 24 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/impl/WorkOrderLogServiceImpl.java
  23. 51 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/impl/WorkOrderServiceImpl.java
  24. 2 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/domain/EarlyWarning.java
  25. 5 5
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/service/EarlyWarningService.java
  26. 27 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/service/WarningItemService.java
  27. 16 11
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/service/impl/EarlyWarningServiceImpl.java
  28. 113 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/service/impl/WarningItemServiceImpl.java
  29. 30 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/manhole/dto/in/CaseInfoPageInDTO.java
  30. 54 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/manhole/dto/in/CaseInfoSaveInDTO.java
  31. 27 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/manhole/dto/in/CaseInfoVerifyInDTO.java
  32. 30 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/manhole/dto/in/WorkOrderPageInDTO.java
  33. 25 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/manhole/dto/out/CaseInfoOutDTO.java
  34. 19 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/manhole/dto/out/WorkOrderLogOutDTO.java
  35. 29 0
      pipe-network-service/zksy-system/src/main/java/com/zksy/manhole/dto/out/WorkOrderOutDTO.java
  36. 35 0
      pipe-network-service/zksy-system/src/main/resources/mapper/CaseInfoMapper.xml
  37. 22 0
      pipe-network-service/zksy-system/src/main/resources/mapper/WorkOrderLogMapper.xml
  38. 44 0
      pipe-network-service/zksy-system/src/main/resources/mapper/WorkOrderMapper.xml

+ 1 - 1
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/base/EquipmentBaseController.java

@@ -22,7 +22,7 @@ import java.util.Map;
 @Slf4j
 @RestController
 @RequestMapping("/EquipmentBase")
-@Api(tags = "设备基础信息")
+@Api(tags = "设备基础信息-物联网感知设备")
 public class EquipmentBaseController {
 
     @Autowired

+ 148 - 0
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/base/MonitorPointController.java

@@ -0,0 +1,148 @@
+package com.zksy.web.controller.base;
+
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.zksy.base.domain.MonitorPoint;
+import com.zksy.base.service.MonitorPointService;
+import com.zksy.common.annotation.Anonymous;
+import com.zksy.common.annotation.Log;
+import com.zksy.common.core.domain.AjaxResult;
+import com.zksy.common.enums.BusinessType;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+@Slf4j
+@RestController
+@RequestMapping("/MonitorPoint")
+@Api(tags = "关键监测点管理")
+public class MonitorPointController {
+
+    @Autowired
+    private MonitorPointService service;
+
+    @GetMapping("/getById/{id}")
+    @ApiOperation(value = "获取监测点详情")
+    @Anonymous
+    public AjaxResult getById(@PathVariable String id) {
+        MonitorPoint entity = service.getById(id);
+        if (entity == null) {
+            return AjaxResult.error("该监测点信息不存在");
+        }
+        return AjaxResult.success(entity);
+    }
+
+    @Anonymous
+    @GetMapping("/findByPage")
+    @ApiOperation(value = "监测点分页查询")
+    public Page findByPage(
+            @ApiParam("页码") @RequestParam(defaultValue = "1") long pageNum,
+            @ApiParam("每页数量") @RequestParam(defaultValue = "10") long pageSize,
+            @ApiParam("监测点编码") @RequestParam(required = false) String pointCode,
+            @ApiParam("监测点名称") @RequestParam(required = false) String pointName,
+            @ApiParam("监测点类型") @RequestParam(required = false) String pointType,
+            @ApiParam("状态") @RequestParam(required = false) String status) {
+        return service.findByPage(pageNum, pageSize, pointCode, pointName, pointType, status);
+    }
+
+    @Anonymous
+    @GetMapping("/getList")
+    @ApiOperation(value = "查询所有监测点")
+    public AjaxResult getList() {
+        return AjaxResult.success(service.list());
+    }
+
+    @Anonymous
+    @GetMapping("/byNetwork/{networkId}")
+    @ApiOperation(value = "根据管网设施查询监测点")
+    public AjaxResult getPointsByNetwork(@PathVariable String networkId) {
+        List<MonitorPoint> list = service.getPointsByNetwork(networkId);
+        return AjaxResult.success(list);
+    }
+
+    @PostMapping("/save")
+    @ApiOperation(value = "新增监测点")
+    @Log(title = "新增监测点", businessType = BusinessType.INSERT)
+    public AjaxResult save(@RequestBody MonitorPoint entity) {
+        boolean saved = service.saveWithCheck(entity);
+        return saved ? AjaxResult.success("新增成功", saved)
+                : AjaxResult.error("新增失败", saved);
+    }
+
+    @PostMapping("/saveBatch")
+    @ApiOperation(value = "监测点批量新增")
+    @Log(title = "批量新增监测点", businessType = BusinessType.INSERT)
+    public AjaxResult saveBatch(@RequestBody List<MonitorPoint> entityList) {
+        if (CollectionUtils.isEmpty(entityList)) {
+            return AjaxResult.error("批量新增失败:列表不能为空");
+        }
+        boolean saved = service.saveBatchWithCheck(entityList);
+        return saved ? AjaxResult.success("新增成功", saved)
+                : AjaxResult.error("新增失败", saved);
+    }
+
+    @PutMapping("/updateById")
+    @ApiOperation(value = "监测点修改")
+    @Log(title = "修改监测点", businessType = BusinessType.UPDATE)
+    public AjaxResult updateById(@RequestBody MonitorPoint entity) {
+        boolean updated = service.updateWithCheck(entity);
+        return updated ? AjaxResult.success("修改成功", updated)
+                : AjaxResult.error("修改失败", updated);
+    }
+
+    @DeleteMapping("/deleteById")
+    @ApiOperation(value = "监测点删除")
+    @Log(title = "删除监测点", businessType = BusinessType.DELETE)
+    public AjaxResult deleteById(String id) {
+        boolean deleted = service.removeWithCheck(id);
+        return deleted ? AjaxResult.success("删除成功", deleted)
+                : AjaxResult.error("删除失败", deleted);
+    }
+
+    @DeleteMapping("/deleteBatchById")
+    @ApiOperation(value = "监测点批量删除")
+    @Log(title = "监测点批量删除", businessType = BusinessType.DELETE)
+    public AjaxResult deleteBatchById(@RequestParam List<String> ids) {
+        boolean deleted = service.removeBatchWithCheck(ids);
+        return deleted ? AjaxResult.success("删除成功", deleted)
+                : AjaxResult.error("删除失败", deleted);
+    }
+
+    @PostMapping("/bindEquipment")
+    @ApiOperation(value = "监测点关联设备")
+    @Log(title = "监测点关联设备", businessType = BusinessType.UPDATE)
+    @Anonymous
+    public AjaxResult bindEquipment(
+            @ApiParam("监测点ID") @RequestParam String pointId,
+            @ApiParam("设备ID列表") @RequestParam List<String> equipmentIds) {
+        boolean bound = service.bindEquipment(pointId, equipmentIds);
+        return bound ? AjaxResult.success("关联成功")
+                : AjaxResult.error("关联失败");
+    }
+
+    @PostMapping("/unbindEquipment")
+    @ApiOperation(value = "监测点取消关联设备")
+    @Log(title = "监测点取消关联设备", businessType = BusinessType.UPDATE)
+    @Anonymous
+    public AjaxResult unbindEquipment(
+            @ApiParam("监测点ID") @RequestParam String pointId,
+            @ApiParam("设备ID列表") @RequestParam List<String> equipmentIds) {
+        boolean unbound = service.unbindEquipment(pointId, equipmentIds);
+        return unbound ? AjaxResult.success("取消关联成功")
+                : AjaxResult.error("取消关联失败");
+    }
+
+    @GetMapping("/pointDetail/{pointId}")
+    @ApiOperation(value = "监测点详情(含关联设备和管网)")
+    @Anonymous
+    public AjaxResult getPointDetail(@PathVariable String pointId) {
+        Map<String, Object> detail = service.getPointDetail(pointId);
+        return AjaxResult.success(detail);
+    }
+}

+ 107 - 0
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/base/PipeNetworkBaseController.java

@@ -0,0 +1,107 @@
+package com.zksy.web.controller.base;
+
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.zksy.base.domain.PipeNetworkBase;
+import com.zksy.base.service.PipeNetworkBaseService;
+import com.zksy.common.annotation.Anonymous;
+import com.zksy.common.annotation.Log;
+import com.zksy.common.core.domain.AjaxResult;
+import com.zksy.common.enums.BusinessType;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@Slf4j
+@RestController
+@RequestMapping("/PipeNetworkBase")
+@Api(tags = "管网基础信息管理")
+public class PipeNetworkBaseController {
+
+    @Autowired
+    private PipeNetworkBaseService service;
+
+    @GetMapping("/getById/{id}")
+    @ApiOperation(value = "获取管网基础信息详情")
+    @Anonymous
+    public AjaxResult getById(@PathVariable String id) {
+        PipeNetworkBase entity = service.getById(id);
+        if (entity == null) {
+            return AjaxResult.error("该管网信息不存在");
+        }
+        return AjaxResult.success(entity);
+    }
+
+    @Anonymous
+    @GetMapping("/findByPage")
+    @ApiOperation(value = "管网基础信息分页查询")
+    public Page findByPage(
+            @ApiParam("页码") @RequestParam(defaultValue = "1") long pageNum,
+            @ApiParam("每页数量") @RequestParam(defaultValue = "10") long pageSize,
+            @ApiParam("设施编码") @RequestParam(required = false) String networkCode,
+            @ApiParam("设施名称") @RequestParam(required = false) String networkName,
+            @ApiParam("设施类型") @RequestParam(required = false) String networkType,
+            @ApiParam("状态") @RequestParam(required = false) String status) {
+        return service.findByPage(pageNum, pageSize, networkCode, networkName, networkType, status);
+    }
+
+    @Anonymous
+    @GetMapping("/getList")
+    @ApiOperation(value = "查询所有管网基础信息")
+    public AjaxResult getList() {
+        return AjaxResult.success(service.list());
+    }
+
+    @PostMapping("/save")
+    @ApiOperation(value = "新增管网基础信息")
+    @Log(title = "新增管网基础信息", businessType = BusinessType.INSERT)
+    public AjaxResult save(@RequestBody PipeNetworkBase entity) {
+        boolean saved = service.saveWithCheck(entity);
+        return saved ? AjaxResult.success("新增成功", saved)
+                : AjaxResult.error("新增失败", saved);
+    }
+
+    @PostMapping("/saveBatch")
+    @ApiOperation(value = "管网基础信息批量新增")
+    @Log(title = "批量新增管网基础信息", businessType = BusinessType.INSERT)
+    public AjaxResult saveBatch(@RequestBody List<PipeNetworkBase> entityList) {
+        if (CollectionUtils.isEmpty(entityList)) {
+            return AjaxResult.error("批量新增失败:列表不能为空");
+        }
+        boolean saved = service.saveBatchWithCheck(entityList);
+        return saved ? AjaxResult.success("新增成功", saved)
+                : AjaxResult.error("新增失败", saved);
+    }
+
+    @PutMapping("/updateById")
+    @ApiOperation(value = "管网基础信息修改")
+    @Log(title = "修改管网基础信息", businessType = BusinessType.UPDATE)
+    public AjaxResult updateById(@RequestBody PipeNetworkBase entity) {
+        boolean updated = service.updateWithCheck(entity);
+        return updated ? AjaxResult.success("修改成功", updated)
+                : AjaxResult.error("修改失败", updated);
+    }
+
+    @DeleteMapping("/deleteById")
+    @ApiOperation(value = "管网基础信息删除")
+    @Log(title = "删除管网基础信息", businessType = BusinessType.DELETE)
+    public AjaxResult deleteById(String id) {
+        boolean deleted = service.removeWithCheck(id);
+        return deleted ? AjaxResult.success("删除成功", deleted)
+                : AjaxResult.error("删除失败", deleted);
+    }
+
+    @DeleteMapping("/deleteBatchById")
+    @ApiOperation(value = "管网基础信息批量删除")
+    @Log(title = "管网基础信息批量删除", businessType = BusinessType.DELETE)
+    public AjaxResult deleteBatchById(@RequestParam List<String> ids) {
+        boolean deleted = service.removeBatchWithCheck(ids);
+        return deleted ? AjaxResult.success("删除成功", deleted)
+                : AjaxResult.error("删除失败", deleted);
+    }
+}

+ 161 - 0
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/manhole/CaseInfoController.java

@@ -0,0 +1,161 @@
+package com.zksy.web.controller.manhole;
+
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.zksy.base.domain.CaseInfo;
+import com.zksy.base.domain.EquipmentBase;
+import com.zksy.base.domain.EquipmentStatus;
+import com.zksy.base.domain.EquipmentType;
+import com.zksy.base.service.CaseInfoService;
+import com.zksy.base.service.EquipmentBaseService;
+import com.zksy.base.service.EquipmentStatusService;
+import com.zksy.base.service.EquipmentTypeService;
+import com.zksy.common.annotation.Anonymous;
+import com.zksy.common.core.controller.BaseController;
+import com.zksy.common.core.domain.AjaxResult;
+import com.zksy.common.core.domain.AjaxResult2;
+import com.zksy.manhole.dto.in.CaseInfoPageInDTO;
+import com.zksy.manhole.dto.in.CaseInfoSaveInDTO;
+import com.zksy.manhole.dto.in.CaseInfoVerifyInDTO;
+import com.zksy.manhole.dto.out.CaseInfoOutDTO;
+import com.zksy.manhole.dto.out.EquipmentStatusOutDTO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
+import java.util.Random;
+
+/**
+ * 窨井盖监测系统-案件流转管理Controller
+ * 
+ * @author xianggx
+ * @date 2026-05-06
+ */
+@RestController
+@RequestMapping("/manhole/caseInfo")
+@Api(tags = "窨井盖监测系统-案件流转管理")
+public class CaseInfoController extends BaseController
+{
+    @Autowired
+    private CaseInfoService caseInfoService;
+
+    @Autowired
+    private EquipmentBaseService equipmentBaseService;
+
+    @Autowired
+    private EquipmentStatusService equipmentStatusService;
+
+    @Autowired
+    private EquipmentTypeService equipmentTypeService;
+
+    /**
+     * 生成案件编号
+     * @return
+     */
+    public static String generateCaseNo() {
+        // 1. 获取当前时间,格式化为14位年月日时分秒
+        String currentDateTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
+        // 2. 生成4位随机数,不足补0
+        String randomNum = String.format("%04d", new Random().nextInt(10000));
+        // 3. 拼接完整编号
+        return "CS" + currentDateTime + randomNum;
+    }
+
+    /**
+     * 分页查询案件信息列表
+     */
+    @Anonymous
+    @GetMapping(value = "/findByPage")
+    @ApiOperation(value = "分页查询案件信息列表")
+    public AjaxResult2<Page<CaseInfoOutDTO>> findByPage(@RequestBody CaseInfoPageInDTO pageInDTO)
+    {
+        return AjaxResult2.success(caseInfoService.findByPage(pageInDTO));
+    }
+
+    /**
+     * 获取案件信息详情
+     */
+    @Anonymous
+    @GetMapping(value = "/getById/{id}")
+    @ApiOperation(value = "获取案件信息详情")
+    public AjaxResult2<CaseInfoOutDTO> getById(@PathVariable("id") Long id)
+    {
+        CaseInfo caseInfo = caseInfoService.getById(id);
+        if(caseInfo == null){
+            return AjaxResult2.error("案件ID不存在");
+        }
+        CaseInfoOutDTO outDTO = BeanUtil.copyProperties(caseInfo, CaseInfoOutDTO.class);
+        // 查询设备状态
+        EquipmentStatus equipmentStatus = equipmentStatusService.lambdaQuery()
+                .eq(EquipmentStatus::getEquipmentId, outDTO.getDeviceId())
+                .one();
+        if(equipmentStatus != null){
+            EquipmentStatusOutDTO equipmentStatusOutDTO = BeanUtil.copyProperties(equipmentStatus, EquipmentStatusOutDTO.class);
+            outDTO.setEquipmentStatus(equipmentStatusOutDTO);
+        }
+        // 查询设备类别名称
+        EquipmentBase equipmentBase = equipmentBaseService.getById(outDTO.getDeviceId());
+        if(equipmentBase != null){
+            outDTO.setDeviceCode(equipmentBase.getEquipmentCode());
+            EquipmentType equipmentType = equipmentTypeService.getById(equipmentBase.getEquipmentTypeId());
+            if(equipmentType != null){
+                outDTO.setEquipmentTypeName(equipmentType.getTypeName());
+            }
+        }
+        return AjaxResult2.success(outDTO);
+    }
+
+    /**
+     * 核查案件信息
+     * @param inDTO
+     * @return
+     */
+    @Anonymous
+    @PostMapping("/verifyCaseInfo")
+    @ApiOperation(value = "核查案件信息")
+    public AjaxResult verifyCaseInfo(@RequestBody CaseInfoVerifyInDTO inDTO) {
+        CaseInfo caseInfo = caseInfoService.getById(inDTO.getCaseId());
+        if(caseInfo == null){
+            return AjaxResult.error("案件ID不存在");
+        }
+        CaseInfo entity = new CaseInfo();
+        entity.setCaseId(inDTO.getCaseId());
+        entity.setVerifyUser(inDTO.getVerifyUser());
+        entity.setVerifyTime(new Date());
+        if(inDTO.getVerifyResult() != null){
+            if(inDTO.getVerifyResult() == 1){
+                //1-待处理
+                entity.setCaseStatus(2);
+            } if(inDTO.getVerifyResult() == 2){
+                //2-误报
+                entity.setCaseStatus(4);
+            }
+        }
+        boolean updated = caseInfoService.updateById(entity);
+        return updated ? AjaxResult.success("操作成功",updated)
+                : AjaxResult.error("操作失败",updated);
+    }
+
+    /**
+     * 新增案件信息
+     * @param inDTO
+     * @return
+     */
+    @Anonymous
+    @PostMapping("/saveCaseInfo")
+    @ApiOperation(value = "新增案件信息")
+    public AjaxResult saveWarningThreshold(@RequestBody CaseInfoSaveInDTO inDTO) {
+        CaseInfo caseInfo = BeanUtil.copyProperties(inDTO, CaseInfo.class);
+        caseInfo.setCaseNo(generateCaseNo());
+        caseInfo.setCaseSource(4);
+        caseInfo.setCaseStatus(1);
+        boolean result = caseInfoService.save(caseInfo);
+        return result ? AjaxResult.success("保存成功",result)
+                : AjaxResult.error("保存失败",result);
+    }
+}

+ 101 - 0
pipe-network-service/zksy-admin/src/main/java/com/zksy/web/controller/manhole/WorkOrderController.java

@@ -0,0 +1,101 @@
+package com.zksy.web.controller.manhole;
+
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.zksy.base.domain.*;
+import com.zksy.base.service.*;
+import com.zksy.common.annotation.Anonymous;
+import com.zksy.common.core.controller.BaseController;
+import com.zksy.common.core.domain.AjaxResult2;
+import com.zksy.manhole.dto.in.WorkOrderPageInDTO;
+import com.zksy.manhole.dto.out.EquipmentStatusOutDTO;
+import com.zksy.manhole.dto.out.WorkOrderLogOutDTO;
+import com.zksy.manhole.dto.out.WorkOrderOutDTO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 窨井盖监测系统-工单处置管理Controller
+ * 
+ * @author xianggx
+ * @date 2026-05-06
+ */
+@RestController
+@RequestMapping("/manhole/workOrder")
+@Api(tags = "窨井盖监测系统-工单处置管理")
+public class WorkOrderController extends BaseController
+{
+    @Autowired
+    private WorkOrderService workOrderService;
+
+    @Autowired
+    private WorkOrderLogService workOrderLogService;
+
+    @Autowired
+    private EquipmentBaseService equipmentBaseService;
+
+    @Autowired
+    private EquipmentStatusService equipmentStatusService;
+
+    @Autowired
+    private EquipmentTypeService equipmentTypeService;
+
+    /**
+     * 分页查询工单信息列表
+     */
+    @Anonymous
+    @GetMapping(value = "/findByPage")
+    @ApiOperation(value = "分页查询工单信息列表")
+    public AjaxResult2<Page<WorkOrderOutDTO>> findByPage(@RequestBody WorkOrderPageInDTO pageInDTO)
+    {
+        return AjaxResult2.success(workOrderService.findByPage(pageInDTO));
+    }
+
+    /**
+     * 获取工单信息详情
+     */
+    @Anonymous
+    @GetMapping(value = "/getById/{id}")
+    @ApiOperation(value = "获取工单信息详情")
+    public AjaxResult2<WorkOrderOutDTO> getById(@PathVariable("id") Long id)
+    {
+        WorkOrder workOrder = workOrderService.getById(id);
+        if(workOrder == null){
+            return AjaxResult2.error("工单ID不存在");
+        }
+        WorkOrderOutDTO outDTO = BeanUtil.copyProperties(workOrder, WorkOrderOutDTO.class);
+        // 查询设备状态
+        EquipmentStatus equipmentStatus = equipmentStatusService.lambdaQuery()
+                .eq(EquipmentStatus::getEquipmentId, outDTO.getDeviceId())
+                .one();
+        if(equipmentStatus != null){
+            EquipmentStatusOutDTO equipmentStatusOutDTO = BeanUtil.copyProperties(equipmentStatus, EquipmentStatusOutDTO.class);
+            outDTO.setEquipmentStatus(equipmentStatusOutDTO);
+        }
+        // 查询设备类别名称
+        EquipmentBase equipmentBase = equipmentBaseService.getById(outDTO.getDeviceId());
+        if(equipmentBase != null){
+            outDTO.setDeviceCode(equipmentBase.getEquipmentCode());
+            EquipmentType equipmentType = equipmentTypeService.getById(equipmentBase.getEquipmentTypeId());
+            if(equipmentType != null){
+                outDTO.setEquipmentTypeName(equipmentType.getTypeName());
+            }
+        }
+        // 查询工单操作日志
+        List<WorkOrderLog> workOrderLogList = workOrderLogService.list(new LambdaQueryWrapper<WorkOrderLog>()
+                .eq(WorkOrderLog::getOrderId, outDTO.getOrderId())
+                .orderByAsc(WorkOrderLog::getOperTime));
+        if(CollUtil.isNotEmpty(workOrderLogList)){
+            List<WorkOrderLogOutDTO> workOrderLogOutDTOList = BeanUtil.copyToList(workOrderLogList, WorkOrderLogOutDTO.class);
+            outDTO.setWorkOrderLogList(workOrderLogOutDTOList);
+        }
+        return AjaxResult2.success(outDTO);
+    }
+}

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

@@ -2,12 +2,10 @@ package com.zksy.web.controller.warning;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.zksy.base.warning.domain.EarlyWarning;
 import com.zksy.base.warning.domain.WarningArchive;
 import com.zksy.base.warning.domain.WarningDisposal;
 import com.zksy.base.warning.domain.WarningSaveDTO;
 import com.zksy.base.warning.service.EarlyWarningService;
-import com.zksy.common.annotation.Anonymous;
 import com.zksy.common.annotation.Log;
 import com.zksy.common.core.domain.AjaxResult;
 import com.zksy.common.enums.BusinessType;
@@ -17,8 +15,8 @@ import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
 
 import java.time.LocalDateTime;
 import java.util.List;
@@ -35,7 +33,7 @@ public class EarlyWarningController {
 
     @GetMapping("/list")
     @ApiOperation("分页查询预警列表")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:list')")
     public AjaxResult getWarningList(
             @ApiParam("页码") @RequestParam(defaultValue = "1") Integer pageNum,
             @ApiParam("每页数量") @RequestParam(defaultValue = "10") Integer pageSize,
@@ -50,7 +48,7 @@ public class EarlyWarningController {
 
     @GetMapping("/todo/list")
     @ApiOperation("待办预警列表")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:list')")
     public AjaxResult getTodoList(
             @ApiParam("页码") @RequestParam(defaultValue = "1") Integer pageNum,
             @ApiParam("每页数量") @RequestParam(defaultValue = "10") Integer pageSize,
@@ -64,7 +62,7 @@ public class EarlyWarningController {
 
     @GetMapping("/detail/{warningId}")
     @ApiOperation("预警详情")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:query')")
     public AjaxResult getWarningDetail(@PathVariable String warningId) {
         Map<String, Object> detail = earlyWarningService.getWarningDetail(warningId);
         if (detail == null) {
@@ -76,6 +74,7 @@ public class EarlyWarningController {
     @PostMapping("/save")
     @ApiOperation("保存预警信息")
     @Log(title = "保存预警信息", businessType = BusinessType.INSERT)
+    @PreAuthorize("@ss.hasPermi('warning:warning:add')")
     public AjaxResult saveWarning(WarningSaveDTO entity) {
         boolean result = earlyWarningService.saveWarning(entity.getWarning(), entity.getAlarmIds(), entity.getFiles());
         return result ? AjaxResult.success("保存成功", entity.getWarning().getWarningId()) : AjaxResult.error("保存失败");
@@ -84,14 +83,16 @@ public class EarlyWarningController {
     @PutMapping("/update")
     @ApiOperation("修改预警信息")
     @Log(title = "修改预警信息", businessType = BusinessType.UPDATE)
-    public AjaxResult updateWarning(EarlyWarning warning, List<MultipartFile> files) {
-        boolean result = earlyWarningService.updateWarning(warning, files);
+    @PreAuthorize("@ss.hasPermi('warning:warning:edit')")
+    public AjaxResult updateWarning(WarningSaveDTO entity) {
+        boolean result = earlyWarningService.updateWarning(entity.getWarning(), entity.getAlarmIds(), entity.getFiles());
         return result ? AjaxResult.success("修改成功") : AjaxResult.error("修改失败");
     }
 
     @DeleteMapping("/delete")
     @ApiOperation("删除预警信息")
     @Log(title = "删除预警信息", businessType = BusinessType.DELETE)
+    @PreAuthorize("@ss.hasPermi('warning:warning:remove')")
     public AjaxResult deleteWarning(@RequestParam String warningId) {
         boolean result = earlyWarningService.deleteWarning(warningId);
         return result ? AjaxResult.success("删除成功") : AjaxResult.error("删除失败");
@@ -100,6 +101,7 @@ public class EarlyWarningController {
     @DeleteMapping("/delete/batch")
     @ApiOperation("批量删除预警信息")
     @Log(title = "批量删除预警信息", businessType = BusinessType.DELETE)
+    @PreAuthorize("@ss.hasPermi('warning:warning:remove')")
     public AjaxResult deleteBatchWarning(@RequestParam List<String> warningIds) {
         boolean result = earlyWarningService.deleteBatchWarning(warningIds);
         return result ? AjaxResult.success("批量删除成功") : AjaxResult.error("批量删除失败");
@@ -108,50 +110,50 @@ public class EarlyWarningController {
     @PostMapping("/publish/{warningId}")
     @ApiOperation("发布预警")
     @Log(title = "发布预警", businessType = BusinessType.UPDATE)
-    public AjaxResult publishWarning(
-            @PathVariable String warningId,
-            @ApiParam("处置人") @RequestParam(required = false, defaultValue = "system") String disposalUser) {
-        boolean result = earlyWarningService.publishWarning(warningId, disposalUser);
+    @PreAuthorize("@ss.hasPermi('warning:warning:publish')")
+    public AjaxResult publishWarning(@PathVariable String warningId) {
+        boolean result = earlyWarningService.publishWarning(warningId);
         return result ? AjaxResult.success("发布成功") : AjaxResult.error("发布失败");
     }
 
     @PostMapping("/upgrade")
     @ApiOperation("预警升级")
     @Log(title = "预警升级", businessType = BusinessType.UPDATE)
+    @PreAuthorize("@ss.hasPermi('warning:warning:handle')")
     public AjaxResult upgradeWarning(
             @ApiParam("预警ID") @RequestParam String warningId,
             @ApiParam("新预警级别") @RequestParam String newLevel,
-            @ApiParam("处置人") @RequestParam(required = false, defaultValue = "system") String disposalUser,
             @ApiParam("处置说明") @RequestParam String disposalContent) {
-        boolean result = earlyWarningService.upgradeWarning(warningId, newLevel, disposalUser, disposalContent);
+        boolean result = earlyWarningService.upgradeWarning(warningId, newLevel, disposalContent);
         return result ? AjaxResult.success("升级成功") : AjaxResult.error("升级失败");
     }
 
     @PostMapping("/resolve")
     @ApiOperation("解除预警")
     @Log(title = "解除预警", businessType = BusinessType.UPDATE)
+    @PreAuthorize("@ss.hasPermi('warning:warning:handle')")
     public AjaxResult resolveWarning(
             @ApiParam("预警ID") @RequestParam String warningId,
-            @ApiParam("处置人") @RequestParam(required = false, defaultValue = "system") String disposalUser,
             @ApiParam("处置说明") @RequestParam String disposalContent) {
-        boolean result = earlyWarningService.resolveWarning(warningId, disposalUser, disposalContent);
+        boolean result = earlyWarningService.resolveWarning(warningId, disposalContent);
         return result ? AjaxResult.success("解除成功") : AjaxResult.error("解除失败");
     }
 
     @PostMapping("/return")
     @ApiOperation("退回重办")
     @Log(title = "退回重办", businessType = BusinessType.UPDATE)
+    @PreAuthorize("@ss.hasPermi('warning:warning:handle')")
     public AjaxResult returnWarning(
             @ApiParam("预警ID") @RequestParam String warningId,
-            @ApiParam("处置人") @RequestParam(required = false, defaultValue = "system") String disposalUser,
             @ApiParam("退回说明") @RequestParam String disposalContent) {
-        boolean result = earlyWarningService.returnWarning(warningId, disposalUser, disposalContent);
+        boolean result = earlyWarningService.returnWarning(warningId, disposalContent);
         return result ? AjaxResult.success("退回成功") : AjaxResult.error("退回失败");
     }
 
     @PostMapping("/supervision")
     @ApiOperation("预警督办")
     @Log(title = "预警督办", businessType = BusinessType.OTHER)
+    @PreAuthorize("@ss.hasPermi('warning:warning:supervision')")
     public AjaxResult supervisionWarning(
             @ApiParam("预警ID") @RequestParam String warningId,
             @ApiParam("督办人员") @RequestParam String supervisionUser,
@@ -166,6 +168,7 @@ public class EarlyWarningController {
     @PostMapping("/instruction")
     @ApiOperation("领导批示")
     @Log(title = "领导批示", businessType = BusinessType.OTHER)
+    @PreAuthorize("@ss.hasPermi('warning:warning:instruction')")
     public AjaxResult addLeaderInstruction(
             @ApiParam("预警ID") @RequestParam String warningId,
             @ApiParam("领导姓名") @RequestParam String leaderName,
@@ -177,6 +180,7 @@ public class EarlyWarningController {
 
     @PostMapping("/link/alarms")
     @ApiOperation("关联报警信息")
+    @PreAuthorize("@ss.hasPermi('warning:warning:edit')")
     public AjaxResult linkAlarms(
             @ApiParam("预警ID") @RequestParam String warningId,
             @ApiParam("报警ID列表") @RequestParam List<String> alarmIds) {
@@ -186,6 +190,7 @@ public class EarlyWarningController {
 
     @GetMapping("/link/alarms/{warningId}")
     @ApiOperation("获取关联的报警列表")
+    @PreAuthorize("@ss.hasPermi('warning:warning:query')")
     public AjaxResult getLinkedAlarms(@PathVariable String warningId) {
         List<Map<String, Object>> result = earlyWarningService.getLinkedAlarms(warningId);
         return AjaxResult.success(result);
@@ -193,6 +198,7 @@ public class EarlyWarningController {
 
     @GetMapping("/disposal/{warningId}")
     @ApiOperation("获取处置记录列表")
+    @PreAuthorize("@ss.hasPermi('warning:warning:query')")
     public AjaxResult getDisposalList(@PathVariable String warningId) {
         List<Map<String, Object>> result = earlyWarningService.getDisposalList(warningId);
         return AjaxResult.success(result);
@@ -200,7 +206,7 @@ public class EarlyWarningController {
 
     @GetMapping("/statistics")
     @ApiOperation("获取统计数据")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:query')")
     public AjaxResult getStatistics() {
         Map<String, Object> result = earlyWarningService.getStatistics();
         return AjaxResult.success(result);
@@ -215,7 +221,7 @@ public class EarlyWarningController {
 
     @GetMapping("/search")
     @ApiOperation("综合搜索预警信息")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:list')")
     public AjaxResult searchWarnings(
             @ApiParam("页码") @RequestParam(defaultValue = "1") Integer pageNum,
             @ApiParam("每页数量") @RequestParam(defaultValue = "10") Integer pageSize,
@@ -236,7 +242,7 @@ public class EarlyWarningController {
 
     @GetMapping("/detail/full/{warningId}")
     @ApiOperation("获取预警完整详情(含GIS定位和电子存档)")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:query')")
     public AjaxResult getWarningFullDetail(@PathVariable String warningId) {
         Map<String, Object> detail = earlyWarningService.getWarningFullDetail(warningId);
         if (detail == null) {
@@ -247,7 +253,7 @@ public class EarlyWarningController {
 
     @GetMapping("/processing/list")
     @ApiOperation("获取处置过程跟踪 - 进行中的预警")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:list')")
     public AjaxResult getProcessingWarnings(
             @ApiParam("页码") @RequestParam(defaultValue = "1") Integer pageNum,
             @ApiParam("每页数量") @RequestParam(defaultValue = "10") Integer pageSize,
@@ -260,7 +266,7 @@ public class EarlyWarningController {
 
     @GetMapping("/completed/list")
     @ApiOperation("获取处置过程跟踪 - 已完成的预警")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:list')")
     public AjaxResult getCompletedWarnings(
             @ApiParam("页码") @RequestParam(defaultValue = "1") Integer pageNum,
             @ApiParam("每页数量") @RequestParam(defaultValue = "10") Integer pageSize,
@@ -275,7 +281,7 @@ public class EarlyWarningController {
 
     @GetMapping("/disposal/history/{warningId}")
     @ApiOperation("获取预警处置历史记录")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:query')")
     public AjaxResult getDisposalHistory(@PathVariable String warningId) {
         List<Map<String, Object>> result = earlyWarningService.getDisposalHistory(warningId);
         return AjaxResult.success(result);
@@ -283,7 +289,7 @@ public class EarlyWarningController {
 
     @GetMapping("/attachments/{warningId}")
     @ApiOperation("获取预警附件列表")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:query')")
     public AjaxResult getAttachments(@PathVariable String warningId) {
         List<Map<String, Object>> result = earlyWarningService.getAttachments(warningId);
         return AjaxResult.success(result);
@@ -291,7 +297,7 @@ public class EarlyWarningController {
 
     @GetMapping("/dashboard/statistics")
     @ApiOperation("获取仪表盘统计数据")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:query')")
     public AjaxResult getDashboardStatistics() {
         Map<String, Object> result = earlyWarningService.getDashboardStatistics();
         return AjaxResult.success(result);
@@ -299,7 +305,7 @@ public class EarlyWarningController {
 
     @GetMapping("/archive/{warningId}")
     @ApiOperation("获取预警归档信息")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:query')")
     public AjaxResult getArchive(@PathVariable String warningId) {
         WarningArchive archive = earlyWarningService.getArchiveByWarningId(warningId);
         if (archive == null) {
@@ -310,7 +316,7 @@ public class EarlyWarningController {
 
     @GetMapping("/archive/list")
     @ApiOperation("获取归档列表")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:list')")
     public AjaxResult getArchiveList(
             @ApiParam("页码") @RequestParam(defaultValue = "1") Integer pageNum,
             @ApiParam("每页数量") @RequestParam(defaultValue = "10") Integer pageSize,
@@ -326,7 +332,7 @@ public class EarlyWarningController {
 
     @GetMapping("/process/{warningId}")
     @ApiOperation("获取预警处置过程记录(完整流程)")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:query')")
     public AjaxResult getDisposalProcess(@PathVariable String warningId) {
         List<WarningDisposal> result = earlyWarningService.getDisposalProcess(warningId);
         return AjaxResult.success(result);
@@ -334,7 +340,7 @@ public class EarlyWarningController {
 
     @GetMapping("/diagram/{warningId}")
     @ApiOperation("获取预警流程可视化数据(路线图)")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:query')")
     public AjaxResult getProcessDiagram(@PathVariable String warningId) {
         Map<String, Object> result = earlyWarningService.getProcessDiagram(warningId);
         if (result != null && result.containsKey("error")) {
@@ -345,7 +351,7 @@ public class EarlyWarningController {
 
     @GetMapping("/disposal/detail/{disposalId}")
     @ApiOperation("获取预警处置详情")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:query')")
     public AjaxResult getDisposalDetail(@PathVariable String disposalId) {
         Map<String, Object> result = earlyWarningService.getDisposalDetail(disposalId);
         if (result == null) {
@@ -356,7 +362,7 @@ public class EarlyWarningController {
 
     @GetMapping("/process/statistics/{warningId}")
     @ApiOperation("获取预警流程统计信息")
-    @Anonymous
+    @PreAuthorize("@ss.hasPermi('warning:warning:query')")
     public AjaxResult getProcessStatistics(@PathVariable String warningId) {
         Map<String, Object> result = earlyWarningService.getProcessStatistics(warningId);
         return AjaxResult.success(result);

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

@@ -0,0 +1,102 @@
+package com.zksy.web.controller.warning;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.zksy.base.warning.domain.WarningItem;
+import com.zksy.base.warning.service.WarningItemService;
+import com.zksy.common.core.domain.AjaxResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+@Slf4j
+@RestController
+@RequestMapping("/warning/item")
+@Api(tags = "预警清单管理")
+public class WarningItemController {
+
+    @Autowired
+    private WarningItemService warningItemService;
+
+    @GetMapping("/list")
+    @ApiOperation("事项信息查询-分页查询预警事项列表")
+    @PreAuthorize("@ss.hasPermi('warning:item:list')")
+    public AjaxResult queryWarningItems(
+            @ApiParam("页码") @RequestParam(defaultValue = "1") Integer pageNum,
+            @ApiParam("每页数量") @RequestParam(defaultValue = "10") Integer pageSize,
+            @ApiParam("事项编码") @RequestParam(required = false) String itemCode,
+            @ApiParam("事项名称") @RequestParam(required = false) String itemName,
+            @ApiParam("预警类型") @RequestParam(required = false) String warningType,
+            @ApiParam("预警级别") @RequestParam(required = false) String warningLevel,
+            @ApiParam("预警专项") @RequestParam(required = false) String warningSpecial,
+            @ApiParam("状态") @RequestParam(required = false) String status) {
+        Page<WarningItem> page = new Page<>(pageNum, pageSize);
+        IPage<WarningItem> result = warningItemService.queryWarningItems(page, itemCode, itemName, 
+                                                                          warningType, warningLevel, warningSpecial, status);
+        return AjaxResult.success(result);
+    }
+
+    @PostMapping("/add")
+    @ApiOperation("预警事项管理-新增预警事项")
+    @PreAuthorize("@ss.hasPermi('warning:item:add')")
+    public AjaxResult addWarningItem(@RequestBody WarningItem warningItem) {
+        boolean success = warningItemService.addWarningItem(warningItem);
+        if (success) {
+            return AjaxResult.success(warningItem);
+        } else {
+            return AjaxResult.error("新增预警事项失败");
+        }
+    }
+
+    @PutMapping("/update")
+    @ApiOperation("预警事项管理-修改预警事项")
+    @PreAuthorize("@ss.hasPermi('warning:item:edit')")
+    public AjaxResult updateWarningItem(@RequestBody WarningItem warningItem) {
+        boolean success = warningItemService.updateWarningItem(warningItem);
+        if (success) {
+            return AjaxResult.success();
+        } else {
+            return AjaxResult.error("修改预警事项失败");
+        }
+    }
+
+    @PutMapping("/status")
+    @ApiOperation("预警事项管理-更新事项状态(启用/禁用/作废)")
+    @PreAuthorize("@ss.hasPermi('warning:item:edit')")
+    public AjaxResult updateItemStatus(
+            @ApiParam("事项ID") @RequestParam String itemId,
+            @ApiParam("状态(ENABLED-启用 DISABLED-禁用 INVALID-作废)") @RequestParam String status) {
+        boolean success = warningItemService.updateItemStatus(itemId, status);
+        if (success) {
+            return AjaxResult.success();
+        } else {
+            return AjaxResult.error("更新状态失败");
+        }
+    }
+
+    @GetMapping("/detail/{itemId}")
+    @ApiOperation("预警事项详情-获取事项详细信息")
+    @PreAuthorize("@ss.hasPermi('warning:item:query')")
+    public AjaxResult getItemDetail(@PathVariable String itemId) {
+        WarningItem item = warningItemService.getItemDetail(itemId);
+        if (item != null) {
+            return AjaxResult.success(item);
+        } else {
+            return AjaxResult.error("预警事项不存在");
+        }
+    }
+
+    @GetMapping("/code/generate")
+    @ApiOperation("事项编码生成-自动生成事项编码")
+    @PreAuthorize("@ss.hasPermi('warning:item:query')")
+    public AjaxResult generateItemCode(
+            @ApiParam("预警类型") @RequestParam String warningType,
+            @ApiParam("预警级别") @RequestParam String warningLevel) {
+        String itemCode = warningItemService.generateItemCode(warningType, warningLevel);
+        return AjaxResult.success(itemCode);
+    }
+}

+ 133 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/domain/CaseInfo.java

@@ -0,0 +1,133 @@
+package com.zksy.base.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 案件信息表
+ * @TableName case_info
+ */
+@TableName(value ="case_info")
+@Data
+@ApiModel(value = "案件信息入参", description = "案件信息入参")
+public class CaseInfo implements Serializable {
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 案件ID
+     */
+    @ApiModelProperty(value = "案件ID")
+    @TableId(type = IdType.AUTO)
+    private Long caseId;
+
+    /**
+     * 案件编号
+     */
+    @ApiModelProperty(value = "案件编号")
+    private String caseNo;
+
+    /**
+     * 关联报警ID,手动立案可为空
+     */
+    @ApiModelProperty(value = "报警ID")
+    private String alarmId;
+
+    /**
+     * 关联设备ID
+     */
+    @ApiModelProperty(value = "设备ID")
+    private String deviceId;
+
+    /**
+     * 设备编码
+     */
+    @ApiModelProperty(value = "设备编码")
+    private String deviceCode;
+
+    /**
+     * 案件等级:1-严重 2-一般 3-轻微
+     */
+    @ApiModelProperty(value = "案件等级:1-严重 2-一般 3-轻微")
+    private Integer caseLevel;
+
+    /**
+     * 案件描述
+     */
+    @ApiModelProperty(value = "案件描述")
+    private String caseDesc;
+
+    /**
+     * 案件来源:1-系统自动报警 2-运维巡检上报 3-人工投诉上报 4-平台录入
+     */
+    @ApiModelProperty(value = "案件来源:1-系统自动报警 2-运维巡检上报 3-人工投诉上报 4-平台录入")
+    private Integer caseSource;
+
+    /**
+     * 案件状态:1-待核查 2-办理中 3-已办结 4-误报关闭
+     */
+    @ApiModelProperty(value = "案件状态:1-待核查 2-办理中 3-已办结 4-误报关闭")
+    private Integer caseStatus;
+
+    /**
+     * 立案人ID
+     */
+    @ApiModelProperty(value = "立案人ID")
+    private Long fileUser;
+
+    /**
+     * 核查人ID
+     */
+    @ApiModelProperty(value = "核查人ID")
+    private Long verifyUser;
+
+    /**
+     * 核查完成时间
+     */
+    @ApiModelProperty(value = "核查完成时间")
+    @JsonFormat(locale = "zh",pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date verifyTime;
+
+    /**
+     * 案件办结时间
+     */
+    @ApiModelProperty(value = "案件办结时间")
+    @JsonFormat(locale = "zh",pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date finishTime;
+
+    /**
+     * 案件处置结果、整改说明
+     */
+    @ApiModelProperty(value = "案件处置结果")
+    private String handleResult;
+
+    /**
+     * 案件佐证图片、附件地址
+     */
+    @ApiModelProperty(value = "案件佐证图片、附件地址")
+    private String attachUrl;
+
+    /**
+     * 创建时间
+     */
+    @ApiModelProperty(value = "创建时间")
+    @JsonFormat(locale = "zh",pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    @ApiModelProperty(value = "更新时间")
+    @JsonFormat(locale = "zh",pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date updateTime;
+}

+ 178 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/domain/WorkOrder.java

@@ -0,0 +1,178 @@
+package com.zksy.base.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 运维工单表
+ * @TableName work_order
+ */
+@TableName(value ="work_order")
+@Data
+@ApiModel(value = "运维工单入参", description = "运维工单入参")
+public class WorkOrder implements Serializable {
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 工单ID
+     */
+    @ApiModelProperty(value = "工单ID")
+    @TableId(type = IdType.AUTO)
+    private Long orderId;
+
+    /**
+     * 工单编号
+     */
+    @ApiModelProperty(value = "工单编号")
+    private String orderNo;
+
+    /**
+     * 关联报警ID
+     */
+    @ApiModelProperty(value = "报警ID")
+    private String alarmId;
+
+    /**
+     * 关联案件ID
+     */
+    @ApiModelProperty(value = "案件ID")
+    private Long caseId;
+
+    /**
+     * 案件编号
+     */
+    @ApiModelProperty(value = "案件编号")
+    private String caseNo;
+
+    /**
+     * 关联设备ID
+     */
+    @ApiModelProperty(value = "设备ID")
+    private String deviceId;
+
+    /**
+     * 设备编码
+     */
+    @ApiModelProperty(value = "设备编码")
+    private String deviceCode;
+
+    /**
+     * 工单类型:1-故障维修 2-日常巡检 3-设备保养
+     */
+    @ApiModelProperty(value = "工单类型:1-故障维修 2-日常巡检 3-设备保养")
+    private Integer orderType;
+
+    /**
+     * 工单优先级:1-紧急 2-一般 3-低
+     */
+    @ApiModelProperty(value = "工单优先级:1-紧急 2-一般 3-低")
+    private Integer orderLevel;
+
+    /**
+     * 工单问题描述
+     */
+    @ApiModelProperty(value = "工单问题描述")
+    private String orderDesc;
+
+    /**
+     * 负责部门ID
+     */
+    @ApiModelProperty(value = "负责部门ID")
+    private Long deptId;
+
+    /**
+     * 派单人ID
+     */
+    @ApiModelProperty(value = "派单人ID")
+    private Long dispatchUser;
+
+    /**
+     * 派单时间
+     */
+    @ApiModelProperty(value = "派单时间")
+    @JsonFormat(locale = "zh",pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date dispatchTime;
+
+    /**
+     * 接单运维人员ID
+     */
+    @ApiModelProperty(value = "接单运维人员ID")
+    private Long receiveUser;
+
+    /**
+     * 工单状态:1-待派单 2-待接单 3-已接单 4-处理中 5-待验收 6-已结案 7-已驳回 8-延期审核 9-已延期
+     */
+    @ApiModelProperty(value = "工单状态:1-待派单 2-待接单 3-已接单 4-处理中 5-待验收 6-已结案 7-已驳回 8-延期审核 9-已延期")
+    private Integer orderStatus;
+
+    /**
+     * 延期原因
+     */
+    @ApiModelProperty(value = "延期原因")
+    private String delayedReason;
+
+    /**
+     * 延期截止时间
+     */
+    @ApiModelProperty(value = "延期截止时间")
+    @JsonFormat(locale = "zh",pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date delayedDeadline;
+
+    /**
+     * 计划完成时间
+     */
+    @ApiModelProperty(value = "计划完成时间")
+    @JsonFormat(locale = "zh",pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date planFinishTime;
+
+    /**
+     * 实际完成时间
+     */
+    @ApiModelProperty(value = "实际完成时间")
+    @JsonFormat(locale = "zh",pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date realFinishTime;
+
+    /**
+     * 维修处置结果
+     */
+    @ApiModelProperty(value = "维修处置结果")
+    private String repairResult;
+
+    /**
+     * 验收人ID
+     */
+    @ApiModelProperty(value = "验收人ID")
+    private Long verifyUser;
+
+    /**
+     * 验收时间
+     */
+    @ApiModelProperty(value = "验收时间")
+    @JsonFormat(locale = "zh",pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date verifyTime;
+
+    /**
+     * 创建时间
+     */
+    @ApiModelProperty(value = "创建时间")
+    @JsonFormat(locale = "zh",pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    @ApiModelProperty(value = "更新时间")
+    @JsonFormat(locale = "zh",pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date updateTime;
+}

+ 70 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/domain/WorkOrderLog.java

@@ -0,0 +1,70 @@
+package com.zksy.base.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 工单操作日志表
+ * @TableName work_order_log
+ */
+@TableName(value ="work_order_log")
+@Data
+@ApiModel(value = "工单操作日志入参", description = "工单操作日志入参")
+public class WorkOrderLog implements Serializable {
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 日志ID
+     */
+    @ApiModelProperty(value = "日志ID")
+    @TableId(type = IdType.AUTO)
+    private Long logId;
+
+    /**
+     * 关联工单ID
+     */
+    @ApiModelProperty(value = "工单ID")
+    private Long orderId;
+
+    /**
+     * 操作类型:1-创建工单 2-派单 3-接单 4-开始维修 5-提交验收 6-验收通过 7-驳回工单 8-申请延期
+     */
+    @ApiModelProperty(value = "操作类型:1-创建工单 2-派单 3-接单 4-开始维修 5-提交验收 6-验收通过 7-驳回工单 8-申请延期")
+    private Integer operType;
+
+    /**
+     * 操作详情描述
+     */
+    @ApiModelProperty(value = "操作详情描述")
+    private String operDesc;
+
+    /**
+     * 操作人ID
+     */
+    @ApiModelProperty(value = "操作人ID")
+    private Long operUserId;
+
+    /**
+     * 操作人姓名
+     */
+    @ApiModelProperty(value = "操作人姓名")
+    private String operUserName;
+
+    /**
+     * 操作时间
+     */
+    @ApiModelProperty(value = "操作时间")
+    @JsonFormat(locale = "zh",pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date operTime;
+}

+ 20 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/mapper/CaseInfoMapper.java

@@ -0,0 +1,20 @@
+package com.zksy.base.mapper;
+
+import com.zksy.base.domain.CaseInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @author Administrator
+* @description 针对表【case_info(案件信息表)】的数据库操作Mapper
+* @createDate 2026-06-08 15:01:11
+* @Entity com.zksy.base.domain.CaseInfo
+*/
+@Mapper
+public interface CaseInfoMapper extends BaseMapper<CaseInfo> {
+
+}
+
+
+
+

+ 20 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/mapper/WorkOrderLogMapper.java

@@ -0,0 +1,20 @@
+package com.zksy.base.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zksy.base.domain.WorkOrderLog;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @author Administrator
+* @description 针对表【work_order_log(工单操作日志表)】的数据库操作Mapper
+* @createDate 2026-06-11 11:51:09
+* @Entity com.zksy.base.domain.WorkOrderLog
+*/
+@Mapper
+public interface WorkOrderLogMapper extends BaseMapper<WorkOrderLog> {
+
+}
+
+
+
+

+ 20 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/mapper/WorkOrderMapper.java

@@ -0,0 +1,20 @@
+package com.zksy.base.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zksy.base.domain.WorkOrder;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @author Administrator
+* @description 针对表【work_order(运维工单表)】的数据库操作Mapper
+* @createDate 2026-06-11 11:50:08
+* @Entity com.zksy.base.domain.WorkOrder
+*/
+@Mapper
+public interface WorkOrderMapper extends BaseMapper<WorkOrder> {
+
+}
+
+
+
+

+ 22 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/CaseInfoService.java

@@ -0,0 +1,22 @@
+package com.zksy.base.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zksy.base.domain.CaseInfo;
+import com.zksy.manhole.dto.in.CaseInfoPageInDTO;
+import com.zksy.manhole.dto.out.CaseInfoOutDTO;
+
+/**
+* @author Administrator
+* @description 针对表【case_info(案件信息表)】的数据库操作Service
+* @createDate 2026-06-08 15:01:11
+*/
+public interface CaseInfoService extends IService<CaseInfo> {
+
+    /**
+     * 分页查询案件信息列表
+     * @param pageInDTO
+     * @return
+     */
+    Page<CaseInfoOutDTO> findByPage(CaseInfoPageInDTO pageInDTO);
+}

+ 24 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/MonitorPointService.java

@@ -5,7 +5,31 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.zksy.base.domain.MonitorPoint;
 import com.zksy.base.dto.MonitorPointPageInDTO;
 
+import java.util.List;
+import java.util.Map;
+
 public interface MonitorPointService extends IService<MonitorPoint> {
 
     Page<MonitorPoint> findByPage(MonitorPointPageInDTO dto);
+    Page<MonitorPoint> findByPage(long pageNum, long pageSize,
+                                    String pointCode, String pointName,
+                                    String pointType, String status);
+
+    boolean saveWithCheck(MonitorPoint entity);
+
+    boolean saveBatchWithCheck(List<MonitorPoint> entityList);
+
+    boolean updateWithCheck(MonitorPoint entity);
+
+    boolean removeWithCheck(String id);
+
+    boolean removeBatchWithCheck(List<String> ids);
+
+    boolean bindEquipment(String pointId, List<String> equipmentIds);
+
+    boolean unbindEquipment(String pointId, List<String> equipmentIds);
+
+    Map<String, Object> getPointDetail(String pointId);
+
+    List<MonitorPoint> getPointsByNetwork(String networkId);
 }

+ 12 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/PipeNetworkBaseService.java

@@ -10,6 +10,18 @@ import java.util.List;
 public interface PipeNetworkBaseService extends IService<PipeNetworkBase> {
 
     Page<PipeNetworkBase> findByPage(PipeNetworkPageInDTO dto);
+    Page<PipeNetworkBase> findByPage(long pageNum, long pageSize,
+                                      String networkCode, String networkName,
+                                      String networkType, String status);
+
+    boolean saveWithCheck(PipeNetworkBase entity);
+
+    boolean saveBatchWithCheck(List<PipeNetworkBase> entityList);
+
+    boolean updateWithCheck(PipeNetworkBase entity);
 
     List<PipeNetworkBase> getOptions();
+    boolean removeWithCheck(String id);
+
+    boolean removeBatchWithCheck(List<String> ids);
 }

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

@@ -0,0 +1,13 @@
+package com.zksy.base.service;
+
+import com.zksy.base.domain.WorkOrderLog;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author Administrator
+* @description 针对表【work_order_log(工单操作日志表)】的数据库操作Service
+* @createDate 2026-06-11 11:51:09
+*/
+public interface WorkOrderLogService extends IService<WorkOrderLog> {
+
+}

+ 22 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/WorkOrderService.java

@@ -0,0 +1,22 @@
+package com.zksy.base.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zksy.base.domain.WorkOrder;
+import com.zksy.manhole.dto.in.WorkOrderPageInDTO;
+import com.zksy.manhole.dto.out.WorkOrderOutDTO;
+
+/**
+* @author Administrator
+* @description 针对表【work_order(运维工单表)】的数据库操作Service
+* @createDate 2026-06-11 11:50:08
+*/
+public interface WorkOrderService extends IService<WorkOrder> {
+
+    /**
+     * 分页查询工单信息列表
+     * @param pageInDTO
+     * @return
+     */
+    Page<WorkOrderOutDTO> findByPage(WorkOrderPageInDTO pageInDTO);
+}

+ 119 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/impl/CaseInfoServiceImpl.java

@@ -0,0 +1,119 @@
+package com.zksy.base.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zksy.base.domain.CaseInfo;
+import com.zksy.base.domain.EquipmentBase;
+import com.zksy.base.domain.EquipmentStatus;
+import com.zksy.base.domain.EquipmentType;
+import com.zksy.base.mapper.CaseInfoMapper;
+import com.zksy.base.mapper.EquipmentBaseMapper;
+import com.zksy.base.mapper.EquipmentStatusMapper;
+import com.zksy.base.mapper.EquipmentTypeMapper;
+import com.zksy.base.service.CaseInfoService;
+import com.zksy.manhole.dto.in.CaseInfoPageInDTO;
+import com.zksy.manhole.dto.out.CaseInfoOutDTO;
+import com.zksy.manhole.dto.out.EquipmentStatusOutDTO;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+/**
+* @author Administrator
+* @description 针对表【case_info(案件信息表)】的数据库操作Service实现
+* @createDate 2026-06-08 15:01:11
+*/
+@Slf4j
+@Service
+public class CaseInfoServiceImpl extends ServiceImpl<CaseInfoMapper, CaseInfo>
+    implements CaseInfoService{
+
+    @Autowired
+    private EquipmentBaseMapper equipmentBaseMapper;
+
+    @Autowired
+    private EquipmentTypeMapper equipmentTypeMapper;
+
+    @Autowired
+    private EquipmentStatusMapper equipmentStatusMapper;
+
+    /**
+     * 分页查询案件信息列表
+     * @param pageInDTO
+     * @return
+     */
+    @Override
+    public Page<CaseInfoOutDTO> findByPage(CaseInfoPageInDTO pageInDTO) {
+        log.info("分页查询案件信息列表-入参:{}", pageInDTO);
+        List<String> equipmentIds = null;
+        if(StringUtils.isNotEmpty(pageInDTO.getEquipmentLocation())){
+            List<EquipmentBase> equipmentBaseList = equipmentBaseMapper.selectList(new LambdaQueryWrapper<EquipmentBase>()
+                    .like(EquipmentBase::getEquipmentLocation, pageInDTO.getEquipmentLocation()));
+            if(CollUtil.isEmpty(equipmentBaseList)){
+                return new Page<>(pageInDTO.getPageNum(), pageInDTO.getPageSize(), 0);
+            }
+            equipmentIds = equipmentBaseList.stream().map(EquipmentBase::getEquipmentId).distinct().collect(Collectors.toList());
+        }
+        Page<CaseInfo> page = new Page<>(pageInDTO.getPageNum(), pageInDTO.getPageSize());
+        LambdaQueryWrapper<CaseInfo> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.like(StringUtils.isNotEmpty(pageInDTO.getCaseNo()), CaseInfo::getCaseNo, pageInDTO.getCaseNo())
+                .in(CollUtil.isNotEmpty(equipmentIds), CaseInfo::getDeviceId, equipmentIds)
+                .orderByDesc(CaseInfo::getUpdateTime);
+        Page<CaseInfo> rs = this.page(page, queryWrapper);
+        List<CaseInfoOutDTO> outDTOList = BeanUtil.copyToList(rs.getRecords(), CaseInfoOutDTO.class);
+        if (CollUtil.isNotEmpty(outDTOList)) {
+            //查询设备状态
+            List<String> equipmentIdList = outDTOList.stream().map(CaseInfoOutDTO::getDeviceId).distinct().collect(Collectors.toList());
+            List<EquipmentStatus> equipmentStatusList = equipmentStatusMapper.selectList(new LambdaQueryWrapper<EquipmentStatus>()
+                    .in(EquipmentStatus::getEquipmentId, equipmentIdList));
+            Map<String, EquipmentStatus> equipmentStatusMap = new HashMap<>();
+            if(CollUtil.isNotEmpty(equipmentStatusList)){
+                equipmentStatusMap.putAll(equipmentStatusList.stream().collect(Collectors.toMap(EquipmentStatus::getEquipmentId, Function.identity(), (key1, key2) -> key2)));
+            }
+            //查询设备类型
+            List<EquipmentBase> equipmentBaseList = equipmentBaseMapper.selectBatchIds(equipmentIdList);
+            Map<String, EquipmentBase> equipmentBaseMap = new HashMap<>();
+            if(CollUtil.isNotEmpty(equipmentBaseList)){
+                equipmentBaseMap.putAll(equipmentBaseList.stream().collect(Collectors.toMap(EquipmentBase::getEquipmentId, Function.identity(), (key1, key2) -> key2)));
+            }
+            List<String> equipmentTypeIdList = equipmentBaseList.stream().map(EquipmentBase::getEquipmentTypeId).distinct().collect(Collectors.toList());
+            List<EquipmentType> equipmentTypeList = equipmentTypeMapper.selectBatchIds(equipmentTypeIdList);
+            Map<String, EquipmentType> equipmentTypeMap = new HashMap<>();
+            if(CollUtil.isNotEmpty(equipmentTypeList)){
+                equipmentTypeMap.putAll(equipmentTypeList.stream().collect(Collectors.toMap(EquipmentType::getTypeId, Function.identity(), (key1, key2) -> key2)));
+            }
+            for(CaseInfoOutDTO outDTO : outDTOList) {
+                EquipmentBase equipmentBase = equipmentBaseMap.get(outDTO.getDeviceId());
+                if(equipmentBase != null){
+                    outDTO.setDeviceCode(equipmentBase.getEquipmentCode());
+                    EquipmentType equipmentType = equipmentTypeMap.get(equipmentBase.getEquipmentTypeId());
+                    if(equipmentType != null){
+                        outDTO.setEquipmentTypeName(equipmentType.getTypeName());
+                    }
+                }
+                EquipmentStatus equipmentStatus = equipmentStatusMap.get(outDTO.getDeviceId());
+                if(equipmentStatus != null){
+                    EquipmentStatusOutDTO equipmentStatusOutDTO = BeanUtil.copyProperties(equipmentStatus, EquipmentStatusOutDTO.class);
+                    outDTO.setEquipmentStatus(equipmentStatusOutDTO);
+                }
+            }
+        }
+        Page<CaseInfoOutDTO> outPage = new Page<>(pageInDTO.getPageNum(), pageInDTO.getPageSize(), rs.getTotal());
+        outPage.setRecords(outDTOList);
+        return outPage;
+    }
+}
+
+
+
+

+ 238 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/impl/MonitorPointServiceImpl.java

@@ -1,27 +1,265 @@
 package com.zksy.base.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zksy.base.domain.EquipmentBase;
+import com.zksy.base.domain.EquipmentPointRel;
 import com.zksy.base.domain.MonitorPoint;
 import com.zksy.base.dto.MonitorPointPageInDTO;
+import com.zksy.base.domain.PipeNetworkBase;
+import com.zksy.base.mapper.EquipmentBaseMapper;
+import com.zksy.base.mapper.EquipmentPointRelMapper;
 import com.zksy.base.mapper.MonitorPointMapper;
+import com.zksy.base.mapper.PipeNetworkBaseMapper;
 import com.zksy.base.service.MonitorPointService;
+import com.zksy.common.exception.ServiceException;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Service
 public class MonitorPointServiceImpl extends ServiceImpl<MonitorPointMapper, MonitorPoint>
         implements MonitorPointService {
 
+    @Autowired
+    private EquipmentPointRelMapper equipmentPointRelMapper;
+
+    @Autowired
+    private EquipmentBaseMapper equipmentBaseMapper;
+
+    @Autowired
+    private PipeNetworkBaseMapper pipeNetworkBaseMapper;
+
+    @Override
+    public Page<MonitorPoint> findByPage(long pageNum, long pageSize,
+                                          String pointCode, String pointName,
+                                          String pointType, String status) {
+        Page<MonitorPoint> page = new Page<>(pageNum, pageSize);
+        LambdaQueryWrapper<MonitorPoint> queryWrapper = new LambdaQueryWrapper<>();
+        if (pointCode != null && !pointCode.isEmpty()) {
+            queryWrapper.like(MonitorPoint::getPointCode, pointCode);
+        }
+        if (pointName != null && !pointName.isEmpty()) {
+            queryWrapper.like(MonitorPoint::getPointName, pointName);
+        }
+        if (pointType != null && !pointType.isEmpty()) {
+            queryWrapper.eq(MonitorPoint::getPointType, pointType);
+        }
+        if (status != null && !status.isEmpty()) {
+            queryWrapper.eq(MonitorPoint::getStatus, status);
+        }
+        queryWrapper.orderByDesc(MonitorPoint::getCreateTime);
+        return this.page(page, queryWrapper);
+    }
+
+    @Override
+    public boolean saveWithCheck(MonitorPoint entity) {
+        if (entity.getNetworkId() != null) {
+            PipeNetworkBase network = pipeNetworkBaseMapper.selectById(entity.getNetworkId());
+            if (network == null) {
+                throw new ServiceException("关联管网设施不存在:" + entity.getNetworkId());
+            }
+        }
+        LambdaQueryWrapper<MonitorPoint> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(MonitorPoint::getPointCode, entity.getPointCode());
+        long count = this.count(queryWrapper);
+        if (count > 0) {
+            throw new ServiceException("监测点编码已存在,请更换:" + entity.getPointCode());
+        }
+        return this.save(entity);
+    }
+
+    @Override
+    public boolean saveBatchWithCheck(List<MonitorPoint> entityList) {
+        Set<String> codeSet = new HashSet<>();
+        for (MonitorPoint entity : entityList) {
+            String code = entity.getPointCode();
+            if (codeSet.contains(code)) {
+                throw new ServiceException("列表中存在重复编码:" + code);
+            }
+            codeSet.add(code);
+        }
+
+        for (MonitorPoint entity : entityList) {
+            if (entity.getNetworkId() != null) {
+                if (pipeNetworkBaseMapper.selectById(entity.getNetworkId()) == null) {
+                    throw new ServiceException("关联管网设施不存在:" + entity.getNetworkId());
+                }
+            }
+            LambdaQueryWrapper<MonitorPoint> wrapper = new LambdaQueryWrapper<>();
+            wrapper.eq(MonitorPoint::getPointCode, entity.getPointCode());
+            if (this.count(wrapper) > 0) {
+                throw new ServiceException("监测点编码已存在:" + entity.getPointCode());
+            }
+        }
+        return this.saveBatch(entityList);
+    }
+
     @Override
     public Page<MonitorPoint> findByPage(MonitorPointPageInDTO dto) {
         Page<MonitorPoint> page = new Page<>(dto.getPageNum(), dto.getPageSize());
+    @Transactional
+    public boolean updateWithCheck(MonitorPoint entity) {
+        String pointId = entity.getPointId();
+        if (this.getById(pointId) == null) {
+            throw new ServiceException("监测点不存在,无法修改:" + pointId);
+        }
+
+        if (entity.getNetworkId() != null) {
+            if (pipeNetworkBaseMapper.selectById(entity.getNetworkId()) == null) {
+                throw new ServiceException("关联管网设施不存在:" + entity.getNetworkId());
+            }
+        }
+
+        String newCode = entity.getPointCode();
+        if (newCode != null) {
+            LambdaQueryWrapper<MonitorPoint> wrapper = new LambdaQueryWrapper<>();
+            wrapper.eq(MonitorPoint::getPointCode, newCode)
+                    .ne(MonitorPoint::getPointId, pointId);
+            if (this.count(wrapper) > 0) {
+                throw new ServiceException("监测点编码已被使用:" + newCode);
+            }
+        }
+        return this.updateById(entity);
+    }
+
+    @Override
+    @Transactional
+    public boolean removeWithCheck(String pointId) {
+        MonitorPoint point = this.getById(pointId);
+        if (point == null) {
+            throw new ServiceException("监测点不存在:" + pointId);
+        }
+
+        LambdaQueryWrapper<EquipmentPointRel> relWrapper = new LambdaQueryWrapper<>();
+        relWrapper.eq(EquipmentPointRel::getPointId, pointId);
+        equipmentPointRelMapper.delete(relWrapper);
+        log.info("已删除监测点[{}]的设备关联关系", pointId);
+
+        return this.baseMapper.deleteById(pointId) > 0;
+    }
+
+    @Override
+    @Transactional
+    public boolean removeBatchWithCheck(List<String> pointIds) {
+        if (CollectionUtils.isEmpty(pointIds)) {
+            throw new ServiceException("批量删除失败:监测点ID列表不能为空");
+        }
+
+        List<MonitorPoint> existPoints = this.listByIds(pointIds);
+        if (existPoints.isEmpty()) {
+            throw new ServiceException("批量删除失败:所有监测点ID均不存在");
+        }
+
+        List<String> existIds = existPoints.stream()
+                .map(MonitorPoint::getPointId)
+                .collect(Collectors.toList());
+
+        List<String> invalidIds = pointIds.stream()
+                .filter(id -> !existIds.contains(id))
+                .collect(Collectors.toList());
+        if (!invalidIds.isEmpty()) {
+            log.warn("批量删除中存在无效监测点ID:{}", invalidIds);
+        }
+
+        LambdaQueryWrapper<EquipmentPointRel> relWrapper = new LambdaQueryWrapper<>();
+        relWrapper.in(EquipmentPointRel::getPointId, existIds);
+        equipmentPointRelMapper.delete(relWrapper);
+        log.info("已批量删除{}条监测点的设备关联关系", existIds.size());
+
+        return this.removeByIds(existIds);
+    }
+
+    @Override
+    @Transactional
+    public boolean bindEquipment(String pointId, List<String> equipmentIds) {
+        MonitorPoint point = this.getById(pointId);
+        if (point == null) {
+            throw new ServiceException("监测点不存在:" + pointId);
+        }
+
+        for (String equipmentId : equipmentIds) {
+            EquipmentBase equipment = equipmentBaseMapper.selectById(equipmentId);
+            if (equipment == null) {
+                throw new ServiceException("设备不存在:" + equipmentId);
+            }
+            LambdaQueryWrapper<EquipmentPointRel> checkWrapper = new LambdaQueryWrapper<>();
+            checkWrapper.eq(EquipmentPointRel::getPointId, pointId)
+                    .eq(EquipmentPointRel::getEquipmentId, equipmentId);
+            if (equipmentPointRelMapper.selectCount(checkWrapper) > 0) {
+                throw new ServiceException("设备已绑定此监测点:" + equipmentId);
+            }
+        }
+
+        List<EquipmentPointRel> relList = new ArrayList<>();
+        for (String equipmentId : equipmentIds) {
+            EquipmentPointRel rel = new EquipmentPointRel();
+            rel.setPointId(pointId);
+            rel.setEquipmentId(equipmentId);
+            relList.add(rel);
+        }
+
+        // 逐个插入或批量插入,因为 relList 类型和 this.saveBatch 不匹配
+        int count = 0;
+        for (EquipmentPointRel rel : relList) {
+            count += equipmentPointRelMapper.insert(rel);
+        }
+        return count > 0;
+    }
+
+    @Override
+    @Transactional
+    public boolean unbindEquipment(String pointId, List<String> equipmentIds) {
+        LambdaQueryWrapper<EquipmentPointRel> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(EquipmentPointRel::getPointId, pointId)
+                .in(EquipmentPointRel::getEquipmentId, equipmentIds);
+        return equipmentPointRelMapper.delete(wrapper) > 0;
+    }
+
+    @Override
+    public Map<String, Object> getPointDetail(String pointId) {
+        MonitorPoint point = this.getById(pointId);
+        if (point == null) {
+            throw new ServiceException("监测点不存在:" + pointId);
+        }
+
+        Map<String, Object> result = new HashMap<>();
+        result.put("pointInfo", point);
+
+        if (point.getNetworkId() != null) {
+            PipeNetworkBase network = pipeNetworkBaseMapper.selectById(point.getNetworkId());
+            result.put("networkInfo", network);
+        }
+
+        LambdaQueryWrapper<EquipmentPointRel> relWrapper = new LambdaQueryWrapper<>();
+        relWrapper.eq(EquipmentPointRel::getPointId, pointId);
+        List<EquipmentPointRel> relList = equipmentPointRelMapper.selectList(relWrapper);
+        if (!relList.isEmpty()) {
+            List<String> equipmentIds = relList.stream()
+                    .map(EquipmentPointRel::getEquipmentId)
+                    .collect(Collectors.toList());
+            List<EquipmentBase> equipmentList = equipmentBaseMapper.selectBatchIds(equipmentIds);
+            result.put("equipmentList", equipmentList);
+        }
+
+        return result;
+    }
+
+    @Override
+    public List<MonitorPoint> getPointsByNetwork(String networkId) {
         LambdaQueryWrapper<MonitorPoint> wrapper = new LambdaQueryWrapper<>();
         wrapper.like(dto.getPointName() != null && !dto.getPointName().isEmpty(), MonitorPoint::getPointName, dto.getPointName());
         wrapper.eq(dto.getPointType() != null && !dto.getPointType().isEmpty(), MonitorPoint::getPointType, dto.getPointType());
+        wrapper.eq(MonitorPoint::getNetworkId, networkId);
         wrapper.orderByDesc(MonitorPoint::getCreateTime);
         return this.page(page, wrapper);
+        return this.list(wrapper);
     }
 }

+ 110 - 15
pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/impl/PipeNetworkBaseServiceImpl.java

@@ -1,16 +1,22 @@
 package com.zksy.base.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.zksy.base.domain.PipeNetworkBase;
 import com.zksy.base.dto.PipeNetworkPageInDTO;
 import com.zksy.base.mapper.PipeNetworkBaseMapper;
 import com.zksy.base.service.PipeNetworkBaseService;
+import com.zksy.common.exception.ServiceException;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Service
@@ -18,23 +24,112 @@ public class PipeNetworkBaseServiceImpl extends ServiceImpl<PipeNetworkBaseMappe
         implements PipeNetworkBaseService {
 
     @Override
-    public Page<PipeNetworkBase> findByPage(PipeNetworkPageInDTO dto) {
-        Page<PipeNetworkBase> page = new Page<>(dto.getPageNum(), dto.getPageSize());
-        LambdaQueryWrapper<PipeNetworkBase> wrapper = new LambdaQueryWrapper<>();
-        wrapper.like(dto.getNetworkName() != null && !dto.getNetworkName().isEmpty(), PipeNetworkBase::getNetworkName, dto.getNetworkName());
-        wrapper.like(dto.getManagementUnit() != null && !dto.getManagementUnit().isEmpty(), PipeNetworkBase::getManagementUnit, dto.getManagementUnit());
-        wrapper.eq(dto.getNetworkLevel() != null && !dto.getNetworkLevel().isEmpty(), PipeNetworkBase::getNetworkLevel, dto.getNetworkLevel());
-        wrapper.like(dto.getMaterial() != null && !dto.getMaterial().isEmpty(), PipeNetworkBase::getMaterial, dto.getMaterial());
-        wrapper.eq(dto.getStatus() != null && !dto.getStatus().isEmpty(), PipeNetworkBase::getStatus, dto.getStatus());
-        wrapper.orderByDesc(PipeNetworkBase::getCreateTime);
-        return this.page(page, wrapper);
+    public Page<PipeNetworkBase> findByPage(long pageNum, long pageSize,
+                                             String networkCode, String networkName,
+                                             String networkType, String status) {
+        Page<PipeNetworkBase> page = new Page<>(pageNum, pageSize);
+        LambdaQueryWrapper<PipeNetworkBase> queryWrapper = new LambdaQueryWrapper<>();
+        if (networkCode != null && !networkCode.isEmpty()) {
+            queryWrapper.like(PipeNetworkBase::getNetworkCode, networkCode);
+        }
+        if (networkName != null && !networkName.isEmpty()) {
+            queryWrapper.like(PipeNetworkBase::getNetworkName, networkName);
+        }
+        if (networkType != null && !networkType.isEmpty()) {
+            queryWrapper.eq(PipeNetworkBase::getNetworkType, networkType);
+        }
+        if (status != null && !status.isEmpty()) {
+            queryWrapper.eq(PipeNetworkBase::getStatus, status);
+        }
+        queryWrapper.orderByDesc(PipeNetworkBase::getCreateTime);
+        return this.page(page, queryWrapper);
     }
 
     @Override
-    public List<PipeNetworkBase> getOptions() {
-        LambdaQueryWrapper<PipeNetworkBase> wrapper = new LambdaQueryWrapper<>();
-        wrapper.select(PipeNetworkBase::getNetworkId, PipeNetworkBase::getNetworkName, PipeNetworkBase::getNetworkCode);
-        wrapper.orderByAsc(PipeNetworkBase::getNetworkName);
-        return this.list(wrapper);
+    public boolean saveWithCheck(PipeNetworkBase entity) {
+        LambdaQueryWrapper<PipeNetworkBase> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(PipeNetworkBase::getNetworkCode, entity.getNetworkCode());
+        long count = this.count(queryWrapper);
+        if (count > 0) {
+            throw new ServiceException("设施编码已存在,请更换:" + entity.getNetworkCode());
+        }
+        return this.save(entity);
+    }
+
+    @Override
+    public boolean saveBatchWithCheck(List<PipeNetworkBase> entityList) {
+        Set<String> codeSet = new HashSet<>();
+        for (PipeNetworkBase entity : entityList) {
+            String code = entity.getNetworkCode();
+            if (codeSet.contains(code)) {
+                throw new ServiceException("列表中存在重复编码:" + code);
+            }
+            codeSet.add(code);
+        }
+
+        for (PipeNetworkBase entity : entityList) {
+            LambdaQueryWrapper<PipeNetworkBase> wrapper = new LambdaQueryWrapper<>();
+            wrapper.eq(PipeNetworkBase::getNetworkCode, entity.getNetworkCode());
+            if (this.count(wrapper) > 0) {
+                throw new ServiceException("设施编码已存在:" + entity.getNetworkCode());
+            }
+        }
+        return this.saveBatch(entityList);
+    }
+
+    @Override
+    @Transactional
+    public boolean updateWithCheck(PipeNetworkBase entity) {
+        String networkId = entity.getNetworkId();
+        if (this.getById(networkId) == null) {
+            throw new ServiceException("设施不存在,无法修改:" + networkId);
+        }
+
+        String newCode = entity.getNetworkCode();
+        if (newCode != null) {
+            LambdaQueryWrapper<PipeNetworkBase> wrapper = new LambdaQueryWrapper<>();
+            wrapper.eq(PipeNetworkBase::getNetworkCode, newCode)
+                    .ne(PipeNetworkBase::getNetworkId, networkId);
+            if (this.count(wrapper) > 0) {
+                throw new ServiceException("设施编码已被使用:" + newCode);
+            }
+        }
+        return this.updateById(entity);
+    }
+
+    @Override
+    @Transactional
+    public boolean removeWithCheck(String networkId) {
+        PipeNetworkBase network = this.getById(networkId);
+        if (network == null) {
+            throw new ServiceException("设施不存在:" + networkId);
+        }
+        return this.baseMapper.deleteById(networkId) > 0;
+    }
+
+    @Override
+    @Transactional
+    public boolean removeBatchWithCheck(List<String> networkIds) {
+        if (CollectionUtils.isEmpty(networkIds)) {
+            throw new ServiceException("批量删除失败:设施ID列表不能为空");
+        }
+
+        List<PipeNetworkBase> existNetworks = this.listByIds(networkIds);
+        if (existNetworks.isEmpty()) {
+            throw new ServiceException("批量删除失败:所有设施ID均不存在");
+        }
+
+        List<String> existIds = existNetworks.stream()
+                .map(PipeNetworkBase::getNetworkId)
+                .collect(Collectors.toList());
+
+        List<String> invalidIds = networkIds.stream()
+                .filter(id -> !existIds.contains(id))
+                .collect(Collectors.toList());
+        if (!invalidIds.isEmpty()) {
+            log.warn("批量删除中存在无效设施ID:{}", invalidIds);
+        }
+
+        return this.removeByIds(existIds);
     }
 }

+ 24 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/service/impl/WorkOrderLogServiceImpl.java

@@ -0,0 +1,24 @@
+package com.zksy.base.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zksy.base.domain.WorkOrderLog;
+import com.zksy.base.mapper.WorkOrderLogMapper;
+import com.zksy.base.service.WorkOrderLogService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+/**
+* @author Administrator
+* @description 针对表【work_order_log(工单操作日志表)】的数据库操作Service实现
+* @createDate 2026-06-11 11:51:09
+*/
+@Slf4j
+@Service
+public class WorkOrderLogServiceImpl extends ServiceImpl<WorkOrderLogMapper, WorkOrderLog>
+    implements WorkOrderLogService{
+
+}
+
+
+
+

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

@@ -0,0 +1,51 @@
+package com.zksy.base.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zksy.base.domain.WorkOrder;
+import com.zksy.base.mapper.WorkOrderMapper;
+import com.zksy.base.service.WorkOrderService;
+import com.zksy.manhole.dto.in.WorkOrderPageInDTO;
+import com.zksy.manhole.dto.out.WorkOrderOutDTO;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+* @author Administrator
+* @description 针对表【work_order(运维工单表)】的数据库操作Service实现
+* @createDate 2026-06-11 11:50:08
+*/
+@Slf4j
+@Service
+public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder>
+    implements WorkOrderService{
+
+    /**
+     * 分页查询工单信息列表
+     * @param pageInDTO
+     * @return
+     */
+    @Override
+    public Page<WorkOrderOutDTO> findByPage(WorkOrderPageInDTO pageInDTO) {
+        log.info("分页查询工单信息列表-入参:{}", pageInDTO);
+        Page<WorkOrder> page = new Page<>(pageInDTO.getPageNum(), pageInDTO.getPageSize());
+        LambdaQueryWrapper<WorkOrder> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.like(StringUtils.isNotEmpty(pageInDTO.getOrderNo()), WorkOrder::getOrderNo, pageInDTO.getOrderNo())
+                .like(StringUtils.isNotEmpty(pageInDTO.getCaseNo()), WorkOrder::getCaseNo, pageInDTO.getCaseNo())
+                .orderByDesc(WorkOrder::getUpdateTime);
+        Page<WorkOrder> rs = this.page(page, queryWrapper);
+        List<WorkOrderOutDTO> outDTOList = BeanUtil.copyToList(rs.getRecords(), WorkOrderOutDTO.class);
+        Page<WorkOrderOutDTO> outPage = new Page<>(pageInDTO.getPageNum(), pageInDTO.getPageSize(), rs.getTotal());
+        outPage.setRecords(outDTOList);
+        return outPage;
+    }
+}
+
+
+
+

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

@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
@@ -64,6 +65,7 @@ public class EarlyWarning implements Serializable {
 
     @TableField("publish_time")
     @ApiModelProperty("发布时间")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime publishTime;
 

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

@@ -26,19 +26,19 @@ public interface EarlyWarningService extends IService<EarlyWarning> {
 
     boolean saveWarning(EarlyWarning warning, List<String> alarmIds, List<MultipartFile> files);
 
-    boolean updateWarning(EarlyWarning warning, List<MultipartFile> files);
+    boolean updateWarning(EarlyWarning warning, List<String> alarmIds, List<MultipartFile> files);
 
     boolean deleteWarning(String warningId);
 
     boolean deleteBatchWarning(List<String> warningIds);
 
-    boolean publishWarning(String warningId, String disposalUser);
+    boolean publishWarning(String warningId);
 
-    boolean upgradeWarning(String warningId, String newLevel, String disposalUser, String disposalContent);
+    boolean upgradeWarning(String warningId, String newLevel, String disposalContent);
 
-    boolean resolveWarning(String warningId, String disposalUser, String disposalContent);
+    boolean resolveWarning(String warningId, String disposalContent);
 
-    boolean returnWarning(String warningId, String disposalUser, String disposalContent);
+    boolean returnWarning(String warningId, String disposalContent);
 
     boolean supervisionWarning(String warningId, String supervisionUser, String supervisionContent, String notificationType, String notificationContent, String attachmentUrl);
 

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

@@ -0,0 +1,27 @@
+package com.zksy.base.warning.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zksy.base.warning.domain.WarningItem;
+import com.zksy.base.warning.domain.WarningReason;
+
+import java.util.List;
+
+public interface WarningItemService extends IService<WarningItem> {
+
+    IPage<WarningItem> queryWarningItems(Page<WarningItem> page, String itemCode, String itemName, 
+                                         String warningType, String warningLevel, String warningSpecial, String status);
+
+    boolean addWarningItem(WarningItem warningItem);
+
+    boolean updateWarningItem(WarningItem warningItem);
+
+    boolean updateItemStatus(String itemId, String status);
+
+    WarningItem getItemDetail(String itemId);
+
+    WarningItem getItemByCode(String itemCode);
+
+    String generateItemCode(String warningType, String warningLevel);
+}

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

@@ -191,11 +191,16 @@ public class EarlyWarningServiceImpl extends ServiceImpl<EarlyWarningMapper, Ear
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean updateWarning(EarlyWarning warning, List<MultipartFile> files) {
+    public boolean updateWarning(EarlyWarning warning, List<String> alarmIds, List<MultipartFile> files) {
         warning.setUpdateTime(LocalDateTime.now());
         boolean result = updateById(warning);
-        if (result && files != null && !files.isEmpty()) {
-            saveAttachments(warning.getWarningId(), files);
+        if (result) {
+            if (alarmIds != null) {
+                linkAlarms(warning.getWarningId(), alarmIds);
+            }
+            if (files != null && !files.isEmpty()) {
+                saveAttachments(warning.getWarningId(), files);
+            }
         }
         return result;
     }
@@ -252,7 +257,7 @@ public class EarlyWarningServiceImpl extends ServiceImpl<EarlyWarningMapper, Ear
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean publishWarning(String warningId, String disposalUser) {
+    public boolean publishWarning(String warningId) {
         EarlyWarning warning = getById(warningId);
         if (warning == null) return false;
 
@@ -263,7 +268,7 @@ public class EarlyWarningServiceImpl extends ServiceImpl<EarlyWarningMapper, Ear
         boolean result = updateById(warning);
 
         if (result) {
-            addDisposalRecord(warningId, "RELEASE", null, null, disposalUser, "系统发布预警信息");
+            addDisposalRecord(warningId, "RELEASE", null, null, warning.getHandler(), "系统发布预警信息");
             createTodo(warningId, warning.getHandler(), "待办预警", "TODO");
         }
 
@@ -272,7 +277,7 @@ public class EarlyWarningServiceImpl extends ServiceImpl<EarlyWarningMapper, Ear
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean upgradeWarning(String warningId, String newLevel, String disposalUser, String disposalContent) {
+    public boolean upgradeWarning(String warningId, String newLevel, String disposalContent) {
         EarlyWarning warning = getById(warningId);
         if (warning == null) return false;
 
@@ -282,14 +287,14 @@ public class EarlyWarningServiceImpl extends ServiceImpl<EarlyWarningMapper, Ear
 
         boolean result = updateById(warning);
         if (result) {
-            addDisposalRecord(warningId, "UPGRADE", oldLevel, newLevel, disposalUser, disposalContent);
+            addDisposalRecord(warningId, "UPGRADE", oldLevel, newLevel, warning.getHandler(), disposalContent);
         }
         return result;
     }
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean resolveWarning(String warningId, String disposalUser, String disposalContent) {
+    public boolean resolveWarning(String warningId, String disposalContent) {
         EarlyWarning warning = getById(warningId);
         if (warning == null) return false;
 
@@ -298,7 +303,7 @@ public class EarlyWarningServiceImpl extends ServiceImpl<EarlyWarningMapper, Ear
 
         boolean result = updateById(warning);
         if (result) {
-            addDisposalRecord(warningId, "RESOLVE", null, null, disposalUser, disposalContent);
+            addDisposalRecord(warningId, "RESOLVE", null, null, warning.getHandler(), disposalContent);
             completeTodo(warningId);
             
             // 解除预警时自动创建归档
@@ -312,7 +317,7 @@ public class EarlyWarningServiceImpl extends ServiceImpl<EarlyWarningMapper, Ear
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean returnWarning(String warningId, String disposalUser, String disposalContent) {
+    public boolean returnWarning(String warningId, String disposalContent) {
         EarlyWarning warning = getById(warningId);
         if (warning == null) return false;
 
@@ -321,7 +326,7 @@ public class EarlyWarningServiceImpl extends ServiceImpl<EarlyWarningMapper, Ear
 
         boolean result = updateById(warning);
         if (result) {
-            addDisposalRecord(warningId, "RETURN", null, null, disposalUser, disposalContent);
+            addDisposalRecord(warningId, "RETURN", null, null, warning.getHandler(), disposalContent);
         }
         return result;
     }

+ 113 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/base/warning/service/impl/WarningItemServiceImpl.java

@@ -0,0 +1,113 @@
+package com.zksy.base.warning.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zksy.base.warning.domain.WarningItem;
+import com.zksy.base.warning.mapper.WarningItemMapper;
+import com.zksy.base.warning.service.WarningItemService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+@Slf4j
+@Service
+public class WarningItemServiceImpl extends ServiceImpl<WarningItemMapper, WarningItem> implements WarningItemService {
+
+    @Override
+    public IPage<WarningItem> queryWarningItems(Page<WarningItem> page, String itemCode, String itemName, 
+                                                 String warningType, String warningLevel, String warningSpecial, String status) {
+        LambdaQueryWrapper<WarningItem> wrapper = new LambdaQueryWrapper<>();
+        
+        if (itemCode != null && !itemCode.isEmpty()) {
+            wrapper.like(WarningItem::getItemCode, itemCode);
+        }
+        if (itemName != null && !itemName.isEmpty()) {
+            wrapper.like(WarningItem::getItemName, itemName);
+        }
+        if (warningType != null && !warningType.isEmpty()) {
+            wrapper.eq(WarningItem::getWarningType, warningType);
+        }
+        if (warningLevel != null && !warningLevel.isEmpty()) {
+            wrapper.eq(WarningItem::getWarningLevel, warningLevel);
+        }
+        if (warningSpecial != null && !warningSpecial.isEmpty()) {
+            wrapper.like(WarningItem::getWarningSpecial, warningSpecial);
+        }
+        if (status != null && !status.isEmpty()) {
+            wrapper.eq(WarningItem::getStatus, status);
+        }
+        
+        wrapper.orderByDesc(WarningItem::getCreateTime);
+        return this.page(page, wrapper);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public boolean addWarningItem(WarningItem warningItem) {
+        if (warningItem.getItemCode() == null || warningItem.getItemCode().isEmpty()) {
+            warningItem.setItemCode(generateItemCode(warningItem.getWarningType(), warningItem.getWarningLevel()));
+        }
+        if (warningItem.getStatus() == null) {
+            warningItem.setStatus("ENABLED");
+        }
+        return this.save(warningItem);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public boolean updateWarningItem(WarningItem warningItem) {
+        return this.updateById(warningItem);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public boolean updateItemStatus(String itemId, String status) {
+        WarningItem item = new WarningItem();
+        item.setItemId(itemId);
+        item.setStatus(status);
+        return this.updateById(item);
+    }
+
+    @Override
+    public WarningItem getItemDetail(String itemId) {
+        return this.getById(itemId);
+    }
+
+    @Override
+    public WarningItem getItemByCode(String itemCode) {
+        LambdaQueryWrapper<WarningItem> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(WarningItem::getItemCode, itemCode);
+        return this.getOne(wrapper);
+    }
+
+    @Override
+    public String generateItemCode(String warningType, String warningLevel) {
+        String dateStr = new SimpleDateFormat("yyyyMMdd").format(new Date());
+        String prefix = "WI" + warningType.substring(0, Math.min(3, warningType.length())).toUpperCase() + warningLevel;
+        
+        LambdaQueryWrapper<WarningItem> wrapper = new LambdaQueryWrapper<>();
+        wrapper.likeRight(WarningItem::getItemCode, prefix + dateStr);
+        wrapper.orderByDesc(WarningItem::getItemCode);
+        wrapper.last("LIMIT 1");
+        
+        WarningItem lastItem = this.getOne(wrapper);
+        int sequence = 1;
+        
+        if (lastItem != null) {
+            String lastCode = lastItem.getItemCode();
+            String lastSeqStr = lastCode.substring(lastCode.length() - 4);
+            try {
+                sequence = Integer.parseInt(lastSeqStr) + 1;
+            } catch (NumberFormatException e) {
+                sequence = 1;
+            }
+        }
+        
+        return prefix + dateStr + String.format("%04d", sequence);
+    }
+}

+ 30 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/manhole/dto/in/CaseInfoPageInDTO.java

@@ -0,0 +1,30 @@
+package com.zksy.manhole.dto.in;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 分页查询案件信息列表-入参
+ *
+ * @author xianggx
+ */
+@Data
+@ApiModel(value = "分页查询案件信息列表-入参", description = "分页查询案件信息列表-入参")
+public class CaseInfoPageInDTO implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "案件编号")
+    private String caseNo;
+
+    @ApiModelProperty("设备位置描述")
+    private String equipmentLocation;
+
+    @ApiModelProperty(value = "当前记录起始索引", required = true)
+    private Long pageNum;
+
+    @ApiModelProperty(value = "每页显示记录数", required = true)
+    private Long pageSize;
+}

+ 54 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/manhole/dto/in/CaseInfoSaveInDTO.java

@@ -0,0 +1,54 @@
+package com.zksy.manhole.dto.in;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 新增案件信息-入参
+ *
+ * @author xianggx
+ */
+@Data
+@ApiModel(value = "新增案件信息-入参", description = "新增案件信息-入参")
+public class CaseInfoSaveInDTO implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 关联设备ID
+     */
+    @ApiModelProperty(value = "设备ID", required = true)
+    private String deviceId;
+
+    /**
+     * 设备编码
+     */
+    @ApiModelProperty(value = "设备编码", required = true)
+    private String deviceCode;
+
+    /**
+     * 案件等级:1-严重 2-一般 3-轻微
+     */
+    @ApiModelProperty(value = "案件等级:1-严重 2-一般 3-轻微", required = true)
+    private Integer caseLevel;
+
+    /**
+     * 案件描述
+     */
+    @ApiModelProperty(value = "案件描述", required = true)
+    private String caseDesc;
+
+    /**
+     * 立案人ID
+     */
+    @ApiModelProperty(value = "立案人ID", required = true)
+    private Long fileUser;
+
+    /**
+     * 案件佐证图片、附件地址
+     */
+    @ApiModelProperty(value = "案件佐证图片、附件地址")
+    private String attachUrl;
+}

+ 27 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/manhole/dto/in/CaseInfoVerifyInDTO.java

@@ -0,0 +1,27 @@
+package com.zksy.manhole.dto.in;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 核查案件信息-入参
+ *
+ * @author xianggx
+ */
+@Data
+@ApiModel(value = "核查案件信息-入参", description = "核查案件信息-入参")
+public class CaseInfoVerifyInDTO implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "案件ID", required = true)
+    private Long caseId;
+
+    @ApiModelProperty(value = "核查人ID", required = true)
+    private Long verifyUser;
+
+    @ApiModelProperty(value = "核查结果:1-待处理,2-误报", required = true)
+    private Integer verifyResult;
+}

+ 30 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/manhole/dto/in/WorkOrderPageInDTO.java

@@ -0,0 +1,30 @@
+package com.zksy.manhole.dto.in;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 分页查询工单信息列表-入参
+ *
+ * @author xianggx
+ */
+@Data
+@ApiModel(value = "分页查询工单信息列表-入参", description = "分页查询工单信息列表-入参")
+public class WorkOrderPageInDTO implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "工单编号")
+    private String orderNo;
+
+    @ApiModelProperty(value = "案件编号")
+    private String caseNo;
+
+    @ApiModelProperty(value = "当前记录起始索引", required = true)
+    private Long pageNum;
+
+    @ApiModelProperty(value = "每页显示记录数", required = true)
+    private Long pageSize;
+}

+ 25 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/manhole/dto/out/CaseInfoOutDTO.java

@@ -0,0 +1,25 @@
+package com.zksy.manhole.dto.out;
+
+import com.zksy.base.domain.CaseInfo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 获取案件信息详情-出参
+ *
+ * @author xianggx
+ */
+@Data
+@ApiModel(value = "获取案件信息详情-出参", description = "获取案件信息详情-出参")
+public class CaseInfoOutDTO extends CaseInfo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("设备类别名称")
+    private String equipmentTypeName;
+
+    @ApiModelProperty(value = "设备状态详情")
+    private EquipmentStatusOutDTO equipmentStatus;
+}

+ 19 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/manhole/dto/out/WorkOrderLogOutDTO.java

@@ -0,0 +1,19 @@
+package com.zksy.manhole.dto.out;
+
+import com.zksy.base.domain.WorkOrderLog;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 工单操作日志-出参
+ *
+ * @author xianggx
+ */
+@Data
+@ApiModel(value = "工单操作日志-出参", description = "工单操作日志-出参")
+public class WorkOrderLogOutDTO extends WorkOrderLog implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+}

+ 29 - 0
pipe-network-service/zksy-system/src/main/java/com/zksy/manhole/dto/out/WorkOrderOutDTO.java

@@ -0,0 +1,29 @@
+package com.zksy.manhole.dto.out;
+
+import com.zksy.base.domain.WorkOrder;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 获取工单信息详情-出参
+ *
+ * @author xianggx
+ */
+@Data
+@ApiModel(value = "获取工单信息详情-出参", description = "获取工单信息详情-出参")
+public class WorkOrderOutDTO extends WorkOrder implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("设备类别名称")
+    private String equipmentTypeName;
+
+    @ApiModelProperty(value = "设备状态详情")
+    private EquipmentStatusOutDTO equipmentStatus;
+
+    @ApiModelProperty(value = "工单操作日志列表")
+    private List<WorkOrderLogOutDTO> workOrderLogList;
+}

+ 35 - 0
pipe-network-service/zksy-system/src/main/resources/mapper/CaseInfoMapper.xml

@@ -0,0 +1,35 @@
+<?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.mapper.CaseInfoMapper">
+
+    <resultMap id="BaseResultMap" type="com.zksy.base.domain.CaseInfo">
+            <id property="caseId" column="case_id" jdbcType="BIGINT"/>
+            <result property="caseNo" column="case_no" jdbcType="VARCHAR"/>
+            <result property="alarmId" column="alarm_id" jdbcType="VARCHAR"/>
+            <result property="deviceId" column="device_id" jdbcType="VARCHAR"/>
+            <result property="deviceCode" column="device_code" jdbcType="VARCHAR"/>
+            <result property="caseLevel" column="case_level" jdbcType="TINYINT"/>
+            <result property="caseDesc" column="case_desc" jdbcType="VARCHAR"/>
+            <result property="caseSource" column="case_source" jdbcType="TINYINT"/>
+            <result property="caseStatus" column="case_status" jdbcType="TINYINT"/>
+            <result property="fileUser" column="file_user" jdbcType="BIGINT"/>
+            <result property="verifyUser" column="verify_user" jdbcType="BIGINT"/>
+            <result property="verifyTime" column="verify_time" jdbcType="TIMESTAMP"/>
+            <result property="finishTime" column="finish_time" jdbcType="TIMESTAMP"/>
+            <result property="handleResult" column="handle_result" jdbcType="VARCHAR"/>
+            <result property="attachUrl" column="attach_url" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        case_id,case_no,alarm_id,
+        device_id,device_code,case_level,
+        case_desc,case_source,case_status,
+        file_user,verify_user,verify_time,
+        finish_time,handle_result,attach_url,
+        create_time,update_time
+    </sql>
+</mapper>

+ 22 - 0
pipe-network-service/zksy-system/src/main/resources/mapper/WorkOrderLogMapper.xml

@@ -0,0 +1,22 @@
+<?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.mapper.WorkOrderLogMapper">
+
+    <resultMap id="BaseResultMap" type="com.zksy.base.domain.WorkOrderLog">
+            <id property="logId" column="log_id" jdbcType="BIGINT"/>
+            <result property="orderId" column="order_id" jdbcType="BIGINT"/>
+            <result property="operType" column="oper_type" jdbcType="TINYINT"/>
+            <result property="operDesc" column="oper_desc" jdbcType="VARCHAR"/>
+            <result property="operUserId" column="oper_user_id" jdbcType="BIGINT"/>
+            <result property="operUserName" column="oper_user_name" jdbcType="VARCHAR"/>
+            <result property="operTime" column="oper_time" jdbcType="TIMESTAMP"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        log_id,order_id,oper_type,
+        oper_desc,oper_user_id,oper_user_name,
+        oper_time
+    </sql>
+</mapper>

+ 44 - 0
pipe-network-service/zksy-system/src/main/resources/mapper/WorkOrderMapper.xml

@@ -0,0 +1,44 @@
+<?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.mapper.WorkOrderMapper">
+
+    <resultMap id="BaseResultMap" type="com.zksy.base.domain.WorkOrder">
+            <id property="orderId" column="order_id" jdbcType="BIGINT"/>
+            <result property="orderNo" column="order_no" jdbcType="VARCHAR"/>
+            <result property="alarmId" column="alarm_id" jdbcType="VARCHAR"/>
+            <result property="caseId" column="case_id" jdbcType="BIGINT"/>
+            <result property="caseNo" column="case_no" jdbcType="VARCHAR"/>
+            <result property="deviceId" column="device_id" jdbcType="VARCHAR"/>
+            <result property="deviceCode" column="device_code" jdbcType="VARCHAR"/>
+            <result property="orderType" column="order_type" jdbcType="TINYINT"/>
+            <result property="orderLevel" column="order_level" jdbcType="TINYINT"/>
+            <result property="orderDesc" column="order_desc" jdbcType="VARCHAR"/>
+            <result property="deptId" column="dept_id" jdbcType="BIGINT"/>
+            <result property="dispatchUser" column="dispatch_user" jdbcType="BIGINT"/>
+            <result property="dispatchTime" column="dispatch_time" jdbcType="TIMESTAMP"/>
+            <result property="receiveUser" column="receive_user" jdbcType="BIGINT"/>
+            <result property="orderStatus" column="order_status" jdbcType="TINYINT"/>
+            <result property="delayedReason" column="delayed_reason" jdbcType="VARCHAR"/>
+            <result property="delayedDeadline" column="delayed_deadline" jdbcType="TIMESTAMP"/>
+            <result property="planFinishTime" column="plan_finish_time" jdbcType="TIMESTAMP"/>
+            <result property="realFinishTime" column="real_finish_time" jdbcType="TIMESTAMP"/>
+            <result property="repairResult" column="repair_result" jdbcType="VARCHAR"/>
+            <result property="verifyUser" column="verify_user" jdbcType="BIGINT"/>
+            <result property="verifyTime" column="verify_time" jdbcType="TIMESTAMP"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        order_id,order_no,alarm_id,
+        case_id,case_no,device_id,
+        device_code,order_type,order_level,
+        order_desc,dept_id,dispatch_user,
+        dispatch_time,receive_user,order_status,
+        delayed_reason,delayed_deadline,plan_finish_time,
+        real_finish_time,repair_result,verify_user,
+        verify_time,create_time,update_time
+    </sql>
+</mapper>