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/DeviceGroupConfigService.java | 194 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 194 insertions(+), 0 deletions(-)
diff --git a/mes-processes/mes-plcSend/src/main/java/com/mes/device/service/DeviceGroupConfigService.java b/mes-processes/mes-plcSend/src/main/java/com/mes/device/service/DeviceGroupConfigService.java
new file mode 100644
index 0000000..52971fc
--- /dev/null
+++ b/mes-processes/mes-plcSend/src/main/java/com/mes/device/service/DeviceGroupConfigService.java
@@ -0,0 +1,194 @@
+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.DeviceGroupConfig;
+import com.mes.device.vo.DeviceGroupConfigVO;
+import com.mes.device.vo.DeviceGroupVO;
+import com.mes.device.vo.StatisticsVO;
+
+/**
+ * 璁惧缁勯厤缃湇鍔℃帴鍙�
+ */
+public interface DeviceGroupConfigService extends IService<DeviceGroupConfig> {
+
+ /**
+ * 鍒涘缓璁惧缁勯厤缃�
+ * @param groupConfig 璁惧缁勯厤缃俊鎭�
+ * @return 鏄惁鍒涘缓鎴愬姛
+ */
+ boolean createDeviceGroup(DeviceGroupConfig groupConfig);
+
+ /**
+ * 鏇存柊璁惧缁勯厤缃�
+ * @param groupConfig 璁惧缁勯厤缃俊鎭�
+ * @return 鏄惁鏇存柊鎴愬姛
+ */
+ boolean updateDeviceGroup(DeviceGroupConfig groupConfig);
+
+ /**
+ * 鍒犻櫎璁惧缁勯厤缃�
+ * @param id 璁惧缁処D
+ * @return 鏄惁鍒犻櫎鎴愬姛
+ */
+ boolean deleteDeviceGroup(Long id);
+
+ /**
+ * 鏌ヨ璁惧缁勯厤缃鎯�
+ * @param id 璁惧缁処D
+ * @return 璁惧缁勯厤缃俊鎭�
+ */
+ DeviceGroupConfig getDeviceGroupById(Long id);
+
+ /**
+ * 鏍规嵁璁惧缁勭紪鍙锋煡璇㈣澶囩粍閰嶇疆
+ * @param groupCode 璁惧缁勭紪鍙�
+ * @return 璁惧缁勯厤缃俊鎭�
+ */
+ DeviceGroupConfig getDeviceGroupByCode(String groupCode);
+
+ /**
+ * 鏌ヨ璁惧缁勯厤缃垪琛�
+ * @param projectId 椤圭洰ID
+ * @param groupType 璁惧缁勭被鍨�
+ * @param status 璁惧缁勭姸鎬�
+ * @return 璁惧缁勯厤缃垪琛�
+ */
+ java.util.List<DeviceGroupConfig> getDeviceGroupList(Long projectId, Integer groupType, Integer status);
+
+ /**
+ * 鍒嗛〉鏌ヨ璁惧缁勯厤缃垪琛�
+ * @param projectId 椤圭洰ID
+ * @param groupType 璁惧缁勭被鍨�
+ * @param groupStatus 璁惧缁勭姸鎬�
+ * @param keyword 鎼滅储鍏抽敭璇�
+ * @param page 椤电爜
+ * @param size 姣忛〉澶у皬
+ * @return 璁惧缁勫垎椤靛垪琛�
+ */
+ Page<DeviceGroupVO.GroupInfo> getDeviceGroupList(
+ Long projectId, String groupType, String groupStatus, String keyword, Integer page, Integer size);
+
+ /**
+ * 鏌ヨ璁惧缁勯厤缃甐O鍒楄〃
+ * @param projectId 椤圭洰ID
+ * @param groupType 璁惧缁勭被鍨�
+ * @param status 璁惧缁勭姸鎬�
+ * @return 璁惧缁勯厤缃甐O鍒楄〃
+ */
+ java.util.List<DeviceGroupConfigVO.GroupInfo> getDeviceGroupVOList(Long projectId, Integer groupType, Integer status);
+
+ /**
+ * 妫�鏌ヨ澶囩粍缂栧彿鏄惁瀛樺湪
+ * @param groupCode 璁惧缁勭紪鍙�
+ * @param excludeId 鎺掗櫎鐨勮澶囩粍ID
+ * @return 鏄惁瀛樺湪
+ */
+ boolean isGroupCodeExists(String groupCode, Long excludeId);
+
+ /**
+ * 鏇存柊璁惧缁勭姸鎬�
+ * @param id 璁惧缁処D
+ * @param status 鏂扮姸鎬�
+ * @return 鏄惁鏇存柊鎴愬姛
+ */
+ boolean updateDeviceGroupStatus(Long id, Integer status);
+
+ /**
+ * 鎵归噺鏇存柊璁惧缁勭姸鎬�
+ * @param ids 璁惧缁処D鍒楄〃
+ * @param status 鏂扮姸鎬�
+ * @return 鏄惁鏇存柊鎴愬姛
+ */
+ boolean batchUpdateDeviceGroupStatus(java.util.List<Long> ids, Integer status);
+
+ /**
+ * 鑾峰彇璁惧缁勭殑鎵╁睍閰嶇疆
+ * @param id 璁惧缁処D
+ * @return 鎵╁睍閰嶇疆瀛楀吀
+ */
+ java.util.Map<String, Object> getExtraConfig(Long id);
+
+ /**
+ * 鏇存柊璁惧缁勭殑鎵╁睍閰嶇疆
+ * @param id 璁惧缁処D
+ * @param extraConfig 鎵╁睍閰嶇疆瀛楀吀
+ * @return 鏄惁鏇存柊鎴愬姛
+ */
+ boolean updateExtraConfig(Long id, java.util.Map<String, Object> extraConfig);
+
+ /**
+ * 鑾峰彇璁惧缁勪笅鐨勮澶囨暟閲�
+ * @param groupId 璁惧缁処D
+ * @return 璁惧鏁伴噺
+ */
+ int getDeviceCountByGroupId(Long groupId);
+
+ /**
+ * 鑾峰彇鍦ㄧ嚎璁惧缁勬暟閲�
+ * @param projectId 椤圭洰ID
+ * @return 鍦ㄧ嚎璁惧缁勬暟閲�
+ */
+ int getOnlineDeviceGroupCount(Long projectId);
+
+ /**
+ * 鑾峰彇璁惧缁勭粺璁′俊鎭�
+ * @param projectId 椤圭洰ID
+ * @return 璁惧缁勭粺璁′俊鎭�
+ */
+ StatisticsVO.GroupStatistics getDeviceGroupStatistics(Long projectId);
+
+ /**
+ * 鑾峰彇璁惧缁勬�ц兘缁熻
+ * @param groupId 璁惧缁処D
+ * @return 璁惧缁勬�ц兘缁熻淇℃伅
+ */
+ DeviceGroupVO.PerformanceStats getGroupPerformance(Long groupId);
+
+ /**
+ * 鎵ц璁惧缁勫仴搴锋鏌�
+ * @param groupId 璁惧缁処D
+ * @return 鍋ュ悍妫�鏌ョ粨鏋�
+ */
+ DeviceGroupVO.HealthCheckResult performGroupHealthCheck(Long groupId);
+
+ /**
+ * 鍚敤璁惧缁�
+ * @param id 璁惧缁処D
+ * @return 鏄惁鍚敤鎴愬姛
+ */
+ boolean enableDeviceGroup(Long id);
+
+ /**
+ * 绂佺敤璁惧缁�
+ * @param id 璁惧缁処D
+ * @return 鏄惁绂佺敤鎴愬姛
+ */
+ boolean disableDeviceGroup(Long id);
+
+ /**
+ * 鎵归噺鍚敤璁惧缁�
+ * @param groupIds 璁惧缁処D鍒楄〃
+ * @return 鏄惁鍚敤鎴愬姛
+ */
+ boolean batchEnableDeviceGroups(java.util.List<Long> groupIds);
+
+ /**
+ * 鎵归噺绂佺敤璁惧缁�
+ * @param groupIds 璁惧缁処D鍒楄〃
+ * @return 鏄惁绂佺敤鎴愬姛
+ */
+ boolean batchDisableDeviceGroups(java.util.List<Long> groupIds);
+
+ /**
+ * 鑾峰彇鎵�鏈夎澶囩粍绫诲瀷
+ * @return 璁惧缁勭被鍨嬪垪琛�
+ */
+ java.util.List<String> getAllGroupTypes();
+
+ /**
+ * 鑾峰彇鎵�鏈夎澶囩粍鐘舵��
+ * @return 璁惧缁勭姸鎬佸垪琛�
+ */
+ java.util.List<String> getAllGroupStatuses();
+}
\ No newline at end of file
--
Gitblit v1.8.0