From e76f0739e647fe8a7e0e2618914e2faff554b1b7 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期一, 17 十一月 2025 17:33:23 +0800
Subject: [PATCH] 解决冲突

---
 mes-processes/mes-plcSend/src/main/java/com/mes/device/service/DeviceConfigService.java |  195 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 195 insertions(+), 0 deletions(-)

diff --git a/mes-processes/mes-plcSend/src/main/java/com/mes/device/service/DeviceConfigService.java b/mes-processes/mes-plcSend/src/main/java/com/mes/device/service/DeviceConfigService.java
new file mode 100644
index 0000000..65ec220
--- /dev/null
+++ b/mes-processes/mes-plcSend/src/main/java/com/mes/device/service/DeviceConfigService.java
@@ -0,0 +1,195 @@
+package com.mes.device.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.mes.device.entity.DeviceConfig;
+import com.mes.device.vo.DeviceConfigVO;
+import com.mes.device.vo.StatisticsVO;
+
+/**
+ * 璁惧閰嶇疆鏈嶅姟鎺ュ彛
+ */
+public interface DeviceConfigService extends IService<DeviceConfig> {
+
+    /**
+     * 鍒涘缓璁惧閰嶇疆
+     * @param deviceConfig 璁惧閰嶇疆淇℃伅
+     * @return 鏄惁鍒涘缓鎴愬姛
+     */
+    boolean createDevice(DeviceConfig deviceConfig);
+
+    /**
+     * 鏇存柊璁惧閰嶇疆
+     * @param deviceConfig 璁惧閰嶇疆淇℃伅
+     * @return 鏄惁鏇存柊鎴愬姛
+     */
+    boolean updateDevice(DeviceConfig deviceConfig);
+
+    /**
+     * 鍒犻櫎璁惧閰嶇疆
+     * @param id 璁惧ID
+     * @return 鏄惁鍒犻櫎鎴愬姛
+     */
+    boolean deleteDevice(Long id);
+
+    /**
+     * 鏌ヨ璁惧閰嶇疆璇︽儏
+     * @param id 璁惧ID
+     * @return 璁惧閰嶇疆淇℃伅
+     */
+    DeviceConfig getDeviceById(Long id);
+
+    /**
+     * 鏍规嵁璁惧缂栧彿鏌ヨ璁惧閰嶇疆
+     * @param deviceCode 璁惧缂栧彿
+     * @return 璁惧閰嶇疆淇℃伅
+     */
+    DeviceConfig getDeviceByCode(String deviceCode);
+
+    /**
+     * 鏌ヨ璁惧閰嶇疆鍒楄〃 - 鎺у埗鍣ㄧ増鏈�
+     * @param projectId 椤圭洰ID
+     * @param deviceType 璁惧绫诲瀷
+     * @param deviceStatus 璁惧鐘舵��
+     * @param keyword 鎼滅储鍏抽敭璇�
+     * @param page 椤电爜
+     * @param size 姣忛〉澶у皬
+     * @return 璁惧閰嶇疆鍒嗛〉鍒楄〃
+     */
+    Page<DeviceConfigVO.DeviceInfo> getDeviceList(Long projectId, String deviceType, String deviceStatus, String keyword, Integer page, Integer size);
+
+    /**
+     * 鏌ヨ璁惧閰嶇疆鍒楄〃
+     * @param projectId 椤圭洰ID
+     * @param deviceType 璁惧绫诲瀷
+     * @param status 璁惧鐘舵��
+     * @return 璁惧閰嶇疆鍒楄〃
+     */
+    java.util.List<DeviceConfig> getDeviceList(Long projectId, String deviceType, String status);
+
+    /**
+     * 鏌ヨ璁惧閰嶇疆VO鍒楄〃
+     * @param projectId 椤圭洰ID
+     * @param deviceType 璁惧绫诲瀷
+     * @param status 璁惧鐘舵��
+     * @return 璁惧閰嶇疆VO鍒楄〃
+     */
+    java.util.List<DeviceConfigVO.DeviceInfo> getDeviceVOList(Long projectId, String deviceType, String status);
+
+    /**
+     * 妫�鏌ヨ澶囩紪鍙锋槸鍚﹀瓨鍦�
+     * @param deviceCode 璁惧缂栧彿
+     * @param excludeId 鎺掗櫎鐨勮澶嘔D
+     * @return 鏄惁瀛樺湪
+     */
+    boolean isDeviceCodeExists(String deviceCode, Long excludeId);
+
+    /**
+     * 鏇存柊璁惧鐘舵��
+     * @param id 璁惧ID
+     * @param status 鏂扮姸鎬�
+     * @return 鏄惁鏇存柊鎴愬姛
+     */
+    boolean updateDeviceStatus(Long id, String status);
+
+    /**
+     * 鎵归噺鏇存柊璁惧鐘舵��
+     * @param ids 璁惧ID鍒楄〃
+     * @param status 鏂扮姸鎬�
+     * @return 鏄惁鏇存柊鎴愬姛
+     */
+    boolean batchUpdateDeviceStatus(java.util.List<Long> ids, String status);
+
+    /**
+     * 鑾峰彇璁惧鐨勬墿灞曞弬鏁�
+     * @param id 璁惧ID
+     * @return 鎵╁睍鍙傛暟瀛楀吀
+     */
+    java.util.Map<String, Object> getExtraParams(Long id);
+
+    /**
+     * 鏇存柊璁惧鐨勬墿灞曞弬鏁�
+     * @param id 璁惧ID
+     * @param extraParams 鎵╁睍鍙傛暟瀛楀吀
+     * @return 鏄惁鏇存柊鎴愬姛
+     */
+    boolean updateExtraParams(Long id, java.util.Map<String, Object> extraParams);
+
+    /**
+     * 鑾峰彇鍦ㄧ嚎璁惧鏁伴噺
+     * @param projectId 椤圭洰ID
+     * @return 鍦ㄧ嚎璁惧鏁伴噺
+     */
+    int getOnlineDeviceCount(Long projectId);
+
+    /**
+     * 鑾峰彇璁惧鎬绘暟
+     * @param projectId 椤圭洰ID
+     * @param deviceType 璁惧绫诲瀷
+     * @param deviceStatus 璁惧鐘舵��
+     * @param keyword 鎼滅储鍏抽敭璇�
+     * @return 璁惧鎬绘暟
+     */
+    Long getDeviceCount(Long projectId, String deviceType, String deviceStatus, String keyword);
+
+    /**
+     * 鑾峰彇鎵�鏈夎澶囩被鍨�
+     * @return 璁惧绫诲瀷鍒楄〃
+     */
+    java.util.List<String> getAllDeviceTypes();
+
+    /**
+     * 鑾峰彇鎵�鏈夎澶囩姸鎬�
+     * @return 璁惧鐘舵�佸垪琛�
+     */
+    java.util.List<String> getAllDeviceStatuses();
+
+    /**
+     * 鍚敤璁惧
+     * @param id 璁惧ID
+     * @return 鏄惁鍚敤鎴愬姛
+     */
+    boolean enableDevice(Long id);
+
+    /**
+     * 绂佺敤璁惧
+     * @param id 璁惧ID
+     * @return 鏄惁绂佺敤鎴愬姛
+     */
+    boolean disableDevice(Long id);
+
+    /**
+     * 鎵归噺鍚敤璁惧
+     * @param deviceIds 璁惧ID鍒楄〃
+     * @return 鏄惁鍚敤鎴愬姛
+     */
+    boolean batchEnableDevices(java.util.List<Long> deviceIds);
+
+    /**
+     * 鎵归噺绂佺敤璁惧
+     * @param deviceIds 璁惧ID鍒楄〃
+     * @return 鏄惁绂佺敤鎴愬姛
+     */
+    boolean batchDisableDevices(java.util.List<Long> deviceIds);
+
+    /**
+     * 璁惧鍋ュ悍妫�鏌�
+     * @param id 璁惧ID
+     * @return 鍋ュ悍妫�鏌ョ粨鏋�
+     */
+    com.mes.device.vo.DeviceConfigVO.HealthCheckResult performHealthCheck(Long id);
+
+    /**
+     * 鑾峰彇璁惧鏍戠粨鏋�
+     * @param projectId 椤圭洰ID
+     * @return 璁惧鏍戣妭鐐瑰垪琛�
+     */
+    java.util.List<com.mes.device.vo.DeviceConfigVO.DeviceTreeNode> getDeviceTree(Long projectId);
+
+    /**
+     * 鑾峰彇璁惧缁熻淇℃伅
+     * @param projectId 椤圭洰ID
+     * @return 璁惧缁熻淇℃伅
+     */
+    StatisticsVO.DeviceStatistics getDeviceStatistics(Long projectId);
+}
\ No newline at end of file

--
Gitblit v1.8.0