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