Browse Source

修改内容 表格xls中的管理功能

bzd_lxf 2 months ago
parent
commit
d455599e5f
71 changed files with 3071 additions and 39 deletions
  1. 31 4
      pm-admin/src/main/java/com/pm/web/controller/common/CommonController.java
  2. 133 0
      pm-admin/src/main/java/com/pm/web/controller/device/IbmsDeviceAlarmController.java
  3. 122 0
      pm-admin/src/main/java/com/pm/web/controller/device/IbmsDeviceControlLogController.java
  4. 129 0
      pm-admin/src/main/java/com/pm/web/controller/device/IbmsDeviceController.java
  5. 121 0
      pm-admin/src/main/java/com/pm/web/controller/device/ItemTopologyController.java
  6. 79 0
      pm-admin/src/main/java/com/pm/web/controller/meeting/MeetingController.java
  7. 124 0
      pm-admin/src/main/java/com/pm/web/controller/repairOrder/RepairOrderController.java
  8. 61 0
      pm-admin/src/main/resources/application-dev.yml
  9. 1 1
      pm-admin/src/main/resources/application.yml
  10. 1 1
      pm-admin/src/main/resources/logback.xml
  11. 5 1
      pm-admin/src/main/resources/mybatis/mybatis-config.xml
  12. 24 0
      pm-admin/src/test/TimeBasedUUID.java
  13. 271 0
      pm-common/src/main/java/com/pm/common/utils/poi/ExcelUtilPageData.java
  14. 13 0
      pm-common/src/main/java/com/pm/common/utils/uuid/IdUtils.java
  15. 18 5
      pm-framework/src/main/java/com/pm/framework/config/ApplicationConfig.java
  16. 0 0
      pm-generator/src/main/java/com/pm/generator/config/GenConfig.java
  17. 0 0
      pm-generator/src/main/java/com/pm/generator/controller/GenController.java
  18. 0 0
      pm-generator/src/main/java/com/pm/generator/domain/GenTable.java
  19. 0 0
      pm-generator/src/main/java/com/pm/generator/domain/GenTableColumn.java
  20. 0 0
      pm-generator/src/main/java/com/pm/generator/mapper/GenTableColumnMapper.java
  21. 0 0
      pm-generator/src/main/java/com/pm/generator/mapper/GenTableMapper.java
  22. 0 0
      pm-generator/src/main/java/com/pm/generator/service/GenTableColumnServiceImpl.java
  23. 0 0
      pm-generator/src/main/java/com/pm/generator/service/GenTableServiceImpl.java
  24. 0 0
      pm-generator/src/main/java/com/pm/generator/service/IGenTableColumnService.java
  25. 0 0
      pm-generator/src/main/java/com/pm/generator/service/IGenTableService.java
  26. 0 0
      pm-generator/src/main/java/com/pm/generator/util/GenUtils.java
  27. 0 0
      pm-generator/src/main/java/com/pm/generator/util/VelocityInitializer.java
  28. 16 16
      pm-generator/src/main/java/com/pm/generator/util/VelocityUtils.java
  29. 0 0
      pm-quartz/src/main/java/com/pm/quartz/config/ScheduleConfig.java
  30. 0 0
      pm-quartz/src/main/java/com/pm/quartz/controller/SysJobController.java
  31. 0 0
      pm-quartz/src/main/java/com/pm/quartz/controller/SysJobLogController.java
  32. 0 0
      pm-quartz/src/main/java/com/pm/quartz/domain/SysJob.java
  33. 0 0
      pm-quartz/src/main/java/com/pm/quartz/domain/SysJobLog.java
  34. 0 0
      pm-quartz/src/main/java/com/pm/quartz/mapper/SysJobLogMapper.java
  35. 0 0
      pm-quartz/src/main/java/com/pm/quartz/mapper/SysJobMapper.java
  36. 0 0
      pm-quartz/src/main/java/com/pm/quartz/service/ISysJobLogService.java
  37. 0 0
      pm-quartz/src/main/java/com/pm/quartz/service/ISysJobService.java
  38. 0 0
      pm-quartz/src/main/java/com/pm/quartz/service/impl/SysJobLogServiceImpl.java
  39. 0 0
      pm-quartz/src/main/java/com/pm/quartz/service/impl/SysJobServiceImpl.java
  40. 0 0
      pm-quartz/src/main/java/com/pm/quartz/task/RyTask.java
  41. 0 0
      pm-quartz/src/main/java/com/pm/quartz/util/AbstractQuartzJob.java
  42. 0 0
      pm-quartz/src/main/java/com/pm/quartz/util/CronUtils.java
  43. 0 0
      pm-quartz/src/main/java/com/pm/quartz/util/JobInvokeUtil.java
  44. 0 0
      pm-quartz/src/main/java/com/pm/quartz/util/QuartzDisallowConcurrentExecution.java
  45. 0 0
      pm-quartz/src/main/java/com/pm/quartz/util/QuartzJobExecution.java
  46. 0 0
      pm-quartz/src/main/java/com/pm/quartz/util/ScheduleUtils.java
  47. 61 0
      pm-system/src/main/java/com/pm/control/mapper/IbmsDeviceControlLogMapper.java
  48. 61 0
      pm-system/src/main/java/com/pm/control/service/IIbmsDeviceControlLogService.java
  49. 116 0
      pm-system/src/main/java/com/pm/control/service/impl/IbmsDeviceControlLogServiceImpl.java
  50. 61 0
      pm-system/src/main/java/com/pm/device/mapper/IbmsDeviceMapper.java
  51. 61 0
      pm-system/src/main/java/com/pm/device/service/IIbmsDeviceService.java
  52. 96 0
      pm-system/src/main/java/com/pm/device/service/impl/IbmsDeviceServiceImpl.java
  53. 19 0
      pm-system/src/main/java/com/pm/interfaceInfo/mapper/InterfaceInfoMapper.java
  54. 24 0
      pm-system/src/main/java/com/pm/interfaceInfo/service/InterfaceInfoService.java
  55. 40 0
      pm-system/src/main/java/com/pm/interfaceInfo/service/impl/InterfaceInfoServiceImpl.java
  56. 61 0
      pm-system/src/main/java/com/pm/repairOrder/mapper/RepairOrderMapper.java
  57. 61 0
      pm-system/src/main/java/com/pm/repairOrder/service/IRepairOrderService.java
  58. 104 0
      pm-system/src/main/java/com/pm/repairOrder/service/impl/RepairOrderServiceImpl.java
  59. 61 0
      pm-system/src/main/java/com/pm/topology/mapper/ItemTopologyMapper.java
  60. 61 0
      pm-system/src/main/java/com/pm/topology/service/IItemTopologyService.java
  61. 101 0
      pm-system/src/main/java/com/pm/topology/service/impl/ItemTopologyServiceImpl.java
  62. 61 0
      pm-system/src/main/java/com/pm/waring/mapper/IbmsDeviceAlarmMapper.java
  63. 62 0
      pm-system/src/main/java/com/pm/waring/service/IIbmsDeviceAlarmService.java
  64. 97 0
      pm-system/src/main/java/com/pm/waring/service/impl/IbmsDeviceAlarmServiceImpl.java
  65. 100 0
      pm-system/src/main/resources/mapper/control/IbmsDeviceControlLogMapper.xml
  66. 122 0
      pm-system/src/main/resources/mapper/device/IbmsDeviceMapper.xml
  67. 15 0
      pm-system/src/main/resources/mapper/interfaceInfo/interfaceInfoMapper.xml
  68. 114 0
      pm-system/src/main/resources/mapper/repairOrder/RepairOrderMapper.xml
  69. 122 11
      pm-system/src/main/resources/mapper/system/SysMenuMapper.xml
  70. 106 0
      pm-system/src/main/resources/mapper/topology/ItemTopologyMapper.xml
  71. 135 0
      pm-system/src/main/resources/mapper/waring/IbmsDeviceAlarmMapper.xml

+ 31 - 4
pm-admin/src/main/java/com/pm/web/controller/common/CommonController.java

@@ -1,17 +1,16 @@
 package com.pm.web.controller.common;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import com.pm.common.config.pmConfig;
 import com.pm.common.constant.Constants;
@@ -160,4 +159,32 @@ public class CommonController
             log.error("下载文件失败", e);
         }
     }
+
+    @PostMapping("/deleteFile")
+    public AjaxResult deleteFile(@RequestBody Map<String, String> params) {
+        try {
+            String filePath = params.get("filePath");
+            // 从完整URL中提取相对路径
+            String relativePath = filePath.replace(serverConfig.getUrl(), "");
+            // 处理URL路径,移除/profile前缀
+            String relativePath2 = relativePath.replace("/profile/upload", "");
+            // 获取实际文件路径
+            String fullPath = pmConfig.getUploadPath() + relativePath2;
+
+
+            // 删除文件
+            File file = new File(fullPath);
+            if (file.exists()) {
+                if (file.delete()) {
+                    return AjaxResult.success("文件删除成功");
+                } else {
+                    return AjaxResult.error("文件删除失败");
+                }
+            } else {
+                return AjaxResult.success("文件删除成功"); // 文件不存在提示删除成功
+            }
+        } catch (Exception e) {
+            return AjaxResult.error("删除文件时出错: " + e.getMessage());
+        }
+    }
 }

+ 133 - 0
pm-admin/src/main/java/com/pm/web/controller/device/IbmsDeviceAlarmController.java

@@ -0,0 +1,133 @@
+package com.pm.web.controller.device;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.pm.common.annotation.Log;
+import com.pm.common.core.controller.BaseController;
+import com.pm.common.core.domain.AjaxResult;
+import com.pm.common.enums.BusinessType;
+import com.pm.common.config.PageData;
+import com.pm.common.utils.poi.ExcelUtilPageData;
+import com.pm.waring.service.IIbmsDeviceAlarmService;
+import com.pm.common.core.page.TableDataInfo;
+
+/**
+ * 设备告警Controller
+ *
+ * @author LiXiangFei
+ * @date 2025-04-18
+ */
+@RestController
+@RequestMapping("/device/waring")
+public class IbmsDeviceAlarmController extends BaseController
+{
+    @Autowired
+    private IIbmsDeviceAlarmService ibmsDeviceAlarmService;
+
+    /**
+     * 查询设备告警列表
+     */
+    @PreAuthorize("@ss.hasPermi('device:waring:list')")
+    @GetMapping("/list")
+    public TableDataInfo list()
+    {
+        PageData pd = this.getPageData();
+        startPage();
+        List<PageData> list = ibmsDeviceAlarmService.selectIbmsDeviceAlarmList(pd);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出设备告警列表
+     */
+    @PreAuthorize("@ss.hasPermi('device:waring:export')")
+    @Log(title = "设备告警", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response)
+    {
+        try {
+            PageData pd = this.getPageData();
+            List<PageData> list = ibmsDeviceAlarmService.selectIbmsDeviceAlarmList(pd);
+            String filename = "设备告警数据";
+            String[] titles = {
+                    "告警ID,id",
+                    "告警编码,alarmCode",
+                    "设备ID,deviceId",
+                    "点位ID,pointId",
+                    "告警级别(1-一般,2-重要,3-紧急),alarmLevel",
+                    "告警类型,alarmType",
+                    "告警标题,alarmTitle",
+                    "告警内容,alarmContent",
+                    "触发值,triggerValue",
+                    "正常值,normalValue",
+                    "开始时间,startTime",
+                    "结束时间,endTime",
+                    "持续时间(秒),duration",
+                    "状态(0-未处理,1-已处理,2-已忽略),status",
+                    "处理人ID,handlerId",
+                    "处理人姓名,handlerName",
+                    "处理时间,handleTime",
+                    "处理方法,handleMethod",
+                    "关联服务单ID,serviceOrderId"
+            };
+            ExcelUtilPageData.exportXLSX(response, null, null, filename, titles, list);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+    }
+
+
+
+    /**
+     * 获取设备告警详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('device:waring:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(ibmsDeviceAlarmService.selectIbmsDeviceAlarmById(id));
+    }
+
+    /**
+     * 新增设备告警
+     */
+    @PreAuthorize("@ss.hasPermi('device:waring:add')")
+    @Log(title = "设备告警", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody PageData pd)
+    {
+        return toAjax(ibmsDeviceAlarmService.insertIbmsDeviceAlarm(pd));
+    }
+
+    /**
+     * 修改设备告警
+     */
+    @PreAuthorize("@ss.hasPermi('device:waring:edit')")
+    @Log(title = "设备告警", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody PageData pd)
+    {
+        return toAjax(ibmsDeviceAlarmService.updateIbmsDeviceAlarm(pd));
+    }
+
+    /**
+     * 删除设备告警
+     */
+    @PreAuthorize("@ss.hasPermi('device:waring:remove')")
+    @Log(title = "设备告警", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(ibmsDeviceAlarmService.deleteIbmsDeviceAlarmByIds(ids));
+    }
+}

+ 122 - 0
pm-admin/src/main/java/com/pm/web/controller/device/IbmsDeviceControlLogController.java

@@ -0,0 +1,122 @@
+package com.pm.web.controller.device;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.pm.common.annotation.Log;
+import com.pm.common.core.controller.BaseController;
+import com.pm.common.core.domain.AjaxResult;
+import com.pm.common.enums.BusinessType;
+import com.pm.common.config.PageData;
+import com.pm.common.utils.poi.ExcelUtilPageData;
+import com.pm.control.service.IIbmsDeviceControlLogService;
+import com.pm.common.core.page.TableDataInfo;
+
+/**
+ * 设备控制记录Controller
+ *
+ * @author LiXiangFei
+ * @date 2025-04-29
+ */
+@RestController
+@RequestMapping("/device/control")
+public class IbmsDeviceControlLogController extends BaseController
+{
+    @Autowired
+    private IIbmsDeviceControlLogService ibmsDeviceControlLogService;
+
+    /**
+     * 查询设备控制记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('device:control:list')")
+    @GetMapping("/list")
+    public TableDataInfo list()
+    {
+        PageData pd = this.getPageData();
+        startPage();
+        List<PageData> list = ibmsDeviceControlLogService.selectIbmsDeviceControlLogList(pd);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出设备控制记录列表
+     */
+    @PreAuthorize("@ss.hasPermi('device:control:export')")
+    @Log(title = "设备控制记录", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response)
+    {
+        try {
+            PageData pd = this.getPageData();
+            List<PageData> list = ibmsDeviceControlLogService.selectIbmsDeviceControlLogList(pd);
+            String filename = "设备控制记录数据";
+            String[] titles = {
+                    "主键ID,id",
+                    "设备ID,deviceId",
+                    "点位ID,pointId",
+                    "控制类型,controlType",
+                    "原值,oldValue",
+                    "新值,newValue",
+                    "控制结果(0-失败,1-成功),controlResult",
+                    "操作人ID,operatorId",
+                    "操作人姓名,operatorName",
+                    "操作时间,operateTime"
+            };
+            ExcelUtilPageData.exportXLSX(response, null, null, filename, titles, list);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 获取设备控制记录详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('device:control:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(ibmsDeviceControlLogService.selectIbmsDeviceControlLogById(id));
+    }
+
+    /**
+     * 新增设备控制记录
+     */
+    @PreAuthorize("@ss.hasPermi('device:control:add')")
+    @Log(title = "设备控制记录", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody PageData pd)
+    {
+        return toAjax(ibmsDeviceControlLogService.insertIbmsDeviceControlLog(pd));
+    }
+
+    /**
+     * 修改设备控制记录
+     */
+    @PreAuthorize("@ss.hasPermi('device:control:edit')")
+    @Log(title = "设备控制记录", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody PageData pd)
+    {
+        return toAjax(ibmsDeviceControlLogService.updateIbmsDeviceControlLog(pd));
+    }
+
+    /**
+     * 删除设备控制记录
+     */
+    @PreAuthorize("@ss.hasPermi('device:control:remove')")
+    @Log(title = "设备控制记录", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(ibmsDeviceControlLogService.deleteIbmsDeviceControlLogByIds(ids));
+    }
+}

+ 129 - 0
pm-admin/src/main/java/com/pm/web/controller/device/IbmsDeviceController.java

@@ -0,0 +1,129 @@
+package com.pm.web.controller.basic;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.pm.common.annotation.Log;
+import com.pm.common.core.controller.BaseController;
+import com.pm.common.core.domain.AjaxResult;
+import com.pm.common.enums.BusinessType;
+import com.pm.common.config.PageData;
+import com.pm.common.utils.poi.ExcelUtilPageData;
+import com.pm.device.service.IIbmsDeviceService;
+import com.pm.common.utils.poi.ExcelUtil;
+import com.pm.common.core.page.TableDataInfo;
+
+/**
+ * 设备基础信息Controller
+ *
+ * @author lxf
+ * @date 2025-04-29
+ */
+@RestController
+@RequestMapping("/device/basic")
+public class IbmsDeviceController extends BaseController
+{
+    @Autowired
+    private IIbmsDeviceService ibmsDeviceService;
+
+    /**
+     * 查询设备基础信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('device:basic:list')")
+    @GetMapping("/list")
+    public TableDataInfo list()
+    {
+        PageData pd = this.getPageData();
+        startPage();
+        List<PageData> list = ibmsDeviceService.selectIbmsDeviceList(pd);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出设备基础信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('device:basic:export')")
+    @Log(title = "设备基础信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response)
+    {
+        try {
+            PageData pd = this.getPageData();
+            List<PageData> list = ibmsDeviceService.selectIbmsDeviceList(pd);
+            String filename = "设备基础信息数据";
+            String[] titles = {
+                    "设备ID,id",
+                    "设备编码,deviceCode",
+                    "设备名称,deviceName",
+                    "设备类型(空调/新风/配电等),deviceType",
+                    "子系统类型,subsystemType",
+                    "所属空间ID,spaceId",
+                    "所属空间名称,spaceName",
+                    "品牌,brand",
+                    "型号,model",
+                    "序列号,serialNumber",
+                    "生产日期,manufactureDate",
+                    "安装日期,installDate",
+                    "保修期(月),warrantyPeriod",
+                    "状态(0-禁用,1-正常,2-故障),status",
+                    "是否在线,isOnline",
+                    "设备描述,description"
+            };
+            ExcelUtilPageData.exportXLSX(response, null, null, filename, titles, list);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 获取设备基础信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('device:basic:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(ibmsDeviceService.selectIbmsDeviceById(id));
+    }
+
+    /**
+     * 新增设备基础信息
+     */
+    @PreAuthorize("@ss.hasPermi('device:basic:add')")
+    @Log(title = "设备基础信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody PageData pd)
+    {
+        return toAjax(ibmsDeviceService.insertIbmsDevice(pd));
+    }
+
+    /**
+     * 修改设备基础信息
+     */
+    @PreAuthorize("@ss.hasPermi('device:basic:edit')")
+    @Log(title = "设备基础信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody PageData pd)
+    {
+        return toAjax(ibmsDeviceService.updateIbmsDevice(pd));
+    }
+
+    /**
+     * 删除设备基础信息
+     */
+    @PreAuthorize("@ss.hasPermi('device:basic:remove')")
+    @Log(title = "设备基础信息", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(ibmsDeviceService.deleteIbmsDeviceByIds(ids));
+    }
+}

+ 121 - 0
pm-admin/src/main/java/com/pm/web/controller/device/ItemTopologyController.java

@@ -0,0 +1,121 @@
+package com.pm.web.controller.device;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.pm.common.annotation.Log;
+import com.pm.common.core.controller.BaseController;
+import com.pm.common.core.domain.AjaxResult;
+import com.pm.common.enums.BusinessType;
+import com.pm.common.config.PageData;
+import com.pm.common.utils.poi.ExcelUtilPageData;
+import com.pm.topology.service.IItemTopologyService;
+import com.pm.common.core.page.TableDataInfo;
+
+/**
+ * 项目拓扑Controller
+ *
+ * @author pm
+ * @date 2025-04-24
+ */
+@RestController
+@RequestMapping("/device/topology")
+public class ItemTopologyController extends BaseController
+{
+    @Autowired
+    private IItemTopologyService itemTopologyService;
+
+    /**
+     * 查询项目拓扑列表
+     */
+    @PreAuthorize("@ss.hasPermi('device:topology:list')")
+    @GetMapping("/list")
+    public TableDataInfo list()
+    {
+        PageData pd = this.getPageData();
+        startPage();
+        List<PageData> list = itemTopologyService.selectItemTopologyList(pd);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出项目拓扑列表
+     */
+    @PreAuthorize("@ss.hasPermi('device:topology:export')")
+    @Log(title = "项目拓扑", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response)
+    {
+        try {
+            PageData pd = this.getPageData();
+            List<PageData> list = itemTopologyService.selectItemTopologyList(pd);
+            String filename = "项目拓扑数据";
+            String[] titles = {
+                "项目id,itemId",
+                "父项目id,parentId",
+                "祖级列表,ancestors",
+                "项目名称,itemName",
+                "显示顺序,orderNum",
+                "部门状态(0正常 1停用),status",
+                "删除标志(0代表存在 2代表删除),delFlag",
+                "项目类型,itemType",
+                "设备ids,deviceId"
+            };
+            ExcelUtilPageData.exportXLSX(response, null, null, filename, titles, list);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 获取项目拓扑详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('device:topology:query')")
+    @GetMapping(value = "/{itemId}")
+    public AjaxResult getInfo(@PathVariable("itemId") String itemId)
+    {
+        return success(itemTopologyService.selectItemTopologyByItemId(itemId));
+    }
+
+    /**
+     * 新增项目拓扑
+     */
+    @PreAuthorize("@ss.hasPermi('device:topology:add')")
+    @Log(title = "项目拓扑", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody PageData pd)
+    {
+        return toAjax(itemTopologyService.insertItemTopology(pd));
+    }
+
+    /**
+     * 修改项目拓扑
+     */
+    @PreAuthorize("@ss.hasPermi('device:topology:edit')")
+    @Log(title = "项目拓扑", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody PageData pd)
+    {
+        return toAjax(itemTopologyService.updateItemTopology(pd));
+    }
+
+    /**
+     * 删除项目拓扑
+     */
+    @PreAuthorize("@ss.hasPermi('device:topology:remove')")
+    @Log(title = "项目拓扑", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{itemIds}")
+    public AjaxResult remove(@PathVariable Long[] itemIds)
+    {
+        return toAjax(itemTopologyService.deleteItemTopologyByItemIds(itemIds));
+    }
+}

+ 79 - 0
pm-admin/src/main/java/com/pm/web/controller/meeting/MeetingController.java

@@ -0,0 +1,79 @@
+package com.pm.web.controller.meeting;
+
+import com.pm.common.config.PageData;
+import com.pm.common.core.controller.BaseController;
+import com.pm.common.core.domain.AjaxResult;
+import com.pm.common.core.page.TableDataInfo;
+import com.pm.interfaceInfo.service.InterfaceInfoService;
+import com.pm.topology.service.IItemTopologyService;
+import okhttp3.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * 会议管理
+ */
+@RestController
+@RequestMapping("/meeting/info")
+public class MeetingController  extends BaseController
+{
+
+    @Autowired
+    private InterfaceInfoService interfaceInfoService;
+
+    //@PreAuthorize("@ss.hasPermi('device:control:list')")
+    @GetMapping("/list")
+    public String list()
+    {
+        PageData pd = this.getPageData();
+        Response response = null;
+        try{
+            String name = "";
+            String appoint_time = "";
+            if (pd.containsKey("search")){
+                name = pd.getString("search");
+            }
+            if (pd.containsKey("appoint_time")){
+                appoint_time = pd.getString("appoint_time");
+            }
+            String info = "{\n" +
+                    "  \"date\": \""+pd.getString("date")+"\",\n" +
+                    "  \"search\": \""+name+"\",\n" +
+                    "  \"locationId\": [],\n" +
+                    "  \"capacity\": [],\n" +
+                    "  \"deviceType\": [],\n" +
+                    "  \"roomType\": [\n" +
+                    "    -1\n" +
+                    "  ],\n" +
+                    "  \"appoint_time\": \""+appoint_time+"\",\n" +
+                    "  \"status\": 1,\n" +
+                    "  \"page\": "+pd.getInteger("pageNum")+",\n" +
+                    "  \"page_size\": "+pd.getInteger("pageSize")+"\n" +
+                    "}";
+            PageData interface_info = interfaceInfoService.selectInterfaceInfoByName("会议");
+            OkHttpClient client = new OkHttpClient().newBuilder()
+                    .build();
+            MediaType mediaType = MediaType.parse("application/json");
+            RequestBody body = RequestBody.create(mediaType, info);
+            Request request = new Request.Builder()
+                    .url(interface_info.getString("url"))
+                    .method("POST", body)
+                    .addHeader("Content-Type", "application/json")
+                    .build();
+            response = client.newCall(request).execute();
+        } catch (Exception e){
+            e.printStackTrace();
+        }
+        try {
+            return response.body().string();
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+}

+ 124 - 0
pm-admin/src/main/java/com/pm/web/controller/repairOrder/RepairOrderController.java

@@ -0,0 +1,124 @@
+package com.pm.web.controller.repairOrder;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.pm.common.annotation.Log;
+import com.pm.common.core.controller.BaseController;
+import com.pm.common.core.domain.AjaxResult;
+import com.pm.common.enums.BusinessType;
+import com.pm.common.config.PageData;
+import com.pm.common.utils.poi.ExcelUtilPageData;
+import com.pm.repairOrder.service.IRepairOrderService;
+import com.pm.common.utils.poi.ExcelUtil;
+import com.pm.common.core.page.TableDataInfo;
+
+/**
+ * 维修工单Controller
+ *
+ * @author pm
+ * @date 2025-04-27
+ */
+@RestController
+@RequestMapping("/repairOrder/repairOrder")
+public class RepairOrderController extends BaseController
+{
+    @Autowired
+    private IRepairOrderService repairOrderService;
+
+    /**
+     * 查询维修工单列表
+     */
+    @PreAuthorize("@ss.hasPermi('repairOrder:repairOrder:list')")
+    @GetMapping("/list")
+    public TableDataInfo list()
+    {
+        PageData pd = this.getPageData();
+        startPage();
+        List<PageData> list = repairOrderService.selectRepairOrderList(pd);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出维修工单列表
+     */
+    @PreAuthorize("@ss.hasPermi('repairOrder:repairOrder:export')")
+    @Log(title = "维修工单", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response)
+    {
+        try {
+            PageData pd = this.getPageData();
+            List<PageData> list = repairOrderService.selectRepairOrderList(pd);
+            String filename = "维修工单数据";
+            String[] titles = {
+                "${column.columnComment},id",
+                "工单编号,orderNo",
+                "工单内容,orderContent",
+                "项目名称,projectName",
+                "派单时间,assignTime",
+                "完成时间,finishTime",
+                "完成人,finishBy",
+                "附件,annex",
+                "完成人id,userId",
+                "工单状态(默认值为0:待进行),orderStatus",
+                "工单备注,orderRemark"
+            };
+            ExcelUtilPageData.exportXLSX(response, null, null, filename, titles, list);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 获取维修工单详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('repairOrder:repairOrder:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id)
+    {
+        return success(repairOrderService.selectRepairOrderById(id));
+    }
+
+    /**
+     * 新增维修工单
+     */
+    @PreAuthorize("@ss.hasPermi('repairOrder:repairOrder:add')")
+    @Log(title = "维修工单", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody PageData pd)
+    {
+        return toAjax(repairOrderService.insertRepairOrder(pd));
+    }
+
+    /**
+     * 修改维修工单
+     */
+    @PreAuthorize("@ss.hasPermi('repairOrder:repairOrder:edit')")
+    @Log(title = "维修工单", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody PageData pd)
+    {
+        return toAjax(repairOrderService.updateRepairOrder(pd));
+    }
+
+    /**
+     * 删除维修工单
+     */
+    @PreAuthorize("@ss.hasPermi('repairOrder:repairOrder:remove')")
+    @Log(title = "维修工单", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids)
+    {
+        return toAjax(repairOrderService.deleteRepairOrderByIds(ids));
+    }
+}

+ 61 - 0
pm-admin/src/main/resources/application-dev.yml

@@ -0,0 +1,61 @@
+# 数据源配置
+spring:
+    datasource:
+        type: com.alibaba.druid.pool.DruidDataSource
+        driverClassName: com.mysql.cj.jdbc.Driver
+        druid:
+            # 主库数据源
+            master:
+                url: jdbc:mysql://182.43.195.17:3306/park_a?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                username: root
+                password: 'bzd@123#321!'
+            # 从库数据源
+            slave:
+                # 从数据源开关/默认关闭
+                enabled: false
+                url:
+                username:
+                password:
+            # 初始连接数
+            initialSize: 5
+            # 最小连接池数量
+            minIdle: 10
+            # 最大连接池数量
+            maxActive: 20
+            # 配置获取连接等待超时的时间
+            maxWait: 60000
+            # 配置连接超时时间
+            connectTimeout: 30000
+            # 配置网络超时时间
+            socketTimeout: 60000
+            # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+            timeBetweenEvictionRunsMillis: 60000
+            # 配置一个连接在池中最小生存的时间,单位是毫秒
+            minEvictableIdleTimeMillis: 300000
+            # 配置一个连接在池中最大生存的时间,单位是毫秒
+            maxEvictableIdleTimeMillis: 900000
+            # 配置检测连接是否有效
+            validationQuery: SELECT 1 FROM DUAL
+            testWhileIdle: true
+            testOnBorrow: false
+            testOnReturn: false
+            webStatFilter:
+                enabled: true
+            statViewServlet:
+                enabled: true
+                # 设置白名单,不填则允许所有访问
+                allow:
+                url-pattern: /druid/*
+                # 控制台管理用户名和密码
+                login-username: pm
+                login-password: 123456
+            filter:
+                stat:
+                    enabled: true
+                    # 慢SQL记录
+                    log-slow-sql: true
+                    slow-sql-millis: 1000
+                    merge-sql: true
+                wall:
+                    config:
+                        multi-statement-allow: true

+ 1 - 1
pm-admin/src/main/resources/application.yml

@@ -16,7 +16,7 @@ pm:
 # 开发环境配置
 server:
   # 服务器的HTTP端口,默认为8080
-  port: 8080
+  port: 8010
   servlet:
     # 应用的访问路径
     context-path: /

+ 1 - 1
pm-admin/src/main/resources/logback.xml

@@ -3,7 +3,7 @@
     <!-- 日志存放路径 -->
 	<property name="log.path" value="/home/pm/logs" />
     <!-- 日志输出格式 -->
-	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
+	<property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
 
 	<!-- 控制台输出 -->
 	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">

+ 5 - 1
pm-admin/src/main/resources/mybatis/mybatis-config.xml

@@ -16,5 +16,9 @@ PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
         <!-- 使用驼峰命名法转换字段 -->
 		<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
 	</settings>
-	
+
+    <typeAliases>
+        <typeAlias type="com.pm.common.config.PageData" alias="pd"/>
+    </typeAliases>
+
 </configuration>

+ 24 - 0
pm-admin/src/test/TimeBasedUUID.java

@@ -0,0 +1,24 @@
+import okhttp3.*;
+
+import java.time.Instant;
+import java.util.UUID;
+
+public class TimeBasedUUID {
+    public static void main(String[] args) {
+        OkHttpClient client = new OkHttpClient().newBuilder()
+                .build();
+        MediaType mediaType = MediaType.parse("application/json");
+        RequestBody body = RequestBody.create(mediaType, "{\r\n  \"date\": \"2025-04-29\",\r\n  \"search\": \"\",\r\n  \"locationId\": [],\r\n  \"capacity\": [],\r\n  \"deviceType\": [],\r\n  \"roomType\": [\r\n    -1\r\n  ],\r\n  \"appoint_time\": \"\",\r\n  \"status\": 1,\r\n  \"page\": 1,\r\n  \"page_size\": 16\r\n}");
+        Request request = new Request.Builder()
+                .url("http://182.43.247.65:8000/Conference/getRoomsByLocation")
+                .method("POST", body)
+                .addHeader("Content-Type", "application/json")
+                .build();
+        try {
+            Response response = client.newCall(request).execute();
+            System.out.println(response.body().string());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 271 - 0
pm-common/src/main/java/com/pm/common/utils/poi/ExcelUtilPageData.java

@@ -0,0 +1,271 @@
+package com.pm.common.utils.poi;
+
+import org.apache.poi.hssf.usermodel.*;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.usermodel.Font;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.xssf.usermodel.*;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+import java.lang.reflect.Field;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class ExcelUtilPageData {
+    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+
+    /**
+     * 导出excel 但是office打开文件会出现 Excel无法打开文件"xx.xlsx",因为文件格式或文件扩展名无效。请确定文件未损坏,并且文件扩展名与文件的格式匹配。
+     *  所以导出的文件需要时 xls
+     * @param response
+     * @param exportCondition
+     * @param manName
+     * @param sheetTitle
+     * @param title
+     * @param list
+     */
+    public static void exportXLS(HttpServletResponse response, String exportCondition, String manName, String sheetTitle, String[] title, List list) {
+        HSSFWorkbook wb = new HSSFWorkbook();
+        HSSFSheet sheet = wb.createSheet(sheetTitle);
+
+        // 表头样式(加粗,水平居中,垂直居中)
+        HSSFCellStyle cellStyle = wb.createCellStyle();
+        cellStyle.setAlignment(HorizontalAlignment.CENTER); // 水平居中
+        cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); // 垂直居中
+
+        HSSFFont fontStyle = wb.createFont();
+        fontStyle.setBold(true); // 替换setBoldweight
+        fontStyle.setFontName("宋体");
+        cellStyle.setFont(fontStyle);
+
+        HSSFFont font = wb.createFont();
+        font.setFontName("宋体");
+        font.setFontHeightInPoints((short) 12);
+
+        // 标题样式(加粗,垂直居中)
+        HSSFCellStyle cellStyle2 = wb.createCellStyle();
+        cellStyle2.setVerticalAlignment(VerticalAlignment.CENTER);
+        cellStyle2.setAlignment(HorizontalAlignment.CENTER);
+        cellStyle2.setFont(fontStyle);
+
+        // 设置边框样式
+        cellStyle2.setBorderBottom(BorderStyle.THIN);
+        cellStyle2.setBorderLeft(BorderStyle.THIN);
+        cellStyle2.setBorderTop(BorderStyle.THIN);
+        cellStyle2.setBorderRight(BorderStyle.THIN);
+
+        // 字段样式(垂直居中)
+        HSSFCellStyle cellStyle3 = wb.createCellStyle();
+        cellStyle3.setVerticalAlignment(VerticalAlignment.CENTER);
+
+        // 设置边框样式
+        cellStyle3.setBorderBottom(BorderStyle.THIN);
+        cellStyle3.setBorderLeft(BorderStyle.THIN);
+        cellStyle3.setBorderTop(BorderStyle.THIN);
+        cellStyle3.setBorderRight(BorderStyle.THIN);
+
+        // 创建标题
+        HSSFRow rowTitle = sheet.createRow(0);
+        rowTitle.setHeightInPoints(20);
+
+        HSSFCell hc;
+        for (int i = 0; i < title.length; i++) {
+            hc = rowTitle.createCell(i);
+            String titleStr = title[i];
+            int commaIndex = titleStr.lastIndexOf(",");
+            String displayValue = commaIndex >= 0 ? titleStr.substring(0, commaIndex) : titleStr;
+            hc.setCellValue(displayValue);
+            hc.setCellStyle(cellStyle2);
+        }
+
+        try {
+            int i = 1;
+            for (Object obj : list) {
+                HSSFRow rowBody = sheet.createRow(i);
+                rowBody.setHeightInPoints(20);
+
+                for (int j = 0; j < title.length; j++) {
+                    String titleStr = title[j];
+                    String fieldName = titleStr.substring(titleStr.lastIndexOf(",") + 1);
+
+                    Object va = null;
+                    if (obj instanceof Map) {
+                        va = ((Map) obj).get(fieldName);
+                    } else {
+                        Field f = obj.getClass().getDeclaredField(fieldName);
+                        if (f != null) {
+                            f.setAccessible(true);
+                            va = f.get(obj);
+                        }
+                    }
+                    if (null == va) va = "";
+                    if (va instanceof Date) va = sdf.format(va);
+
+                    hc = rowBody.createCell(j);
+                    hc.setCellValue(va.toString());
+                    hc.setCellStyle(cellStyle3);
+                }
+                i++;
+            }
+
+            // 自动调整列宽
+            for (int k = 0; k < title.length; k++) {
+                sheet.autoSizeColumn(k);
+            }
+
+            // 设置打印区域
+            wb.setPrintArea(0, 0, title.length - 1, 0, i - 1);
+
+            // 设置输出
+            String fileName = (sheetTitle == null ? "导出" : sheetTitle) +
+                    new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(new Date()) + ".xlsx";
+
+            response.reset();
+            response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
+            response.setHeader("Content-Disposition",
+                    "attachment;filename=" + new String(fileName.getBytes("GBK"), "ISO-8859-1"));
+
+            ServletOutputStream out = response.getOutputStream();
+            wb.write(out);
+            out.flush();
+            out.close();
+        } catch (Exception ex) {
+            Logger.getLogger(ExcelUtilPageData.class.getName()).log(Level.SEVERE, null, ex);
+        }
+    }
+
+    public static void exportXLSX(HttpServletResponse response, String exportCondition,
+                              String manName, String sheetTitle, String[] title, List list) {
+        // 创建XSSFWorkbook代替HSSFWorkbook
+        XSSFWorkbook wb = new XSSFWorkbook();
+        XSSFSheet sheet = wb.createSheet(sheetTitle);
+
+        // 创建样式
+        XSSFCellStyle headerStyle = wb.createCellStyle();
+        headerStyle.setAlignment(HorizontalAlignment.CENTER);
+        headerStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+
+        XSSFFont headerFont = wb.createFont();
+        headerFont.setBold(true);
+        headerFont.setFontName("宋体");
+        headerStyle.setFont(headerFont);
+
+        // 标题样式
+        XSSFCellStyle titleStyle = wb.createCellStyle();
+        titleStyle.setAlignment(HorizontalAlignment.CENTER);
+        titleStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+        titleStyle.setFont(headerFont);
+
+        // 设置边框
+        titleStyle.setBorderBottom(BorderStyle.THIN);
+        titleStyle.setBorderLeft(BorderStyle.THIN);
+        titleStyle.setBorderTop(BorderStyle.THIN);
+        titleStyle.setBorderRight(BorderStyle.THIN);
+
+        // 内容样式
+        XSSFCellStyle contentStyle = wb.createCellStyle();
+        contentStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+        contentStyle.setBorderBottom(BorderStyle.THIN);
+        contentStyle.setBorderLeft(BorderStyle.THIN);
+        contentStyle.setBorderTop(BorderStyle.THIN);
+        contentStyle.setBorderRight(BorderStyle.THIN);
+        // 内容字体颜色为黑色
+        XSSFFont blackFont = wb.createFont();
+        blackFont.setColor(new XSSFColor(java.awt.Color.BLACK, new DefaultIndexedColorMap()));
+        blackFont.setFontName("Arial");
+        blackFont.setFontHeightInPoints((short) 10); // 10号字体
+        contentStyle.setFont(blackFont);
+
+        // 创建标题行
+        XSSFRow titleRow = sheet.createRow(0);
+        titleRow.setHeightInPoints(20);
+
+        // 设置标题行背景色为灰色
+        XSSFCellStyle grayStyle = wb.createCellStyle();
+        grayStyle.cloneStyleFrom(titleStyle); // 继承原有样式
+        grayStyle.setFillForegroundColor(new XSSFColor(new java.awt.Color(128, 128, 128), new DefaultIndexedColorMap()));
+        grayStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
+        grayStyle.setAlignment(HorizontalAlignment.CENTER); // 水平居中
+        grayStyle.setVerticalAlignment(VerticalAlignment.CENTER); // 垂直居中
+
+        // 内容样式也设置为居中
+        contentStyle.setAlignment(HorizontalAlignment.CENTER);
+        contentStyle.setVerticalAlignment(VerticalAlignment.CENTER);
+
+        // 创建白色加粗字体 (标题行字体)
+        XSSFFont whiteBoldFont = wb.createFont();
+        whiteBoldFont.setColor(new XSSFColor(java.awt.Color.WHITE, new DefaultIndexedColorMap()));
+        whiteBoldFont.setBold(true);
+        whiteBoldFont.setFontName("Arial");
+        whiteBoldFont.setFontHeightInPoints((short) 10); // 10号字体.setFontHeightInPoints((short) 10); // 10号字体
+        grayStyle.setFont(whiteBoldFont);
+
+        for (int i = 0; i < title.length; i++) {
+            XSSFCell cell = titleRow.createCell(i);
+            String titleStr = title[i];
+            cell.setCellValue(titleStr.substring(0, titleStr.lastIndexOf(",")));
+            cell.setCellStyle(grayStyle);// 设置标题行样式 深灰色
+        }
+
+        try {
+            // 填充数据
+            int rowNum = 1;
+            for (Object obj : list) {
+                XSSFRow row = sheet.createRow(rowNum);
+                row.setHeightInPoints(20);
+
+                for (int colNum = 0; colNum < title.length; colNum++) {
+                    String titleStr = title[colNum];
+                    String fieldName = titleStr.substring(titleStr.lastIndexOf(",") + 1);
+
+                    Object value = getFieldValue(obj, fieldName);
+                    if (value == null) value = "";
+                    if (value instanceof Date) value = sdf.format(value);
+
+                    XSSFCell cell = row.createCell(colNum);
+                    cell.setCellValue(value.toString());
+                    cell.setCellStyle(contentStyle);
+                }
+                rowNum++;
+            }
+            // 其他列自动调整
+            // 优化列宽计算
+            for (int i = 0; i < title.length; i++) {
+                sheet.autoSizeColumn(i);
+                // 设置最小列宽
+                sheet.setColumnWidth(i, Math.max(sheet.getColumnWidth(i), 5000));
+            }
+
+            // 设置输出
+            String fileName = (sheetTitle == null ? "导出" : sheetTitle) +
+                    new SimpleDateFormat("yyyy-MM-dd HH-mm-ss").format(new Date()) + ".xlsx";
+
+            response.reset();
+            response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
+            response.setHeader("Content-Disposition",
+                    "attachment;filename=" + new String(fileName.getBytes("GBK"), "ISO-8859-1"));
+
+            ServletOutputStream out = response.getOutputStream();
+            wb.write(out);
+            out.flush();
+            out.close();
+        } catch (Exception ex) {
+            Logger.getLogger(ExcelUtilPageData.class.getName()).log(Level.SEVERE, null, ex);
+        }
+    }
+
+    private static Object getFieldValue(Object obj, String fieldName) throws Exception {
+        if (obj instanceof Map) {
+            return ((Map) obj).get(fieldName);
+        } else {
+            Field f = obj.getClass().getDeclaredField(fieldName);
+            f.setAccessible(true);
+            return f.get(obj);
+        }
+    }
+}

+ 13 - 0
pm-common/src/main/java/com/pm/common/utils/uuid/IdUtils.java

@@ -1,5 +1,8 @@
 package com.pm.common.utils.uuid;
 
+import java.time.Instant;
+import java.util.concurrent.ThreadLocalRandom;
+
 /**
  * ID生成器工具类
  *
@@ -46,4 +49,14 @@ public class IdUtils
     {
         return UUID.fastUUID().toString(true);
     }
+
+    /**
+     * 获取随机数
+     *
+     * @return 随机数
+     */
+    public static Long randomLong() {
+        Instant instant = Instant.now();
+        return instant.getEpochSecond() * 1_000_000_000 + instant.getNano();
+    }
 }

+ 18 - 5
pm-framework/src/main/java/com/pm/framework/config/ApplicationConfig.java

@@ -1,6 +1,10 @@
 package com.pm.framework.config;
 
+import java.time.format.DateTimeFormatter;
 import java.util.TimeZone;
+
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
 import org.springframework.context.annotation.Bean;
@@ -9,7 +13,6 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
 
 /**
  * 程序注解配置
- *
  * @author pm
  */
 @Configuration
@@ -20,11 +23,21 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
 public class ApplicationConfig
 {
     /**
-     * 时区配置
+     * 统一配置Jackson的时区和日期格式(返回页面的室间格式处理)
      */
     @Bean
-    public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization()
-    {
-        return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault());
+    public Jackson2ObjectMapperBuilderCustomizer jacksonCustomizer() {
+        return builder -> {
+            // 1. 设置时区(使用系统默认时区)
+            builder.timeZone(TimeZone.getDefault());
+
+            // 2. 配置LocalDateTime序列化格式
+            DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+            builder.serializers(new LocalDateTimeSerializer(formatter));
+
+            // 3. 配置LocalDateTime反序列化格式
+            builder.deserializers(new LocalDateTimeDeserializer(formatter));
+
+        };
     }
 }

+ 0 - 0
pm-generator/src/main/java/com/ruoyi/generator/config/GenConfig.java → pm-generator/src/main/java/com/pm/generator/config/GenConfig.java


+ 0 - 0
pm-generator/src/main/java/com/ruoyi/generator/controller/GenController.java → pm-generator/src/main/java/com/pm/generator/controller/GenController.java


+ 0 - 0
pm-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java → pm-generator/src/main/java/com/pm/generator/domain/GenTable.java


+ 0 - 0
pm-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java → pm-generator/src/main/java/com/pm/generator/domain/GenTableColumn.java


+ 0 - 0
pm-generator/src/main/java/com/ruoyi/generator/mapper/GenTableColumnMapper.java → pm-generator/src/main/java/com/pm/generator/mapper/GenTableColumnMapper.java


+ 0 - 0
pm-generator/src/main/java/com/ruoyi/generator/mapper/GenTableMapper.java → pm-generator/src/main/java/com/pm/generator/mapper/GenTableMapper.java


+ 0 - 0
pm-generator/src/main/java/com/ruoyi/generator/service/GenTableColumnServiceImpl.java → pm-generator/src/main/java/com/pm/generator/service/GenTableColumnServiceImpl.java


+ 0 - 0
pm-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java → pm-generator/src/main/java/com/pm/generator/service/GenTableServiceImpl.java


+ 0 - 0
pm-generator/src/main/java/com/ruoyi/generator/service/IGenTableColumnService.java → pm-generator/src/main/java/com/pm/generator/service/IGenTableColumnService.java


+ 0 - 0
pm-generator/src/main/java/com/ruoyi/generator/service/IGenTableService.java → pm-generator/src/main/java/com/pm/generator/service/IGenTableService.java


+ 0 - 0
pm-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java → pm-generator/src/main/java/com/pm/generator/util/GenUtils.java


+ 0 - 0
pm-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java → pm-generator/src/main/java/com/pm/generator/util/VelocityInitializer.java


+ 16 - 16
pm-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java → pm-generator/src/main/java/com/pm/generator/util/VelocityUtils.java

@@ -15,7 +15,7 @@ import com.pm.generator.domain.GenTableColumn;
 
 /**
  * 模板处理工具类
- * 
+ *
  * @author pm
  */
 public class VelocityUtils
@@ -135,26 +135,26 @@ public class VelocityUtils
             useWebType = "vm/vue/v3";
         }
         List<String> templates = new ArrayList<String>();
-        templates.add("vm/java/domain.java.vm");
-        templates.add("vm/java/mapper.java.vm");
-        templates.add("vm/java/service.java.vm");
-        templates.add("vm/java/serviceImpl.java.vm");
-        templates.add("vm/java/controller.java.vm");
-        templates.add("vm/xml/mapper.xml.vm");
-        templates.add("vm/sql/sql.vm");
-        templates.add("vm/js/api.js.vm");
+        templates.add("vm/java/domain2.java.vm");
+        templates.add("vm/java/mapper2.java.vm");
+        templates.add("vm/java/service2.java.vm");
+        templates.add("vm/java/serviceImpl2.java.vm");
+        templates.add("vm/java/controller2.java.vm");
+        templates.add("vm/xml/mapper2.xml.vm");
+        templates.add("vm/sql/sql2.vm");
+        templates.add("vm/js/api2.js.vm");
         if (GenConstants.TPL_CRUD.equals(tplCategory))
         {
-            templates.add(useWebType + "/index.vue.vm");
+            templates.add(useWebType + "/index2.vue.vm");
         }
         else if (GenConstants.TPL_TREE.equals(tplCategory))
         {
-            templates.add(useWebType + "/index-tree.vue.vm");
+            templates.add(useWebType + "/index-tree2.vue.vm");
         }
         else if (GenConstants.TPL_SUB.equals(tplCategory))
         {
-            templates.add(useWebType + "/index.vue.vm");
-            templates.add("vm/java/sub-domain.java.vm");
+            templates.add(useWebType + "/index2.vue.vm");
+            templates.add("vm/java/sub-domain2.java.vm");
         }
         return templates;
     }
@@ -240,7 +240,7 @@ public class VelocityUtils
 
     /**
      * 根据列类型获取导入包
-     * 
+     *
      * @param genTable 业务表对象
      * @return 返回需要导入的包列表
      */
@@ -270,7 +270,7 @@ public class VelocityUtils
 
     /**
      * 根据列类型获取字典组
-     * 
+     *
      * @param genTable 业务表对象
      * @return 返回字典组
      */
@@ -289,7 +289,7 @@ public class VelocityUtils
 
     /**
      * 添加字典列表
-     * 
+     *
      * @param dicts 字典列表
      * @param columns 列集合
      */

+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java → pm-quartz/src/main/java/com/pm/quartz/config/ScheduleConfig.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java → pm-quartz/src/main/java/com/pm/quartz/controller/SysJobController.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobLogController.java → pm-quartz/src/main/java/com/pm/quartz/controller/SysJobLogController.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/domain/SysJob.java → pm-quartz/src/main/java/com/pm/quartz/domain/SysJob.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/domain/SysJobLog.java → pm-quartz/src/main/java/com/pm/quartz/domain/SysJobLog.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobLogMapper.java → pm-quartz/src/main/java/com/pm/quartz/mapper/SysJobLogMapper.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobMapper.java → pm-quartz/src/main/java/com/pm/quartz/mapper/SysJobMapper.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobLogService.java → pm-quartz/src/main/java/com/pm/quartz/service/ISysJobLogService.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobService.java → pm-quartz/src/main/java/com/pm/quartz/service/ISysJobService.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/service/impl/SysJobLogServiceImpl.java → pm-quartz/src/main/java/com/pm/quartz/service/impl/SysJobLogServiceImpl.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/service/impl/SysJobServiceImpl.java → pm-quartz/src/main/java/com/pm/quartz/service/impl/SysJobServiceImpl.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java → pm-quartz/src/main/java/com/pm/quartz/task/RyTask.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/util/AbstractQuartzJob.java → pm-quartz/src/main/java/com/pm/quartz/util/AbstractQuartzJob.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/util/CronUtils.java → pm-quartz/src/main/java/com/pm/quartz/util/CronUtils.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java → pm-quartz/src/main/java/com/pm/quartz/util/JobInvokeUtil.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/util/QuartzDisallowConcurrentExecution.java → pm-quartz/src/main/java/com/pm/quartz/util/QuartzDisallowConcurrentExecution.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/util/QuartzJobExecution.java → pm-quartz/src/main/java/com/pm/quartz/util/QuartzJobExecution.java


+ 0 - 0
pm-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java → pm-quartz/src/main/java/com/pm/quartz/util/ScheduleUtils.java


+ 61 - 0
pm-system/src/main/java/com/pm/control/mapper/IbmsDeviceControlLogMapper.java

@@ -0,0 +1,61 @@
+package com.pm.control.mapper;
+
+import java.util.List;
+import com.pm.common.config.PageData;
+
+/**
+ * 设备控制记录Mapper接口
+ *
+ * @author LiXiangFei
+ * @date 2025-04-16
+ */
+public interface IbmsDeviceControlLogMapper
+{
+    /**
+     * 查询设备控制记录
+     *
+     * @param id 设备控制记录主键
+     * @return 设备控制记录
+     */
+    public PageData selectIbmsDeviceControlLogById(Long id);
+
+    /**
+     * 查询设备控制记录列表
+     *
+     * @param pd
+     * @return 设备控制记录集合
+     */
+    public List<PageData> selectIbmsDeviceControlLogList(PageData pd);
+
+    /**
+     * 新增设备控制记录
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int insertIbmsDeviceControlLog(PageData pd);
+
+    /**
+     * 修改设备控制记录
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int updateIbmsDeviceControlLog(PageData pd);
+
+    /**
+     * 删除设备控制记录
+     *
+     * @param id 设备控制记录主键
+     * @return 结果
+     */
+    public int deleteIbmsDeviceControlLogById(Long id);
+
+    /**
+     * 批量删除设备控制记录
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteIbmsDeviceControlLogByIds(Long[] ids);
+}

+ 61 - 0
pm-system/src/main/java/com/pm/control/service/IIbmsDeviceControlLogService.java

@@ -0,0 +1,61 @@
+package com.pm.control.service;
+
+import java.util.List;
+import com.pm.common.config.PageData;
+
+/**
+ * 设备控制记录Service接口
+ *
+ * @author LiXiangFei
+ * @date 2025-04-16
+ */
+public interface IIbmsDeviceControlLogService
+{
+    /**
+     * 查询设备控制记录
+     *
+     * @param id 设备控制记录主键
+     * @return 设备控制记录
+     */
+    public PageData selectIbmsDeviceControlLogById(Long id);
+
+    /**
+     * 查询设备控制记录列表
+     *
+     * @param pd
+     * @return 设备控制记录集合
+     */
+    public List<PageData> selectIbmsDeviceControlLogList(PageData pd);
+
+    /**
+     * 新增设备控制记录
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int insertIbmsDeviceControlLog(PageData pd);
+
+    /**
+     * 修改设备控制记录
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int updateIbmsDeviceControlLog(PageData pd);
+
+    /**
+     * 批量删除设备控制记录
+     *
+     * @param ids 需要删除的设备控制记录主键集合
+     * @return 结果
+     */
+    public int deleteIbmsDeviceControlLogByIds(Long[] ids);
+
+    /**
+     * 删除设备控制记录信息
+     *
+     * @param id 设备控制记录主键
+     * @return 结果
+     */
+    public int deleteIbmsDeviceControlLogById(Long id);
+}

+ 116 - 0
pm-system/src/main/java/com/pm/control/service/impl/IbmsDeviceControlLogServiceImpl.java

@@ -0,0 +1,116 @@
+package com.pm.control.service.impl;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.List;
+import com.pm.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.pm.control.mapper.IbmsDeviceControlLogMapper;
+import com.pm.control.service.IIbmsDeviceControlLogService;
+import com.pm.common.config.PageData;
+
+/**
+ * 设备控制记录Service业务层处理
+ *
+ * @author LiXiangFei
+ * @date 2025-04-16
+ */
+@Service
+public class IbmsDeviceControlLogServiceImpl implements IIbmsDeviceControlLogService
+{
+    @Autowired
+    private IbmsDeviceControlLogMapper ibmsDeviceControlLogMapper;
+
+    /**
+     * 查询设备控制记录
+     *
+     * @param id 设备控制记录主键
+     * @return 设备控制记录
+     */
+    @Override
+    public PageData selectIbmsDeviceControlLogById(Long id)
+    {
+        return ibmsDeviceControlLogMapper.selectIbmsDeviceControlLogById(id);
+    }
+
+    /**
+     * 查询设备控制记录列表
+     *
+     * @param pd
+     * @return 设备控制记录
+     */
+    @Override
+    public List<PageData> selectIbmsDeviceControlLogList(PageData pd)
+    {
+        List<PageData> list = ibmsDeviceControlLogMapper.selectIbmsDeviceControlLogList(pd);
+        if (pd.containsKey("export")) // 如果是导出 则处理数据
+        {
+            list.forEach(pageData -> {
+                if(pageData.containsKey("controlResult")){
+                    pageData.put("controlResult", "0".equals(pageData.getString("controlResult")) ? "失败" : "成功");
+                }
+                if (pageData.containsKey("operateTime")){
+                    String timeStr = pageData.getString("operateTime");
+                    LocalDateTime dateTime;
+                    if (timeStr.contains("T")) {
+                        dateTime = LocalDateTime.parse(timeStr, DateTimeFormatter.ISO_LOCAL_DATE_TIME);
+                    } else {
+                        dateTime = LocalDateTime.parse(timeStr, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
+                    }
+                    pageData.put("operateTime", dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
+                }
+            });
+        }
+        return list;
+    }
+
+    /**
+     * 新增设备控制记录
+     *
+     * @param pd
+     * @return 结果
+     */
+    @Override
+    public int insertIbmsDeviceControlLog(PageData pd)
+    {
+        pd.put("createTime", DateUtils.getTime());
+        return ibmsDeviceControlLogMapper.insertIbmsDeviceControlLog(pd);
+    }
+
+    /**
+     * 修改设备控制记录
+     *
+     * @param pd
+     * @return 结果
+     */
+    @Override
+    public int updateIbmsDeviceControlLog(PageData pd)
+    {
+        return ibmsDeviceControlLogMapper.updateIbmsDeviceControlLog(pd);
+    }
+
+    /**
+     * 批量删除设备控制记录
+     *
+     * @param ids 需要删除的设备控制记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteIbmsDeviceControlLogByIds(Long[] ids)
+    {
+        return ibmsDeviceControlLogMapper.deleteIbmsDeviceControlLogByIds(ids);
+    }
+
+    /**
+     * 删除设备控制记录信息
+     *
+     * @param id 设备控制记录主键
+     * @return 结果
+     */
+    @Override
+    public int deleteIbmsDeviceControlLogById(Long id)
+    {
+        return ibmsDeviceControlLogMapper.deleteIbmsDeviceControlLogById(id);
+    }
+}

+ 61 - 0
pm-system/src/main/java/com/pm/device/mapper/IbmsDeviceMapper.java

@@ -0,0 +1,61 @@
+package com.pm.device.mapper;
+
+import java.util.List;
+import com.pm.common.config.PageData;
+
+/**
+ * 设备基础信息Mapper接口
+ *
+ * @author lxf
+ * @date 2025-04-29
+ */
+public interface IbmsDeviceMapper
+{
+    /**
+     * 查询设备基础信息
+     *
+     * @param id 设备基础信息主键
+     * @return 设备基础信息
+     */
+    public PageData selectIbmsDeviceById(Long id);
+
+    /**
+     * 查询设备基础信息列表
+     *
+     * @param pd
+     * @return 设备基础信息集合
+     */
+    public List<PageData> selectIbmsDeviceList(PageData pd);
+
+    /**
+     * 新增设备基础信息
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int insertIbmsDevice(PageData pd);
+
+    /**
+     * 修改设备基础信息
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int updateIbmsDevice(PageData pd);
+
+    /**
+     * 删除设备基础信息
+     *
+     * @param id 设备基础信息主键
+     * @return 结果
+     */
+    public int deleteIbmsDeviceById(Long id);
+
+    /**
+     * 批量删除设备基础信息
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteIbmsDeviceByIds(Long[] ids);
+}

+ 61 - 0
pm-system/src/main/java/com/pm/device/service/IIbmsDeviceService.java

@@ -0,0 +1,61 @@
+package com.pm.device.service;
+
+import java.util.List;
+import com.pm.common.config.PageData;
+
+/**
+ * 设备基础信息Service接口
+ *
+ * @author lxf
+ * @date 2025-04-29
+ */
+public interface IIbmsDeviceService
+{
+    /**
+     * 查询设备基础信息
+     *
+     * @param id 设备基础信息主键
+     * @return 设备基础信息
+     */
+    public PageData selectIbmsDeviceById(Long id);
+
+    /**
+     * 查询设备基础信息列表
+     *
+     * @param pd
+     * @return 设备基础信息集合
+     */
+    public List<PageData> selectIbmsDeviceList(PageData pd);
+
+    /**
+     * 新增设备基础信息
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int insertIbmsDevice(PageData pd);
+
+    /**
+     * 修改设备基础信息
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int updateIbmsDevice(PageData pd);
+
+    /**
+     * 批量删除设备基础信息
+     *
+     * @param ids 需要删除的设备基础信息主键集合
+     * @return 结果
+     */
+    public int deleteIbmsDeviceByIds(Long[] ids);
+
+    /**
+     * 删除设备基础信息信息
+     *
+     * @param id 设备基础信息主键
+     * @return 结果
+     */
+    public int deleteIbmsDeviceById(Long id);
+}

+ 96 - 0
pm-system/src/main/java/com/pm/device/service/impl/IbmsDeviceServiceImpl.java

@@ -0,0 +1,96 @@
+package com.pm.device.service.impl;
+
+import java.util.List;
+import com.pm.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.pm.device.mapper.IbmsDeviceMapper;
+import com.pm.device.service.IIbmsDeviceService;
+import com.pm.common.config.PageData;
+
+/**
+ * 设备基础信息Service业务层处理
+ *
+ * @author lxf
+ * @date 2025-04-29
+ */
+@Service
+public class IbmsDeviceServiceImpl implements IIbmsDeviceService
+{
+    @Autowired
+    private IbmsDeviceMapper ibmsDeviceMapper;
+
+    /**
+     * 查询设备基础信息
+     *
+     * @param id 设备基础信息主键
+     * @return 设备基础信息
+     */
+    @Override
+    public PageData selectIbmsDeviceById(Long id)
+    {
+        return ibmsDeviceMapper.selectIbmsDeviceById(id);
+    }
+
+    /**
+     * 查询设备基础信息列表
+     *
+     * @param pd
+     * @return 设备基础信息
+     */
+    @Override
+    public List<PageData> selectIbmsDeviceList(PageData pd)
+    {
+        return ibmsDeviceMapper.selectIbmsDeviceList(pd);
+    }
+
+    /**
+     * 新增设备基础信息
+     *
+     * @param pd
+     * @return 结果
+     */
+    @Override
+    public int insertIbmsDevice(PageData pd)
+    {
+        pd.put("createTime", DateUtils.getTime());
+        return ibmsDeviceMapper.insertIbmsDevice(pd);
+    }
+
+    /**
+     * 修改设备基础信息
+     *
+     * @param pd
+     * @return 结果
+     */
+    @Override
+    public int updateIbmsDevice(PageData pd)
+    {
+        pd.put("updateTime", DateUtils.getTime());
+        return ibmsDeviceMapper.updateIbmsDevice(pd);
+    }
+
+    /**
+     * 批量删除设备基础信息
+     *
+     * @param ids 需要删除的设备基础信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteIbmsDeviceByIds(Long[] ids)
+    {
+        return ibmsDeviceMapper.deleteIbmsDeviceByIds(ids);
+    }
+
+    /**
+     * 删除设备基础信息信息
+     *
+     * @param id 设备基础信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteIbmsDeviceById(Long id)
+    {
+        return ibmsDeviceMapper.deleteIbmsDeviceById(id);
+    }
+}

+ 19 - 0
pm-system/src/main/java/com/pm/interfaceInfo/mapper/InterfaceInfoMapper.java

@@ -0,0 +1,19 @@
+package com.pm.interfaceInfo.mapper;
+
+import com.pm.common.config.PageData;
+
+import java.util.List;
+
+/**
+ * 查询接口信息Mapper接口
+ *
+ * @author pm
+ * @date 2025-04-27
+ */
+public interface InterfaceInfoMapper
+{
+    /**
+     * 查询接口信息
+     */
+    public PageData selectInterfaceInfoByName(String id);
+}

+ 24 - 0
pm-system/src/main/java/com/pm/interfaceInfo/service/InterfaceInfoService.java

@@ -0,0 +1,24 @@
+package com.pm.interfaceInfo.service;
+
+import com.pm.common.config.PageData;
+
+import java.util.List;
+
+/**
+ * 维修工单Service接口
+ *
+ * @author pm
+ * @date 2025-04-27
+ */
+public interface InterfaceInfoService
+{
+    /**
+     * 查询接口信息
+     *
+     * @param id 维修工单主键
+     * @return 维修工单
+     */
+    public PageData selectInterfaceInfoByName(String id);
+
+
+}

+ 40 - 0
pm-system/src/main/java/com/pm/interfaceInfo/service/impl/InterfaceInfoServiceImpl.java

@@ -0,0 +1,40 @@
+package com.pm.interfaceInfo.service.impl;
+
+import com.pm.common.config.PageData;
+import com.pm.common.utils.DateUtils;
+import com.pm.common.utils.SecurityUtils;
+import com.pm.common.utils.uuid.IdUtils;
+import com.pm.interfaceInfo.mapper.InterfaceInfoMapper;
+import com.pm.interfaceInfo.service.InterfaceInfoService;
+import com.pm.repairOrder.mapper.RepairOrderMapper;
+import com.pm.repairOrder.service.IRepairOrderService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 查询接口信息Service业务层处理
+ *
+ * @author pm
+ * @date 2025-04-27
+ */
+@Service
+public class InterfaceInfoServiceImpl implements InterfaceInfoService
+{
+    @Autowired
+    private InterfaceInfoMapper interfaceInfoMapper;
+
+    /**
+     * 查询维修工单
+     *
+     * @param id 维修工单主键
+     * @return 维修工单
+     */
+    @Override
+    public PageData selectInterfaceInfoByName(String id)
+    {
+        return interfaceInfoMapper.selectInterfaceInfoByName(id);
+    }
+
+}

+ 61 - 0
pm-system/src/main/java/com/pm/repairOrder/mapper/RepairOrderMapper.java

@@ -0,0 +1,61 @@
+package com.pm.repairOrder.mapper;
+
+import java.util.List;
+import com.pm.common.config.PageData;
+
+/**
+ * 维修工单Mapper接口
+ *
+ * @author pm
+ * @date 2025-04-27
+ */
+public interface RepairOrderMapper
+{
+    /**
+     * 查询维修工单
+     *
+     * @param id 维修工单主键
+     * @return 维修工单
+     */
+    public PageData selectRepairOrderById(String id);
+
+    /**
+     * 查询维修工单列表
+     *
+     * @param pd
+     * @return 维修工单集合
+     */
+    public List<PageData> selectRepairOrderList(PageData pd);
+
+    /**
+     * 新增维修工单
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int insertRepairOrder(PageData pd);
+
+    /**
+     * 修改维修工单
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int updateRepairOrder(PageData pd);
+
+    /**
+     * 删除维修工单
+     *
+     * @param id 维修工单主键
+     * @return 结果
+     */
+    public int deleteRepairOrderById(String id);
+
+    /**
+     * 批量删除维修工单
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteRepairOrderByIds(String[] ids);
+}

+ 61 - 0
pm-system/src/main/java/com/pm/repairOrder/service/IRepairOrderService.java

@@ -0,0 +1,61 @@
+package com.pm.repairOrder.service;
+
+import java.util.List;
+import com.pm.common.config.PageData;
+
+/**
+ * 维修工单Service接口
+ *
+ * @author pm
+ * @date 2025-04-27
+ */
+public interface IRepairOrderService
+{
+    /**
+     * 查询维修工单
+     *
+     * @param id 维修工单主键
+     * @return 维修工单
+     */
+    public PageData selectRepairOrderById(String id);
+
+    /**
+     * 查询维修工单列表
+     *
+     * @param pd
+     * @return 维修工单集合
+     */
+    public List<PageData> selectRepairOrderList(PageData pd);
+
+    /**
+     * 新增维修工单
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int insertRepairOrder(PageData pd);
+
+    /**
+     * 修改维修工单
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int updateRepairOrder(PageData pd);
+
+    /**
+     * 批量删除维修工单
+     *
+     * @param ids 需要删除的维修工单主键集合
+     * @return 结果
+     */
+    public int deleteRepairOrderByIds(String[] ids);
+
+    /**
+     * 删除维修工单信息
+     *
+     * @param id 维修工单主键
+     * @return 结果
+     */
+    public int deleteRepairOrderById(String id);
+}

+ 104 - 0
pm-system/src/main/java/com/pm/repairOrder/service/impl/RepairOrderServiceImpl.java

@@ -0,0 +1,104 @@
+package com.pm.repairOrder.service.impl;
+
+import java.util.List;
+
+import com.pm.common.core.domain.model.LoginUser;
+import com.pm.common.utils.DateUtils;
+import com.pm.common.utils.SecurityUtils;
+import com.pm.common.utils.uuid.IdUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.pm.repairOrder.mapper.RepairOrderMapper;
+import com.pm.repairOrder.service.IRepairOrderService;
+import com.pm.common.config.PageData;
+
+/**
+ * 维修工单Service业务层处理
+ *
+ * @author pm
+ * @date 2025-04-27
+ */
+@Service
+public class RepairOrderServiceImpl implements IRepairOrderService
+{
+    @Autowired
+    private RepairOrderMapper repairOrderMapper;
+
+    /**
+     * 查询维修工单
+     *
+     * @param id 维修工单主键
+     * @return 维修工单
+     */
+    @Override
+    public PageData selectRepairOrderById(String id)
+    {
+        return repairOrderMapper.selectRepairOrderById(id);
+    }
+
+    /**
+     * 查询维修工单列表
+     *
+     * @param pd
+     * @return 维修工单
+     */
+    @Override
+    public List<PageData> selectRepairOrderList(PageData pd)
+    {
+        if(pd.containsKey("state")){
+            pd.put("userId",SecurityUtils.getLoginUser().getUserId());
+        }
+        return repairOrderMapper.selectRepairOrderList(pd);
+    }
+
+    /**
+     * 新增维修工单
+     *
+     * @param pd
+     * @return 结果
+     */
+    @Override
+    public int insertRepairOrder(PageData pd)
+    {
+        pd.put("id", IdUtils.simpleUUID());
+        pd.put("createTime", DateUtils.getTime());
+        return repairOrderMapper.insertRepairOrder(pd);
+    }
+
+    /**
+     * 修改维修工单
+     *
+     * @param pd
+     * @return 结果
+     */
+    @Override
+    public int updateRepairOrder(PageData pd)
+    {
+        pd.put("updateTime", DateUtils.getTime());
+        return repairOrderMapper.updateRepairOrder(pd);
+    }
+
+    /**
+     * 批量删除维修工单
+     *
+     * @param ids 需要删除的维修工单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteRepairOrderByIds(String[] ids)
+    {
+        return repairOrderMapper.deleteRepairOrderByIds(ids);
+    }
+
+    /**
+     * 删除维修工单信息
+     *
+     * @param id 维修工单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteRepairOrderById(String id)
+    {
+        return repairOrderMapper.deleteRepairOrderById(id);
+    }
+}

+ 61 - 0
pm-system/src/main/java/com/pm/topology/mapper/ItemTopologyMapper.java

@@ -0,0 +1,61 @@
+package com.pm.topology.mapper;
+
+import java.util.List;
+import com.pm.common.config.PageData;
+
+/**
+ * 项目拓扑Mapper接口
+ *
+ * @author pm
+ * @date 2025-04-24
+ */
+public interface ItemTopologyMapper
+{
+    /**
+     * 查询项目拓扑
+     *
+     * @param itemId 项目拓扑主键
+     * @return 项目拓扑
+     */
+    public PageData selectItemTopologyByItemId(String itemId);
+
+    /**
+     * 查询项目拓扑列表
+     *
+     * @param pd
+     * @return 项目拓扑集合
+     */
+    public List<PageData> selectItemTopologyList(PageData pd);
+
+    /**
+     * 新增项目拓扑
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int insertItemTopology(PageData pd);
+
+    /**
+     * 修改项目拓扑
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int updateItemTopology(PageData pd);
+
+    /**
+     * 删除项目拓扑
+     *
+     * @param itemId 项目拓扑主键
+     * @return 结果
+     */
+    public int deleteItemTopologyByItemId(Long itemId);
+
+    /**
+     * 批量删除项目拓扑
+     *
+     * @param itemIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteItemTopologyByItemIds(Long[] itemIds);
+}

+ 61 - 0
pm-system/src/main/java/com/pm/topology/service/IItemTopologyService.java

@@ -0,0 +1,61 @@
+package com.pm.topology.service;
+
+import java.util.List;
+import com.pm.common.config.PageData;
+
+/**
+ * 项目拓扑Service接口
+ *
+ * @author pm
+ * @date 2025-04-24
+ */
+public interface IItemTopologyService
+{
+    /**
+     * 查询项目拓扑
+     *
+     * @param itemId 项目拓扑主键
+     * @return 项目拓扑
+     */
+    public PageData selectItemTopologyByItemId(String itemId);
+
+    /**
+     * 查询项目拓扑列表
+     *
+     * @param pd
+     * @return 项目拓扑集合
+     */
+    public List<PageData> selectItemTopologyList(PageData pd);
+
+    /**
+     * 新增项目拓扑
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int insertItemTopology(PageData pd);
+
+    /**
+     * 修改项目拓扑
+     *
+     * @param pd
+     * @return 结果
+     */
+    public int updateItemTopology(PageData pd);
+
+    /**
+     * 批量删除项目拓扑
+     *
+     * @param itemIds 需要删除的项目拓扑主键集合
+     * @return 结果
+     */
+    public int deleteItemTopologyByItemIds(Long[] itemIds);
+
+    /**
+     * 删除项目拓扑信息
+     *
+     * @param itemId 项目拓扑主键
+     * @return 结果
+     */
+    public int deleteItemTopologyByItemId(Long itemId);
+}

+ 101 - 0
pm-system/src/main/java/com/pm/topology/service/impl/ItemTopologyServiceImpl.java

@@ -0,0 +1,101 @@
+package com.pm.topology.service.impl;
+
+import java.util.List;
+import com.pm.common.utils.DateUtils;
+import com.pm.common.utils.uuid.IdUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.pm.topology.mapper.ItemTopologyMapper;
+import com.pm.topology.service.IItemTopologyService;
+import com.pm.common.config.PageData;
+
+/**
+ * 项目拓扑Service业务层处理
+ *
+ * @author pm
+ * @date 2025-04-24
+ */
+@Service
+public class ItemTopologyServiceImpl implements IItemTopologyService
+{
+    @Autowired
+    private ItemTopologyMapper itemTopologyMapper;
+
+    /**
+     * 查询项目拓扑
+     *
+     * @param itemId 项目拓扑主键
+     * @return 项目拓扑
+     */
+    @Override
+    public PageData selectItemTopologyByItemId(String itemId)
+    {
+        return itemTopologyMapper.selectItemTopologyByItemId(itemId);
+    }
+
+    /**
+     * 查询项目拓扑列表
+     *
+     * @param pd
+     * @return 项目拓扑
+     */
+    @Override
+    public List<PageData> selectItemTopologyList(PageData pd)
+    {
+        List<PageData> list = itemTopologyMapper.selectItemTopologyList(pd);
+
+        return list;
+    }
+
+    /**
+     * 新增项目拓扑
+     *
+     * @param pd
+     * @return 结果
+     */
+    @Override
+    public int insertItemTopology(PageData pd)
+    {
+        pd.put("createTime", DateUtils.getTime());
+        pd.put("itemId", System.nanoTime());
+
+        return itemTopologyMapper.insertItemTopology(pd);
+    }
+
+    /**
+     * 修改项目拓扑
+     *
+     * @param pd
+     * @return 结果
+     */
+    @Override
+    public int updateItemTopology(PageData pd)
+    {
+        pd.put("updateTime", DateUtils.getTime());
+        return itemTopologyMapper.updateItemTopology(pd);
+    }
+
+    /**
+     * 批量删除项目拓扑
+     *
+     * @param itemIds 需要删除的项目拓扑主键
+     * @return 结果
+     */
+    @Override
+    public int deleteItemTopologyByItemIds(Long[] itemIds)
+    {
+        return itemTopologyMapper.deleteItemTopologyByItemIds(itemIds);
+    }
+
+    /**
+     * 删除项目拓扑信息
+     *
+     * @param itemId 项目拓扑主键
+     * @return 结果
+     */
+    @Override
+    public int deleteItemTopologyByItemId(Long itemId)
+    {
+        return itemTopologyMapper.deleteItemTopologyByItemId(itemId);
+    }
+}

+ 61 - 0
pm-system/src/main/java/com/pm/waring/mapper/IbmsDeviceAlarmMapper.java

@@ -0,0 +1,61 @@
+package com.pm.waring.mapper;
+
+import java.util.List;
+
+import com.pm.common.config.PageData;
+/**
+ * 设备告警Mapper接口
+ *
+ * @author LiXiangFei
+ * @date 2025-04-16
+ */
+public interface IbmsDeviceAlarmMapper
+{
+    /**
+     * 查询设备告警
+     *
+     * @param id 设备告警主键
+     * @return 设备告警
+     */
+    public PageData selectIbmsDeviceAlarmById(Long id);
+
+    /**
+     * 查询设备告警列表
+     *
+     * @param pd 设备告警
+     * @return 设备告警集合
+     */
+    public List<PageData> selectIbmsDeviceAlarmList(PageData pd);
+
+    /**
+     * 新增设备告警
+     *
+     * @param pd 设备告警
+     * @return 结果
+     */
+    public int insertIbmsDeviceAlarm(PageData pd);
+
+    /**
+     * 修改设备告警
+     *
+     * @param pd 设备告警
+     * @return 结果
+     */
+    public int updateIbmsDeviceAlarm(PageData pd);
+
+    /**
+     * 删除设备告警
+     *
+     * @param id 设备告警主键
+     * @return 结果
+     */
+    public int deleteIbmsDeviceAlarmById(Long id);
+
+    /**
+     * 批量删除设备告警
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteIbmsDeviceAlarmByIds(Long[] ids);
+}

+ 62 - 0
pm-system/src/main/java/com/pm/waring/service/IIbmsDeviceAlarmService.java

@@ -0,0 +1,62 @@
+package com.pm.waring.service;
+
+import java.util.List;
+
+import com.pm.common.config.PageData;
+
+/**
+ * 设备告警Service接口
+ *
+ * @author LiXiangFei
+ * @date 2025-04-16
+ */
+public interface IIbmsDeviceAlarmService
+{
+    /**
+     * 查询设备告警
+     *
+     * @param id 设备告警主键
+     * @return 设备告警
+     */
+    public PageData selectIbmsDeviceAlarmById(Long id);
+
+    /**
+     * 查询设备告警列表
+     *
+     * @param pd 设备告警
+     * @return 设备告警集合
+     */
+    public List<PageData> selectIbmsDeviceAlarmList(PageData pd);
+
+    /**
+     * 新增设备告警
+     *
+     * @param pd 设备告警
+     * @return 结果
+     */
+    public int insertIbmsDeviceAlarm(PageData pd);
+
+    /**
+     * 修改设备告警
+     *
+     * @param pd 设备告警
+     * @return 结果
+     */
+    public int updateIbmsDeviceAlarm(PageData pd);
+
+    /**
+     * 批量删除设备告警
+     *
+     * @param ids 需要删除的设备告警主键集合
+     * @return 结果
+     */
+    public int deleteIbmsDeviceAlarmByIds(Long[] ids);
+
+    /**
+     * 删除设备告警信息
+     *
+     * @param id 设备告警主键
+     * @return 结果
+     */
+    public int deleteIbmsDeviceAlarmById(Long id);
+}

+ 97 - 0
pm-system/src/main/java/com/pm/waring/service/impl/IbmsDeviceAlarmServiceImpl.java

@@ -0,0 +1,97 @@
+package com.pm.waring.service.impl;
+
+import java.util.List;
+
+import com.pm.common.config.PageData;
+import com.pm.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.pm.waring.mapper.IbmsDeviceAlarmMapper;
+import com.pm.waring.service.IIbmsDeviceAlarmService;
+
+/**
+ * 设备告警Service业务层处理
+ *
+ * @author LiXiangFei
+ * @date 2025-04-16
+ */
+@Service
+public class IbmsDeviceAlarmServiceImpl implements IIbmsDeviceAlarmService
+{
+    @Autowired
+    private IbmsDeviceAlarmMapper ibmsDeviceAlarmMapper;
+
+    /**
+     * 查询设备告警
+     *
+     * @param id 设备告警主键
+     * @return 设备告警
+     */
+    @Override
+    public PageData selectIbmsDeviceAlarmById(Long id)
+    {
+        return ibmsDeviceAlarmMapper.selectIbmsDeviceAlarmById(id);
+    }
+
+    /**
+     * 查询设备告警列表
+     *
+     * @param pd 设备告警
+     * @return 设备告警
+     */
+    @Override
+    public List<PageData> selectIbmsDeviceAlarmList(PageData pd)
+    {
+        return ibmsDeviceAlarmMapper.selectIbmsDeviceAlarmList(pd);
+    }
+
+    /**
+     * 新增设备告警
+     *
+     * @param pd 设备告警
+     * @return 结果
+     */
+    @Override
+    public int insertIbmsDeviceAlarm(PageData pd)
+    {
+        pd.put("createTime", DateUtils.getTime());
+        return ibmsDeviceAlarmMapper.insertIbmsDeviceAlarm(pd);
+    }
+
+    /**
+     * 修改设备告警
+     *
+     * @param pd 设备告警
+     * @return 结果
+     */
+    @Override
+    public int updateIbmsDeviceAlarm(PageData pd)
+    {
+        pd.put("updateTime", DateUtils.getTime());
+        return ibmsDeviceAlarmMapper.updateIbmsDeviceAlarm(pd);
+    }
+
+    /**
+     * 批量删除设备告警
+     *
+     * @param ids 需要删除的设备告警主键
+     * @return 结果
+     */
+    @Override
+    public int deleteIbmsDeviceAlarmByIds(Long[] ids)
+    {
+        return ibmsDeviceAlarmMapper.deleteIbmsDeviceAlarmByIds(ids);
+    }
+
+    /**
+     * 删除设备告警信息
+     *
+     * @param id 设备告警主键
+     * @return 结果
+     */
+    @Override
+    public int deleteIbmsDeviceAlarmById(Long id)
+    {
+        return ibmsDeviceAlarmMapper.deleteIbmsDeviceAlarmById(id);
+    }
+}

+ 100 - 0
pm-system/src/main/resources/mapper/control/IbmsDeviceControlLogMapper.xml

@@ -0,0 +1,100 @@
+<?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.pm.control.mapper.IbmsDeviceControlLogMapper">
+
+    <resultMap type="pd" id="IbmsDeviceControlLogResult">
+        <result property="id"    column="id"    />
+        <result property="deviceId"    column="device_id"    />
+        <result property="pointId"    column="point_id"    />
+        <result property="controlType"    column="control_type"    />
+        <result property="oldValue"    column="old_value"    />
+        <result property="newValue"    column="new_value"    />
+        <result property="controlResult"    column="control_result"    />
+        <result property="operatorId"    column="operator_id"    />
+        <result property="operatorName"    column="operator_name"    />
+        <result property="operateTime"    column="operate_time"    />
+        <result property="remark"    column="remark"    />
+        <result property="createTime"    column="create_time"    />
+    </resultMap>
+
+    <sql id="selectIbmsDeviceControlLogVo">
+        select id, device_id, point_id, control_type, old_value, new_value, control_result, operator_id, operator_name, operate_time, remark, create_time from ibms_device_control_log
+    </sql>
+
+    <select id="selectIbmsDeviceControlLogList" parameterType="pd" resultMap="IbmsDeviceControlLogResult">
+        <include refid="selectIbmsDeviceControlLogVo"/>
+        <where>
+            <if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
+            <if test="pointId != null and pointId != ''"> and point_id = #{pointId}</if>
+            <if test="controlType != null and controlType != ''"> and control_type = #{controlType}</if>
+            <if test="controlResult != null and controlResult != ''"> and control_result = #{controlResult}</if>
+            <if test="operatorName != null and operatorName != ''"> and operator_name like concat('%', #{operatorName}, '%')</if>
+        </where>
+    </select>
+
+    <select id="selectIbmsDeviceControlLogById" parameterType="pd" resultMap="IbmsDeviceControlLogResult">
+        <include refid="selectIbmsDeviceControlLogVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertIbmsDeviceControlLog" parameterType="pd" useGeneratedKeys="true" keyProperty="id">
+        insert into ibms_device_control_log
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="deviceId != null and deviceId != ''">device_id,</if>
+            <if test="pointId != null and pointId != ''">point_id,</if>
+            <if test="controlType != null and controlType != ''">control_type,</if>
+            <if test="oldValue != null and oldValue != ''">old_value,</if>
+            <if test="newValue != null and newValue != ''">new_value,</if>
+            <if test="controlResult != null and controlResult != ''">control_result,</if>
+            <if test="operatorId != null and operatorId != ''">operator_id,</if>
+            <if test="operatorName != null and operatorName != ''">operator_name,</if>
+            <if test="operateTime != null and operateTime != ''">operate_time,</if>
+            <if test="remark != null and remark != ''">remark,</if>
+            <if test="createTime != null and createTime != ''">create_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="deviceId != null and deviceId != ''">#{deviceId},</if>
+            <if test="pointId != null and pointId != ''">#{pointId},</if>
+            <if test="controlType != null and controlType != ''">#{controlType},</if>
+            <if test="oldValue != null and oldValue != ''">#{oldValue},</if>
+            <if test="newValue != null and newValue != ''">#{newValue},</if>
+            <if test="controlResult != null and controlResult != ''">#{controlResult},</if>
+            <if test="operatorId != null and operatorId != ''">#{operatorId},</if>
+            <if test="operatorName != null and operatorName != ''">#{operatorName},</if>
+            <if test="operateTime != null and operateTime != ''">#{operateTime},</if>
+            <if test="remark != null and remark != ''">#{remark},</if>
+            <if test="createTime != null and createTime != ''">#{createTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateIbmsDeviceControlLog" parameterType="pd">
+        update ibms_device_control_log
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
+            <if test="pointId != null and pointId != ''">point_id = #{pointId},</if>
+            <if test="controlType != null and controlType != ''">control_type = #{controlType},</if>
+            <if test="oldValue != null and oldValue != ''">old_value = #{oldValue},</if>
+            <if test="newValue != null and newValue != ''">new_value = #{newValue},</if>
+            <if test="controlResult != null and controlResult != ''">control_result = #{controlResult},</if>
+            <if test="operatorId != null and operatorId != ''">operator_id = #{operatorId},</if>
+            <if test="operatorName != null and operatorName != ''">operator_name = #{operatorName},</if>
+            <if test="operateTime != null and operateTime != ''">operate_time = #{operateTime},</if>
+            <if test="remark != null and remark != ''">remark = #{remark},</if>
+            <if test="createTime != null and createTime != ''">create_time = #{createTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteIbmsDeviceControlLogById" parameterType="Long">
+        delete from ibms_device_control_log where id = #{id}
+    </delete>
+
+    <delete id="deleteIbmsDeviceControlLogByIds" parameterType="String">
+        delete from ibms_device_control_log where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 122 - 0
pm-system/src/main/resources/mapper/device/IbmsDeviceMapper.xml

@@ -0,0 +1,122 @@
+<?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.pm.device.mapper.IbmsDeviceMapper">
+
+    <resultMap type="pd" id="IbmsDeviceResult">
+        <result property="id"    column="id"    />
+        <result property="deviceCode"    column="device_code"    />
+        <result property="deviceName"    column="device_name"    />
+        <result property="deviceType"    column="device_type"    />
+        <result property="subsystemType"    column="subsystem_type"    />
+        <result property="spaceId"    column="space_id"    />
+        <result property="spaceName"    column="space_name"    />
+        <result property="brand"    column="brand"    />
+        <result property="model"    column="model"    />
+        <result property="serialNumber"    column="serial_number"    />
+        <result property="manufactureDate"    column="manufacture_date"    />
+        <result property="installDate"    column="install_date"    />
+        <result property="warrantyPeriod"    column="warranty_period"    />
+        <result property="status"    column="status"    />
+        <result property="isOnline"    column="is_online"    />
+        <result property="description"    column="description"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectIbmsDeviceVo">
+        select id, device_code, device_name, device_type, subsystem_type, space_id, space_name, brand, model, serial_number, manufacture_date, install_date, warranty_period, status, is_online, description, create_time, update_time from ibms_device
+    </sql>
+
+    <select id="selectIbmsDeviceList" parameterType="pd" resultMap="IbmsDeviceResult">
+        <include refid="selectIbmsDeviceVo"/>
+        <where>
+            <if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
+            <if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
+            <if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
+        </where>
+    </select>
+
+    <select id="selectIbmsDeviceById" parameterType="pd" resultMap="IbmsDeviceResult">
+        <include refid="selectIbmsDeviceVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertIbmsDevice" parameterType="pd" useGeneratedKeys="true" keyProperty="id">
+        insert into ibms_device
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="deviceCode != null and deviceCode != ''">device_code,</if>
+            <if test="deviceName != null and deviceName != ''">device_name,</if>
+            <if test="deviceType != null and deviceType != ''">device_type,</if>
+            <if test="subsystemType != null and subsystemType != ''">subsystem_type,</if>
+            <if test="spaceId != null and spaceId != ''">space_id,</if>
+            <if test="spaceName != null and spaceName != ''">space_name,</if>
+            <if test="brand != null and brand != ''">brand,</if>
+            <if test="model != null and model != ''">model,</if>
+            <if test="serialNumber != null and serialNumber != ''">serial_number,</if>
+            <if test="manufactureDate != null and manufactureDate != ''">manufacture_date,</if>
+            <if test="installDate != null and installDate != ''">install_date,</if>
+            <if test="warrantyPeriod != null and warrantyPeriod != ''">warranty_period,</if>
+            <if test="status != null and status != ''">status,</if>
+            <if test="isOnline != null and isOnline != ''">is_online,</if>
+            <if test="description != null and description != ''">description,</if>
+            <if test="createTime != null and createTime != ''">create_time,</if>
+            <if test="updateTime != null and updateTime != ''">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="deviceCode != null and deviceCode != ''">#{deviceCode},</if>
+            <if test="deviceName != null and deviceName != ''">#{deviceName},</if>
+            <if test="deviceType != null and deviceType != ''">#{deviceType},</if>
+            <if test="subsystemType != null and subsystemType != ''">#{subsystemType},</if>
+            <if test="spaceId != null and spaceId != ''">#{spaceId},</if>
+            <if test="spaceName != null and spaceName != ''">#{spaceName},</if>
+            <if test="brand != null and brand != ''">#{brand},</if>
+            <if test="model != null and model != ''">#{model},</if>
+            <if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if>
+            <if test="manufactureDate != null and manufactureDate != ''">#{manufactureDate},</if>
+            <if test="installDate != null and installDate != ''">#{installDate},</if>
+            <if test="warrantyPeriod != null and warrantyPeriod != ''">#{warrantyPeriod},</if>
+            <if test="status != null and status != ''">#{status},</if>
+            <if test="isOnline != null and isOnline != ''">#{isOnline},</if>
+            <if test="description != null and description != ''">#{description},</if>
+            <if test="createTime != null and createTime != ''">#{createTime},</if>
+            <if test="updateTime != null and updateTime != ''">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateIbmsDevice" parameterType="pd">
+        update ibms_device
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="deviceCode != null and deviceCode != ''">device_code = #{deviceCode},</if>
+            <if test="deviceName != null and deviceName != ''">device_name = #{deviceName},</if>
+            <if test="deviceType != null and deviceType != ''">device_type = #{deviceType},</if>
+            <if test="subsystemType != null and subsystemType != ''">subsystem_type = #{subsystemType},</if>
+            <if test="spaceId != null and spaceId != ''">space_id = #{spaceId},</if>
+            <if test="spaceName != null and spaceName != ''">space_name = #{spaceName},</if>
+            <if test="brand != null and brand != ''">brand = #{brand},</if>
+            <if test="model != null and model != ''">model = #{model},</if>
+            <if test="serialNumber != null and serialNumber != ''">serial_number = #{serialNumber},</if>
+            <if test="manufactureDate != null and manufactureDate != ''">manufacture_date = #{manufactureDate},</if>
+            <if test="installDate != null and installDate != ''">install_date = #{installDate},</if>
+            <if test="warrantyPeriod != null and warrantyPeriod != ''">warranty_period = #{warrantyPeriod},</if>
+            <if test="status != null and status != ''">status = #{status},</if>
+            <if test="isOnline != null and isOnline != ''">is_online = #{isOnline},</if>
+            <if test="description != null and description != ''">description = #{description},</if>
+            <if test="createTime != null and createTime != ''">create_time = #{createTime},</if>
+            <if test="updateTime != null and updateTime != ''">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteIbmsDeviceById" parameterType="Long">
+        delete from ibms_device where id = #{id}
+    </delete>
+
+    <delete id="deleteIbmsDeviceByIds" parameterType="String">
+        delete from ibms_device where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 15 - 0
pm-system/src/main/resources/mapper/interfaceInfo/interfaceInfoMapper.xml

@@ -0,0 +1,15 @@
+<?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.pm.interfaceInfo.mapper.InterfaceInfoMapper">
+
+    <sql id="selectRepairOrderVo">
+        select * from ibms_interfaceInfo
+    </sql>
+
+    <select id="selectInterfaceInfoByName" parameterType="String" resultType="pd">
+        <include refid="selectRepairOrderVo"/>
+        where name like  concat('%', #{name}, '%')
+    </select>
+</mapper>

+ 114 - 0
pm-system/src/main/resources/mapper/repairOrder/RepairOrderMapper.xml

@@ -0,0 +1,114 @@
+<?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.pm.repairOrder.mapper.RepairOrderMapper">
+
+    <resultMap type="pd" id="RepairOrderResult">
+        <result property="id"    column="id"    />
+        <result property="orderNo"    column="order_no"    />
+        <result property="orderContent"    column="order_content"    />
+        <result property="projectName"    column="project_name"    />
+        <result property="assignTime"    column="assign_time"    />
+        <result property="finishTime"    column="finish_time"    />
+        <result property="finishBy"    column="finish_by"    />
+        <result property="annex"    column="annex"    />
+        <result property="userId"    column="user_id"    />
+        <result property="orderStatus"    column="order_status"    />
+        <result property="orderRemark"    column="order_remark"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectRepairOrderVo">
+        select id, order_no, order_content, project_name, assign_time, finish_time, finish_by, annex, user_id, order_status, order_remark, create_by, create_time, update_by, update_time from repair_order
+    </sql>
+
+    <select id="selectRepairOrderList" parameterType="pd" resultMap="RepairOrderResult">
+        <include refid="selectRepairOrderVo"/>
+        <where>
+            <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
+            <if test="orderContent != null and orderContent != ''"> and order_content = #{orderContent}</if>
+            <if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
+            <if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
+            <if test="userId != null and userId != ''"> and user_id = #{userId}</if>
+        </where>
+    </select>
+
+    <select id="selectRepairOrderById" parameterType="pd" resultMap="RepairOrderResult">
+        <include refid="selectRepairOrderVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertRepairOrder" parameterType="pd">
+        insert into repair_order
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null and id != ''">id,</if>
+            <if test="orderNo != null and orderNo != ''">order_no,</if>
+            <if test="orderContent != null and orderContent != ''">order_content,</if>
+            <if test="projectName != null and projectName != ''">project_name,</if>
+            <if test="assignTime != null and assignTime != ''">assign_time,</if>
+            <if test="finishTime != null and finishTime != ''">finish_time,</if>
+            <if test="finishBy != null and finishBy != ''">finish_by,</if>
+            <if test="annex != null and annex != ''">annex,</if>
+            <if test="userId != null and userId != ''">user_id,</if>
+            <if test="orderStatus != null and orderStatus != ''">order_status,</if>
+            <if test="orderRemark != null and orderRemark != ''">order_remark,</if>
+            <if test="createBy != null and createBy != ''">create_by,</if>
+            <if test="createTime != null and createTime != ''">create_time,</if>
+            <if test="updateBy != null and updateBy != ''">update_by,</if>
+            <if test="updateTime != null and updateTime != ''">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null and id != ''">#{id},</if>
+            <if test="orderNo != null and orderNo != ''">#{orderNo},</if>
+            <if test="orderContent != null and orderContent != ''">#{orderContent},</if>
+            <if test="projectName != null and projectName != ''">#{projectName},</if>
+            <if test="assignTime != null and assignTime != ''">#{assignTime},</if>
+            <if test="finishTime != null and finishTime != ''">#{finishTime},</if>
+            <if test="finishBy != null and finishBy != ''">#{finishBy},</if>
+            <if test="annex != null and annex != ''">#{annex},</if>
+            <if test="userId != null and userId != ''">#{userId},</if>
+            <if test="orderStatus != null and orderStatus != ''">#{orderStatus},</if>
+            <if test="orderRemark != null and orderRemark != ''">#{orderRemark},</if>
+            <if test="createBy != null and createBy != ''">#{createBy},</if>
+            <if test="createTime != null and createTime != ''">#{createTime},</if>
+            <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
+            <if test="updateTime != null and updateTime != ''">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateRepairOrder" parameterType="pd">
+        update repair_order
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="orderNo != null and orderNo != ''">order_no = #{orderNo},</if>
+            <if test="orderContent != null and orderContent != ''">order_content = #{orderContent},</if>
+            <if test="projectName != null and projectName != ''">project_name = #{projectName},</if>
+            <if test="assignTime != null and assignTime != ''">assign_time = #{assignTime},</if>
+            <if test="finishTime != null and finishTime != ''">finish_time = #{finishTime},</if>
+            <if test="finishBy != null and finishBy != ''">finish_by = #{finishBy},</if>
+            <if test="annex != null">annex = #{annex},</if>
+            <if test="userId != null and userId != ''">user_id = #{userId},</if>
+            <if test="orderStatus != null and orderStatus != ''">order_status = #{orderStatus},</if>
+            <if test="orderRemark != null and orderRemark != ''">order_remark = #{orderRemark},</if>
+            <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
+            <if test="createTime != null and createTime != ''">create_time = #{createTime},</if>
+            <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
+            <if test="updateTime != null and updateTime != ''">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteRepairOrderById" parameterType="String">
+        delete from repair_order where id = #{id}
+    </delete>
+
+    <delete id="deleteRepairOrderByIds" parameterType="String">
+        delete from repair_order where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 122 - 11
pm-system/src/main/resources/mapper/system/SysMenuMapper.xml

@@ -51,9 +51,47 @@
 	</select>
 
 	<select id="selectMenuTreeAll" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
-		from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
-		order by m.parent_id, m.order_num
+		WITH RECURSIVE menu_tree AS (
+			-- 基础查询:找出所有名称包含'ibms'的菜单作为起点
+			SELECT menu_id, parent_id
+			FROM sys_menu
+			WHERE menu_name LIKE '%ibms%'
+
+			UNION ALL
+
+			-- 递归查询:找出所有下级菜单
+			SELECT m.menu_id, m.parent_id
+			FROM sys_menu m
+					 JOIN menu_tree mt ON m.parent_id = mt.menu_id
+		)
+
+		SELECT DISTINCT
+			m.menu_id,
+			m.parent_id,
+			m.menu_name,
+			m.path,
+			m.component,
+			m.`query`,
+			m.route_name,
+			m.visible,
+			m.STATUS,
+			IFNULL(m.perms, '') AS perms,
+			m.is_frame,
+			m.is_cache,
+			m.menu_type,
+			m.icon,
+			m.order_num,
+			m.create_time
+		FROM
+			sys_menu m
+		WHERE
+			m.menu_type IN ('M', 'C')
+		  AND m.STATUS = 0
+		  -- 排除菜单树中包含'ibms'的菜单及其下级菜单
+		  AND m.menu_id NOT IN (SELECT menu_id FROM menu_tree)
+		ORDER BY
+			m.parent_id,
+			m.order_num
 	</select>
 
 	<select id="selectMenuTreeAll2" resultMap="SysMenuResult">
@@ -97,14 +135,49 @@
 	</select>
 
     <select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
-		from sys_menu m
-			 left join sys_role_menu rm on m.menu_id = rm.menu_id
-			 left join sys_user_role ur on rm.role_id = ur.role_id
-			 left join sys_role ro on ur.role_id = ro.role_id
-			 left join sys_user u on ur.user_id = u.user_id
-		where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0  AND ro.status = 0
-		order by m.parent_id, m.order_num
+		WITH RECURSIVE menu_tree AS (
+			-- 基础查询:找出所有名称包含'ibms'的菜单作为起点
+			SELECT menu_id, parent_id
+			FROM sys_menu
+			WHERE menu_name LIKE '%ibms%'
+
+			UNION ALL
+
+			-- 递归查询:找出所有下级菜单
+			SELECT m.menu_id, m.parent_id
+			FROM sys_menu m
+					 JOIN menu_tree mt ON m.parent_id = mt.menu_id
+		)
+
+		SELECT DISTINCT
+			m.menu_id,
+			m.parent_id,
+			m.menu_name,
+			m.path,
+			m.component,
+			m.`query`,
+			m.route_name,
+			m.visible,
+			m.status,
+			IFNULL(m.perms,'') AS perms,
+			m.is_frame,
+			m.is_cache,
+			m.menu_type,
+			m.icon,
+			m.order_num,
+			m.create_time
+		FROM sys_menu m
+				 LEFT JOIN sys_role_menu rm ON m.menu_id = rm.menu_id
+				 LEFT JOIN sys_user_role ur ON rm.role_id = ur.role_id
+				 LEFT JOIN sys_role ro ON ur.role_id = ro.role_id
+				 LEFT JOIN sys_user u ON ur.user_id = u.user_id
+		WHERE u.user_id = #{userId}
+		  AND m.menu_type IN ('M', 'C')
+		  AND m.status = 0
+		  AND ro.status = 0
+		  -- 排除菜单树中包含'ibms'的菜单及其下级菜单
+		  AND m.menu_id NOT IN (SELECT menu_id FROM menu_tree)
+		ORDER BY m.parent_id, m.order_num
 	</select>
 	<select id="selectMenuTreeByUserId2" parameterType="Long" resultMap="SysMenuResult">
 		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
@@ -236,4 +309,42 @@
 	    delete from sys_menu where menu_id = #{menuId}
 	</delete>
 
+	<select id="listNoticeRead" resultType="pd">
+		select
+			notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark
+		from sys_notice sn
+		WHERE sn.notice_id
+				  not in (select notice_id from sys_notice_read where user_id = #{userId})
+	</select>
+
+	<update id="listNoticeReadShow" parameterType="pd">
+		INSERT INTO sys_notice_read (notice_id, user_id, create_time)
+		VALUES (#{noticeId}, #{user_id}, #{createTime})
+			ON DUPLICATE KEY UPDATE
+								 create_time = VALUES(create_time);
+	</update>
+
+	<select id="showAllCountData" resultType="pd" parameterType="pd">
+		select count(1) t_num from sensor where company_code = #{company_code}
+	</select>
+	<select id="showAllYnCountData" resultType="Integer" parameterType="pd">
+		select count(1) sum_num from sensor where
+			sensor.company_code IN (
+				SELECT dept_id
+				FROM (
+						 WITH RECURSIVE subordinates AS (
+							 SELECT DISTINCT dept_id
+							 FROM sys_dept
+							 WHERE parent_id = #{company_code} OR dept_id = #{company_code}
+							 UNION ALL
+							 SELECT d.dept_id
+							 FROM sys_dept d
+									  INNER JOIN subordinates s ON d.parent_id = s.dept_id
+						 )
+						 SELECT dept_id
+						 FROM subordinates
+					 ) AS subord
+			)
+	</select>
+
 </mapper>

+ 106 - 0
pm-system/src/main/resources/mapper/topology/ItemTopologyMapper.xml

@@ -0,0 +1,106 @@
+<?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.pm.topology.mapper.ItemTopologyMapper">
+
+    <resultMap type="pd" id="ItemTopologyResult">
+        <result property="itemId"    column="item_id"    />
+        <result property="parentId"    column="parent_id"    />
+        <result property="ancestors"    column="ancestors"    />
+        <result property="itemName"    column="item_name"    />
+        <result property="orderNum"    column="order_num"    />
+        <result property="status"    column="status"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="itemType"    column="item_type"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="deviceId"    column="device_id"    />
+    </resultMap>
+
+    <sql id="selectItemTopologyVo">
+        select item_id, parent_id, ancestors, item_name, order_num, status, del_flag, item_type, create_by, create_time, update_by, update_time, device_id from item_topology
+    </sql>
+
+    <select id="selectItemTopologyList" parameterType="pd" resultMap="ItemTopologyResult">
+        <include refid="selectItemTopologyVo"/>
+        <where>
+            <if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
+            <if test="orderNum != null and orderNum != ''"> and order_num = #{orderNum}</if>
+            <if test="status != null and status != ''"> and status = #{status}</if>
+            <if test="itemType != null and itemType != ''"> and item_type = #{itemType}</if>
+            <if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
+        </where>
+    </select>
+
+    <select id="selectItemTopologyByItemId" parameterType="String" resultMap="ItemTopologyResult">
+        <include refid="selectItemTopologyVo"/>
+        where item_id = #{itemId}
+    </select>
+
+    <insert id="insertItemTopology" parameterType="pd">
+        insert into item_topology
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="itemId != null and itemId != ''">item_id,</if>
+            <if test="parentId != null and parentId != ''">parent_id,</if>
+            <if test="ancestors != null and ancestors != ''">ancestors,</if>
+            <if test="itemName != null and itemName != ''">item_name,</if>
+            <if test="orderNum != null and orderNum != ''">order_num,</if>
+            <if test="status != null and status != ''">status,</if>
+            <if test="delFlag != null and delFlag != ''">del_flag,</if>
+            <if test="itemType != null and itemType != ''">item_type,</if>
+            <if test="createBy != null and createBy != ''">create_by,</if>
+            <if test="createTime != null and createTime != ''">create_time,</if>
+            <if test="updateBy != null and updateBy != ''">update_by,</if>
+            <if test="updateTime != null and updateTime != ''">update_time,</if>
+            <if test="deviceId != null and deviceId != ''">device_id,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="itemId != null and itemId != ''">#{itemId},</if>
+            <if test="parentId != null and parentId != ''">#{parentId},</if>
+            <if test="ancestors != null and ancestors != ''">#{ancestors},</if>
+            <if test="itemName != null and itemName != ''">#{itemName},</if>
+            <if test="orderNum != null and orderNum != ''">#{orderNum},</if>
+            <if test="status != null and status != ''">#{status},</if>
+            <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
+            <if test="itemType != null and itemType != ''">#{itemType},</if>
+            <if test="createBy != null and createBy != ''">#{createBy},</if>
+            <if test="createTime != null and createTime != ''">#{createTime},</if>
+            <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
+            <if test="updateTime != null and updateTime != ''">#{updateTime},</if>
+            <if test="deviceId != null and deviceId != ''">#{deviceId},</if>
+        </trim>
+    </insert>
+
+    <update id="updateItemTopology" parameterType="pd">
+        update item_topology
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="parentId != null and parentId != ''">parent_id = #{parentId},</if>
+            <if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
+            <if test="itemName != null and itemName != ''">item_name = #{itemName},</if>
+            <if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if>
+            <if test="status != null and status != ''">status = #{status},</if>
+            <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
+            <if test="itemType != null and itemType != ''">item_type = #{itemType},</if>
+            <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
+            <if test="createTime != null and createTime != ''">create_time = #{createTime},</if>
+            <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
+            <if test="updateTime != null and updateTime != ''">update_time = #{updateTime},</if>
+            <if test="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
+        </trim>
+        where item_id = #{itemId}
+    </update>
+
+    <delete id="deleteItemTopologyByItemId" parameterType="Long">
+        delete from item_topology where item_id = #{itemId}
+    </delete>
+
+    <delete id="deleteItemTopologyByItemIds" parameterType="String">
+        delete from item_topology where item_id in
+        <foreach item="itemId" collection="array" open="(" separator="," close=")">
+            #{itemId}
+        </foreach>
+    </delete>
+</mapper>

+ 135 - 0
pm-system/src/main/resources/mapper/waring/IbmsDeviceAlarmMapper.xml

@@ -0,0 +1,135 @@
+<?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.pm.waring.mapper.IbmsDeviceAlarmMapper">
+
+    <resultMap type="pd" id="IbmsDeviceAlarmResult">
+        <result property="id"    column="id"    />
+        <result property="alarmCode"    column="alarm_code"    />
+        <result property="deviceId"    column="device_id"    />
+        <result property="pointId"    column="point_id"    />
+        <result property="alarmLevel"    column="alarm_level"    />
+        <result property="alarmType"    column="alarm_type"    />
+        <result property="alarmTitle"    column="alarm_title"    />
+        <result property="alarmContent"    column="alarm_content"    />
+        <result property="triggerValue"    column="trigger_value"    />
+        <result property="normalValue"    column="normal_value"    />
+        <result property="startTime"    column="start_time"    />
+        <result property="endTime"    column="end_time"    />
+        <result property="duration"    column="duration"    />
+        <result property="status"    column="status"    />
+        <result property="handlerId"    column="handler_id"    />
+        <result property="handlerName"    column="handler_name"    />
+        <result property="handleTime"    column="handle_time"    />
+        <result property="handleMethod"    column="handle_method"    />
+        <result property="serviceOrderId"    column="service_order_id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectIbmsDeviceAlarmVo">
+        select id, alarm_code, device_id, point_id, alarm_level, alarm_type, alarm_title, alarm_content, trigger_value, normal_value, start_time, end_time, duration, status, handler_id, handler_name, handle_time, handle_method, service_order_id, create_time, update_time from ibms_device_alarm
+    </sql>
+
+    <select id="selectIbmsDeviceAlarmList" parameterType="pd" resultMap="IbmsDeviceAlarmResult">
+        <include refid="selectIbmsDeviceAlarmVo"/>
+        <where>
+            <if test="alarmCode != null and alarmCode != ''"> and alarm_code = #{alarmCode}</if>
+            <if test="alarmLevel != null and alarmLevel != ''"> and alarm_level = #{alarmLevel}</if>
+            <if test="alarmType != null and alarmType != ''"> and alarm_type = #{alarmType}</if>
+            <if test="status != null and status != ''"> and status = #{status}</if>
+        </where>
+    </select>
+
+    <select id="selectIbmsDeviceAlarmById" parameterType="pd" resultMap="IbmsDeviceAlarmResult">
+        <include refid="selectIbmsDeviceAlarmVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertIbmsDeviceAlarm" parameterType="pd" useGeneratedKeys="true" keyProperty="id">
+        insert into ibms_device_alarm
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="alarmCode != null and alarmCode != ''">alarm_code,</if>
+            <if test="deviceId != null and deviceId != ''">device_id,</if>
+            <if test="pointId != null and pointId != ''">point_id,</if>
+            <if test="alarmLevel != null and alarmLevel != ''">alarm_level,</if>
+            <if test="alarmType != null and alarmType != ''">alarm_type,</if>
+            <if test="alarmTitle != null and alarmTitle != ''">alarm_title,</if>
+            <if test="alarmContent != null and alarmContent != ''">alarm_content,</if>
+            <if test="triggerValue != null and triggerValue != ''">trigger_value,</if>
+            <if test="normalValue != null and normalValue != ''">normal_value,</if>
+            <if test="startTime != null and startTime != ''">start_time,</if>
+            <if test="endTime != null and endTime != ''">end_time,</if>
+            <if test="duration != null and duration != ''">duration,</if>
+            <if test="status != null and status != ''">status,</if>
+            <if test="handlerId != null and handlerId != ''">handler_id,</if>
+            <if test="handlerName != null and handlerName != ''">handler_name,</if>
+            <if test="handleTime != null and handleTime != ''">handle_time,</if>
+            <if test="handleMethod != null and handleMethod != ''">handle_method,</if>
+            <if test="serviceOrderId != null and serviceOrderId != ''">service_order_id,</if>
+            <if test="createTime != null and createTime != ''">create_time,</if>
+            <if test="updateTime != null and updateTime != ''">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="alarmCode != null and alarmCode != ''">#{alarmCode},</if>
+            <if test="deviceId != null and deviceId != ''">#{deviceId},</if>
+            <if test="pointId != null and pointId != ''">#{pointId},</if>
+            <if test="alarmLevel != null and alarmLevel != ''">#{alarmLevel},</if>
+            <if test="alarmType != null and alarmType != ''">#{alarmType},</if>
+            <if test="alarmTitle != null and alarmTitle != ''">#{alarmTitle},</if>
+            <if test="alarmContent != null and alarmContent != ''">#{alarmContent},</if>
+            <if test="triggerValue != null and triggerValue != ''">#{triggerValue},</if>
+            <if test="normalValue != null and normalValue != ''">#{normalValue},</if>
+            <if test="startTime != null and startTime != ''">#{startTime},</if>
+            <if test="endTime != null and endTime != ''">#{endTime},</if>
+            <if test="duration != null and duration != ''">#{duration},</if>
+            <if test="status != null and status != ''">#{status},</if>
+            <if test="handlerId != null and handlerId != ''">#{handlerId},</if>
+            <if test="handlerName != null and handlerName != ''">#{handlerName},</if>
+            <if test="handleTime != null and handleTime != ''">#{handleTime},</if>
+            <if test="handleMethod != null and handleMethod != ''">#{handleMethod},</if>
+            <if test="serviceOrderId != null and serviceOrderId != ''">#{serviceOrderId},</if>
+            <if test="createTime != null and createTime != ''">#{createTime},</if>
+            <if test="updateTime != null and updateTime != ''">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateIbmsDeviceAlarm" parameterType="pd">
+        update ibms_device_alarm
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="alarmCode != null and alarmCode != ''">alarm_code = #{alarmCode},</if>
+            <if test="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
+            <if test="pointId != null and pointId != ''">point_id = #{pointId},</if>
+            <if test="alarmLevel != null and alarmLevel != ''">alarm_level = #{alarmLevel},</if>
+            <if test="alarmType != null and alarmType != ''">alarm_type = #{alarmType},</if>
+            <if test="alarmTitle != null and alarmTitle != ''">alarm_title = #{alarmTitle},</if>
+            <if test="alarmContent != null and alarmContent != ''">alarm_content = #{alarmContent},</if>
+            <if test="triggerValue != null and triggerValue != ''">trigger_value = #{triggerValue},</if>
+            <if test="normalValue != null and normalValue != ''">normal_value = #{normalValue},</if>
+            <if test="startTime != null and startTime != ''">start_time = #{startTime},</if>
+            <if test="endTime != null and endTime != ''">end_time = #{endTime},</if>
+            <if test="duration != null and duration != ''">duration = #{duration},</if>
+            <if test="status != null and status != ''">status = #{status},</if>
+            <if test="handlerId != null and handlerId != ''">handler_id = #{handlerId},</if>
+            <if test="handlerName != null and handlerName != ''">handler_name = #{handlerName},</if>
+            <if test="handleTime != null and handleTime != ''">handle_time = #{handleTime},</if>
+            <if test="handleMethod != null and handleMethod != ''">handle_method = #{handleMethod},</if>
+            <if test="serviceOrderId != null and serviceOrderId != ''">service_order_id = #{serviceOrderId},</if>
+            <if test="createTime != null and createTime != ''">create_time = #{createTime},</if>
+            <if test="updateTime != null and updateTime != ''">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteIbmsDeviceAlarmById" parameterType="Long">
+        delete from ibms_device_alarm where id = #{id}
+    </delete>
+
+    <delete id="deleteIbmsDeviceAlarmByIds" parameterType="String">
+        delete from ibms_device_alarm where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>